2020-02-10 21:19:23 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2020-07-17 13:24:53 +00:00
|
|
|
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_96a17d9" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.7.0">
|
2020-02-10 21:19:23 +00:00
|
|
|
<bpmn:process id="Process_93a29b3" isExecutable="true">
|
|
|
|
<bpmn:startEvent id="StartEvent_1">
|
|
|
|
<bpmn:outgoing>SequenceFlow_0637d8i</bpmn:outgoing>
|
|
|
|
</bpmn:startEvent>
|
|
|
|
<bpmn:sequenceFlow id="SequenceFlow_0637d8i" sourceRef="StartEvent_1" targetRef="task_gather_information" />
|
|
|
|
<bpmn:userTask id="task_gather_information" name="Gather Information" camunda:formKey="example_document_form">
|
|
|
|
<bpmn:extensionElements>
|
|
|
|
<camunda:formData>
|
|
|
|
<camunda:formField id="full_name" label="What is your name?" type="string" />
|
2020-02-11 01:54:22 +00:00
|
|
|
<camunda:formField id="date" label="date" type="string" />
|
|
|
|
<camunda:formField id="title" label="Title" type="string" />
|
2020-02-10 21:19:23 +00:00
|
|
|
<camunda:formField id="company" label="Company" type="string" />
|
2020-02-11 01:54:22 +00:00
|
|
|
<camunda:formField id="last_name" label="Last Name" type="string" />
|
2020-02-10 21:19:23 +00:00
|
|
|
</camunda:formData>
|
|
|
|
</bpmn:extensionElements>
|
|
|
|
<bpmn:incoming>SequenceFlow_0637d8i</bpmn:incoming>
|
|
|
|
<bpmn:outgoing>SequenceFlow_1i7hk1a</bpmn:outgoing>
|
|
|
|
</bpmn:userTask>
|
|
|
|
<bpmn:sequenceFlow id="SequenceFlow_1i7hk1a" sourceRef="task_gather_information" targetRef="task_generate_document" />
|
|
|
|
<bpmn:scriptTask id="task_generate_document" name="Generate Document">
|
|
|
|
<bpmn:extensionElements>
|
|
|
|
<camunda:properties>
|
|
|
|
<camunda:property name="template" />
|
|
|
|
</camunda:properties>
|
|
|
|
</bpmn:extensionElements>
|
|
|
|
<bpmn:incoming>SequenceFlow_1i7hk1a</bpmn:incoming>
|
|
|
|
<bpmn:outgoing>SequenceFlow_11c35oq</bpmn:outgoing>
|
2020-07-27 16:02:34 +00:00
|
|
|
<bpmn:script>complete_template('Letter.docx','AD_CoCApp')</bpmn:script>
|
2020-02-10 21:19:23 +00:00
|
|
|
</bpmn:scriptTask>
|
|
|
|
<bpmn:endEvent id="EndEvent_0evb22x">
|
|
|
|
<bpmn:incoming>SequenceFlow_11c35oq</bpmn:incoming>
|
|
|
|
</bpmn:endEvent>
|
|
|
|
<bpmn:sequenceFlow id="SequenceFlow_11c35oq" sourceRef="task_generate_document" targetRef="EndEvent_0evb22x" />
|
|
|
|
</bpmn:process>
|
|
|
|
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
|
|
|
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_93a29b3">
|
A major refactor of how we search and store files, as there was a lot of confusing bits in here.
From an API point of view you can do the following (and only the following)
/files?workflow_spec_id=x
* You can find all files associated with a workflow_spec_id, and add a file with a workflow_spec_id
/files?workflow_id=x
* You can find all files associated with a workflow_id, and add a file that is directly associated with the workflow
/files?workflow_id=x&form_field_key=y
* You can find all files associated with a form element on a running workflow, and add a new file.
Note: you can add multiple files to the same form_field_key, IF they have different file names. If the same name, the original file is archived,
and the new file takes its place.
The study endpoints always return a list of the file metadata associated with the study. Removed /studies-files, but there is an
endpoint called
/studies/all - that returns all the studies in the system, and does include their files.
On a deeper level:
The File model no longer contains:
- study_id,
- task_id,
- form_field_key
Instead, if the file is associated with workflow - then that is the one way it is connected to the study, and we use this relationship to find files for a study.
A file is never associated with a task_id, as these change when the workflow is reloaded.
The form_field_key must match the irb_doc_code, so when requesting files for a form field, we just look up the irb_doc_code.
2020-05-28 12:27:26 +00:00
|
|
|
<bpmndi:BPMNEdge id="SequenceFlow_11c35oq_di" bpmnElement="SequenceFlow_11c35oq">
|
|
|
|
<di:waypoint x="565" y="117" />
|
|
|
|
<di:waypoint x="665" y="117" />
|
|
|
|
</bpmndi:BPMNEdge>
|
|
|
|
<bpmndi:BPMNEdge id="SequenceFlow_1i7hk1a_di" bpmnElement="SequenceFlow_1i7hk1a">
|
|
|
|
<di:waypoint x="365" y="117" />
|
|
|
|
<di:waypoint x="465" y="117" />
|
|
|
|
</bpmndi:BPMNEdge>
|
2020-02-10 21:19:23 +00:00
|
|
|
<bpmndi:BPMNEdge id="SequenceFlow_0637d8i_di" bpmnElement="SequenceFlow_0637d8i">
|
|
|
|
<di:waypoint x="215" y="117" />
|
|
|
|
<di:waypoint x="265" y="117" />
|
|
|
|
</bpmndi:BPMNEdge>
|
A major refactor of how we search and store files, as there was a lot of confusing bits in here.
From an API point of view you can do the following (and only the following)
/files?workflow_spec_id=x
* You can find all files associated with a workflow_spec_id, and add a file with a workflow_spec_id
/files?workflow_id=x
* You can find all files associated with a workflow_id, and add a file that is directly associated with the workflow
/files?workflow_id=x&form_field_key=y
* You can find all files associated with a form element on a running workflow, and add a new file.
Note: you can add multiple files to the same form_field_key, IF they have different file names. If the same name, the original file is archived,
and the new file takes its place.
The study endpoints always return a list of the file metadata associated with the study. Removed /studies-files, but there is an
endpoint called
/studies/all - that returns all the studies in the system, and does include their files.
On a deeper level:
The File model no longer contains:
- study_id,
- task_id,
- form_field_key
Instead, if the file is associated with workflow - then that is the one way it is connected to the study, and we use this relationship to find files for a study.
A file is never associated with a task_id, as these change when the workflow is reloaded.
The form_field_key must match the irb_doc_code, so when requesting files for a form field, we just look up the irb_doc_code.
2020-05-28 12:27:26 +00:00
|
|
|
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
|
|
|
<dc:Bounds x="179" y="99" width="36" height="36" />
|
|
|
|
</bpmndi:BPMNShape>
|
2020-02-10 21:19:23 +00:00
|
|
|
<bpmndi:BPMNShape id="UserTask_02o51o8_di" bpmnElement="task_gather_information">
|
|
|
|
<dc:Bounds x="265" y="77" width="100" height="80" />
|
|
|
|
</bpmndi:BPMNShape>
|
|
|
|
<bpmndi:BPMNShape id="ScriptTask_0xjh8x4_di" bpmnElement="task_generate_document">
|
|
|
|
<dc:Bounds x="465" y="77" width="100" height="80" />
|
|
|
|
</bpmndi:BPMNShape>
|
|
|
|
<bpmndi:BPMNShape id="EndEvent_0evb22x_di" bpmnElement="EndEvent_0evb22x">
|
|
|
|
<dc:Bounds x="665" y="99" width="36" height="36" />
|
|
|
|
</bpmndi:BPMNShape>
|
|
|
|
</bpmndi:BPMNPlane>
|
|
|
|
</bpmndi:BPMNDiagram>
|
|
|
|
</bpmn:definitions>
|