diff --git a/crc/static/bpmn/m2_demo/M2_Demo.bpmn b/crc/static/bpmn/m2_demo/m2_demo.bpmn
similarity index 84%
rename from crc/static/bpmn/m2_demo/M2_Demo.bpmn
rename to crc/static/bpmn/m2_demo/m2_demo.bpmn
index 1b9c8e19..d9b2c199 100644
--- a/crc/static/bpmn/m2_demo/M2_Demo.bpmn
+++ b/crc/static/bpmn/m2_demo/m2_demo.bpmn
@@ -9,14 +9,14 @@
-
+
- SequenceFlow_0dsj62d
+ SequenceFlow_13sjege
SequenceFlow_1doa5ln
-
+
@@ -68,18 +68,22 @@
- SequenceFlow_1cf9ps4
+ SequenceFlow_15tszx8
SequenceFlow_1ts885e
-
+
-
+
+
+
+
+
SequenceFlow_03v7kc7
@@ -101,7 +105,7 @@
SequenceFlow_15tszx8
-
+
@@ -119,41 +123,27 @@
-
-
-
-
- SequenceFlow_15tszx8
- SequenceFlow_1cf9ps4
-
-
-
-
- SequenceFlow_13sjege
- SequenceFlow_0dsj62d
- scripts.IRBDocAPI
-
-
+
-
-
+
+
-
+
-
+
@@ -177,11 +167,11 @@
-
+
-
-
+
+
@@ -196,20 +186,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/example_data.py b/example_data.py
index fd2ca6d0..4c1ae47c 100644
--- a/example_data.py
+++ b/example_data.py
@@ -37,11 +37,11 @@ class ExampleDataLoader:
name="m2_demo",
display_name="Milestone 2 Demo",
description='A simplified CR Connect workflow for demonstration purposes.')
- workflow_specifications += \
- self.create_spec(id="crc_study_workflow",
- name="crc_study_workflow",
- display_name="CR Connect Study Workflow",
- description='Draft workflow for CR Connect studies.')
+ # workflow_specifications += \
+ # self.create_spec(id="crc_study_workflow",
+ # name="crc_study_workflow",
+ # display_name="CR Connect Study Workflow",
+ # description='Draft workflow for CR Connect studies.')
workflow_specifications += \
self.create_spec(id="random_fact",
name="random_fact",
diff --git a/tests/test_api_files.py b/tests/test_api_files.py
index e0fd6060..be1c7328 100644
--- a/tests/test_api_files.py
+++ b/tests/test_api_files.py
@@ -20,7 +20,7 @@ class TestApiFiles(BaseTest):
json_data = json.loads(rv.get_data(as_text=True))
self.assertEqual(1, len(json_data))
file = FileModelSchema(many=True).load(json_data, session=session)
- self.assertEqual("random_fact.bpmn", file[0].name)
+ self.assertEqual("m2_demo.bpmn", file[0].name)
def test_list_multiple_files_for_workflow_spec(self):
self.load_example_data()
diff --git a/tests/test_workflow_processor.py b/tests/test_workflow_processor.py
index e5ae1706..7f39279c 100644
--- a/tests/test_workflow_processor.py
+++ b/tests/test_workflow_processor.py
@@ -79,6 +79,8 @@ class TestWorkflowProcessor(BaseTest):
study = session.query(StudyModel).first()
processor = WorkflowProcessor.create(study.id, workflow_spec_model.id)
self.assertEqual(WorkflowStatus.user_input_required, processor.get_status())
+
+ # Complete the first steps of the 4 parallel tasks
next_user_tasks = processor.next_user_tasks()
self.assertEqual(4, len(next_user_tasks))
self._populate_form_with_random_data(next_user_tasks[0])
@@ -89,7 +91,8 @@ class TestWorkflowProcessor(BaseTest):
processor.complete_task(next_user_tasks[1])
processor.complete_task(next_user_tasks[2])
processor.complete_task(next_user_tasks[3])
- # There are another 4 tasks to complete (each task, had a follow up task in the parallel list)
+
+ # There are another 4 tasks to complete (each parallel task has a follow-up task)
next_user_tasks = processor.next_user_tasks()
self.assertEqual(4, len(next_user_tasks))
self._populate_form_with_random_data(next_user_tasks[0])
@@ -100,6 +103,14 @@ class TestWorkflowProcessor(BaseTest):
processor.complete_task(next_user_tasks[1])
processor.complete_task(next_user_tasks[2])
processor.complete_task(next_user_tasks[3])
+ processor.do_engine_steps()
+
+ # Should be one last step after the above are complete
+ final_user_tasks = processor.next_user_tasks()
+ self.assertEqual(1, len(final_user_tasks))
+ self._populate_form_with_random_data(final_user_tasks[0])
+ processor.complete_task(final_user_tasks[0])
+
processor.do_engine_steps()
self.assertTrue(processor.bpmn_workflow.is_completed())
@@ -163,4 +174,4 @@ class TestWorkflowProcessor(BaseTest):
file_data = session.query(FileDataModel).filter(FileDataModel.file_model_id == files[0].id).first()
self.assertIsNotNone(file_data.data)
self.assertTrue(len(file_data.data) > 0)
- # Not going any farther here, assuming this is tested in libraries correctly.
\ No newline at end of file
+ # Not going any farther here, assuming this is tested in libraries correctly.