mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-01-27 01:40:48 +00:00
Squashed 'SpiffWorkflow/' changes from 11e4b4f9..2ca6ebf8
2ca6ebf8 Data stores (#298) c2fc9d22 Merge pull request #297 from sartography/bugfix/copy-all-data-when-input-or-output-list-empty 07e3b582 add checks for len == 0 when copying based on io spec b439f69f Merge pull request #296 from sartography/bugfix/subprocess-access-to-data-objects 6d2a2031 update spiff subworkflow tasks too 992c3867 make data objects referenceable within subprocesses 6c8ff5cd allow subprocesses & call activities to have different data copy policies 2b14f3a4 initialize subprocesses in _update_hook instead of _on_ready_before 791f335d Merge pull request #295 from sartography/improvement/remove-camunda-from-base-and-misc-cleanup 28b579be remove a few unused, duplicative, and debugging methods 8f14d109 remove some other unused diagrams and tests 408bc673 rely on top level camunda parser for almost all namespace references 895b2cc9 remove camunda namespace from base bpmn parser 76ecbf7c Merge pull request #294 from sartography/bugfix/reactivate-boundary-event 82b6c8ad hack to ensure timers (and other events) are reset if returned to via loop reset 590903f4 Merge pull request #292 from sartography/feature/multiinstance-refactor 53749004 fix bug & typo f31726db raise error on attempting to migrate workflows with MI 44e6d08d create spiff multiinstance task 2168c022 create camunda MI that approximates what it used to do 9894cea5 some improvements and bugfixes f857ad5d remove some now unused functionality & tests, create a few more tests 6fead9d0 updated serializer & fixes for most tests ec662ecd add parallel multiinstance bd19b2a8 working sequential multiinstance 2f9c192b further cleanup around _update_hook 947792bf fix bug in exclusive gateway migration d3d87b28 add io spec to all tasks f1586e27 add support for standard loop tasks git-subtree-dir: SpiffWorkflow git-subtree-split: 2ca6ebf800d4ff1d54f3e1c48798a2cb879560f7
This commit is contained in:
parent
fec5934d38
commit
7a60c13f90
@ -1,12 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import unittest
|
||||
import re
|
||||
import os.path
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..'))
|
||||
|
||||
from SpiffWorkflow.task import Task, TaskState, updateDotDict
|
||||
from SpiffWorkflow.task import Task, TaskState
|
||||
from SpiffWorkflow.specs.WorkflowSpec import WorkflowSpec
|
||||
from SpiffWorkflow.specs.Simple import Simple
|
||||
|
||||
@ -15,10 +12,6 @@ class MockWorkflow(object):
|
||||
def __init__(self, spec):
|
||||
self.spec = spec
|
||||
|
||||
class UpdateDotDictTest(unittest.TestCase):
|
||||
def test_update(self):
|
||||
res = updateDotDict({}, 'some.thing.here', 'avalue')
|
||||
self.assertEqual(res, {'some':{'thing': {'here': 'avalue'}}})
|
||||
|
||||
class TaskTest(unittest.TestCase):
|
||||
|
||||
@ -85,8 +78,7 @@ class TaskTest(unittest.TestCase):
|
||||
|
||||
def suite():
|
||||
taskSuite = unittest.TestLoader().loadTestsFromTestCase(TaskTest)
|
||||
updateDotSuite = unittest.TestLoader().loadTestsFromTestCase(UpdateDotDictTest)
|
||||
return unittest.TestSuite([taskSuite, updateDotSuite])
|
||||
return unittest.TestSuite([taskSuite])
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.TextTestRunner(verbosity=2).run(suite())
|
||||
|
@ -1,42 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
|
||||
import unittest
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
from SpiffWorkflow.exceptions import WorkflowException
|
||||
from tests.SpiffWorkflow.bpmn.BpmnWorkflowTestCase import BpmnWorkflowTestCase
|
||||
|
||||
__author__ = 'kellym'
|
||||
|
||||
|
||||
class AntiLoopTaskTest(BpmnWorkflowTestCase):
|
||||
"""The example bpmn is actually a MultiInstance. It should not report that it is a looping task and
|
||||
it should fail when we try to terminate the loop"""
|
||||
|
||||
def setUp(self):
|
||||
spec, subprocesses = self.load_workflow_spec('bpmnAntiLoopTask.bpmn','LoopTaskTest')
|
||||
self.workflow = BpmnWorkflow(spec, subprocesses)
|
||||
|
||||
def testRunThroughHappy(self):
|
||||
|
||||
self.workflow.do_engine_steps()
|
||||
ready_tasks = self.workflow.get_ready_user_tasks()
|
||||
self.assertTrue(len(ready_tasks) ==1)
|
||||
self.assertFalse(ready_tasks[0].task_spec.is_loop_task())
|
||||
try:
|
||||
ready_tasks[0].terminate_loop()
|
||||
self.fail("Terminate Loop should throw and error when called on a non-loop MultiInstance")
|
||||
except WorkflowException as ex:
|
||||
self.assertTrue(
|
||||
'The method terminate_loop should only be called in the case of a BPMN Loop Task' in (
|
||||
'%r' % ex),
|
||||
'\'The method terminate_loop should only be called in the case of a BPMN Loop Task\' should be a substring of error message: \'%r\'' % ex)
|
||||
|
||||
|
||||
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromTestCase(AntiLoopTaskTest)
|
||||
if __name__ == '__main__':
|
||||
unittest.TextTestRunner(verbosity=2).run(suite())
|
@ -1,5 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from SpiffWorkflow.bpmn.specs.data_spec import BpmnDataStoreSpecification
|
||||
from SpiffWorkflow.bpmn.specs.ExclusiveGateway import ExclusiveGateway
|
||||
from SpiffWorkflow.bpmn.specs.UserTask import UserTask
|
||||
from SpiffWorkflow.bpmn.parser.BpmnParser import BpmnParser
|
||||
@ -7,7 +8,7 @@ from SpiffWorkflow.bpmn.parser.TaskParser import TaskParser
|
||||
from SpiffWorkflow.bpmn.parser.task_parsers import ConditionalGatewayParser
|
||||
from SpiffWorkflow.bpmn.parser.util import full_tag
|
||||
|
||||
from SpiffWorkflow.bpmn.serializer.helpers.spec import TaskSpecConverter
|
||||
from SpiffWorkflow.bpmn.serializer.helpers.spec import BpmnSpecConverter, TaskSpecConverter
|
||||
|
||||
# Many of our tests relied on the Packager to set the calledElement attribute on
|
||||
# Call Activities. I've moved that code to a customized parser.
|
||||
@ -57,6 +58,38 @@ class TestUserTaskConverter(TaskSpecConverter):
|
||||
def from_dict(self, dct):
|
||||
return self.task_spec_from_dict(dct)
|
||||
|
||||
class TestDataStore(BpmnDataStoreSpecification):
|
||||
|
||||
_value = None
|
||||
|
||||
def get(self, my_task):
|
||||
"""Copy a value from a data store into task data."""
|
||||
my_task.data[self.name] = TestDataStore._value
|
||||
|
||||
def set(self, my_task):
|
||||
"""Copy a value from the task data to the data store"""
|
||||
TestDataStore._value = my_task.data[self.name]
|
||||
del my_task.data[self.name]
|
||||
|
||||
class TestDataStoreConverter(BpmnSpecConverter):
|
||||
|
||||
def __init__(self, registry):
|
||||
super().__init__(TestDataStore, registry)
|
||||
|
||||
def to_dict(self, spec):
|
||||
return {
|
||||
"name": spec.name,
|
||||
"description": spec.description,
|
||||
"capacity": spec.capacity,
|
||||
"is_unlimited": spec.is_unlimited,
|
||||
"_value": TestDataStore._value,
|
||||
}
|
||||
|
||||
def from_dict(self, dct):
|
||||
_value = dct.pop("_value")
|
||||
data_store = TestDataStore(**dct)
|
||||
TestDataStore._value = _value
|
||||
return data_store
|
||||
|
||||
class TestBpmnParser(BpmnParser):
|
||||
OVERRIDE_PARSER_CLASSES = {
|
||||
@ -65,3 +98,6 @@ class TestBpmnParser(BpmnParser):
|
||||
full_tag('callActivity'): (CallActivityParser, CallActivity)
|
||||
}
|
||||
|
||||
DATA_STORE_CLASSES = {
|
||||
"TestDataStore": TestDataStore,
|
||||
}
|
||||
|
@ -8,13 +8,12 @@ from SpiffWorkflow.bpmn.parser.BpmnParser import BpmnValidator
|
||||
from SpiffWorkflow.task import TaskState
|
||||
|
||||
from SpiffWorkflow.bpmn.serializer.workflow import BpmnWorkflowSerializer, DEFAULT_SPEC_CONFIG
|
||||
from SpiffWorkflow.bpmn.serializer.task_spec import UserTaskConverter
|
||||
from .BpmnLoaderForTests import TestUserTaskConverter, TestBpmnParser
|
||||
from .BpmnLoaderForTests import TestUserTaskConverter, TestBpmnParser, TestDataStoreConverter
|
||||
|
||||
__author__ = 'matth'
|
||||
|
||||
DEFAULT_SPEC_CONFIG['task_specs'].append(TestUserTaskConverter)
|
||||
|
||||
DEFAULT_SPEC_CONFIG['task_specs'].append(TestDataStoreConverter)
|
||||
|
||||
wf_spec_converter = BpmnWorkflowSerializer.configure_workflow_spec_converter(spec_config=DEFAULT_SPEC_CONFIG)
|
||||
|
||||
@ -121,6 +120,7 @@ class BpmnWorkflowTestCase(unittest.TestCase):
|
||||
|
||||
def save_restore(self):
|
||||
|
||||
script_engine = self.workflow.script_engine
|
||||
before_state = self._get_workflow_state(do_steps=False)
|
||||
before_dump = self.workflow.get_dump()
|
||||
# Check that we can actully convert this to JSON
|
||||
@ -133,6 +133,7 @@ class BpmnWorkflowTestCase(unittest.TestCase):
|
||||
self.assertEqual(before_dump, after_dump)
|
||||
self.assertEqual(before_state, after_state)
|
||||
self.workflow = after
|
||||
self.workflow.script_engine = script_engine
|
||||
|
||||
def restore(self, state):
|
||||
self.workflow = self.serializer.workflow_from_dict(state)
|
||||
|
@ -72,11 +72,15 @@ class DataObjectReferenceTest(BpmnWorkflowTestCase):
|
||||
self.assertNotIn('obj_1', ready_tasks[0].data)
|
||||
self.assertEqual(self.workflow.data['obj_1'], 'hello')
|
||||
|
||||
# Make sure data objects can be copied in and out of a subprocess
|
||||
# Make sure data objects are accessible inside a subprocess
|
||||
self.workflow.do_engine_steps()
|
||||
ready_tasks = self.workflow.get_ready_user_tasks()
|
||||
self.assertEqual(ready_tasks[0].data['obj_1'], 'hello')
|
||||
ready_tasks[0].data['obj_1'] = 'hello again'
|
||||
ready_tasks[0].complete()
|
||||
self.workflow.do_engine_steps()
|
||||
sp = self.workflow.get_tasks_from_spec_name('subprocess')[0]
|
||||
# It was copied out
|
||||
self.assertNotIn('obj_1', sp.data)
|
||||
# The update should persist in the main process
|
||||
self.assertEqual(self.workflow.data['obj_1'], 'hello again')
|
||||
|
36
tests/SpiffWorkflow/bpmn/DataStoreReferenceTest.py
Normal file
36
tests/SpiffWorkflow/bpmn/DataStoreReferenceTest.py
Normal file
@ -0,0 +1,36 @@
|
||||
from tests.SpiffWorkflow.bpmn.BpmnLoaderForTests import TestDataStore
|
||||
from tests.SpiffWorkflow.bpmn.BpmnWorkflowTestCase import BpmnWorkflowTestCase
|
||||
from SpiffWorkflow.bpmn.exceptions import WorkflowDataException
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
|
||||
class DataStoreReferenceTest(BpmnWorkflowTestCase):
|
||||
def _do_engine_steps(self, file, processid, save_restore):
|
||||
spec, subprocesses = self.load_workflow_spec('data_store.bpmn', 'JustDataStoreRef')
|
||||
self.workflow = BpmnWorkflow(spec, subprocesses)
|
||||
if save_restore:
|
||||
self.save_restore()
|
||||
self.workflow.do_engine_steps()
|
||||
|
||||
def _check_last_script_task_data(self):
|
||||
last_script_task_data = self.workflow.get_tasks_from_spec_name("Activity_1skgyn9")[0].data
|
||||
self.assertEqual(len(last_script_task_data), 1)
|
||||
self.assertEqual(last_script_task_data["x"], "Sue")
|
||||
|
||||
def testCanInterpretDataStoreReferenceWithInputsAndOutputs(self):
|
||||
self._do_engine_steps('data_store.bpmn', 'JustDataStoreRef', False)
|
||||
self._check_last_script_task_data()
|
||||
|
||||
def testCanSaveRestoreDataStoreReferenceWithInputsAndOutputs(self):
|
||||
self._do_engine_steps('data_store.bpmn', 'JustDataStoreRef', True)
|
||||
self._check_last_script_task_data()
|
||||
|
||||
def testSeparateWorkflowInstancesCanShareDataUsingDataStores(self):
|
||||
self._do_engine_steps('data_store_write.bpmn', 'JustDataStoreRef', False)
|
||||
self._do_engine_steps('data_store_read.bpmn', 'JustDataStoreRef', False)
|
||||
self._check_last_script_task_data()
|
||||
|
||||
def testSeparateRestoredWorkflowInstancesCanShareDataUsingDataStores(self):
|
||||
self._do_engine_steps('data_store_write.bpmn', 'JustDataStoreRef', True)
|
||||
self._do_engine_steps('data_store_read.bpmn', 'JustDataStoreRef', True)
|
||||
self._check_last_script_task_data()
|
||||
|
@ -1,38 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
|
||||
import sys
|
||||
import os
|
||||
import unittest
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', '..'))
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
from tests.SpiffWorkflow.bpmn.BpmnWorkflowTestCase import BpmnWorkflowTestCase
|
||||
|
||||
__author__ = 'matth'
|
||||
|
||||
|
||||
class ExclusiveGatewayIntoMultiInstanceTest(BpmnWorkflowTestCase):
|
||||
"""In the example BPMN Diagram we set x = 0, then we have an
|
||||
exclusive gateway that should skip over a parallel multi-instance
|
||||
class, so it should run straight through and complete without issue."""
|
||||
|
||||
def setUp(self):
|
||||
spec, subprocesses = self.load_workflow_spec('exclusive_into_multi.bpmn','ExclusiveToMulti')
|
||||
self.workflow = BpmnWorkflow(spec, subprocesses)
|
||||
|
||||
def testRunThroughHappy(self):
|
||||
|
||||
|
||||
self.workflow.do_engine_steps()
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
|
||||
def testSaveRestore(self):
|
||||
|
||||
self.workflow.do_engine_steps()
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromTestCase(ExclusiveGatewayIntoMultiInstanceTest)
|
||||
if __name__ == '__main__':
|
||||
unittest.TextTestRunner(verbosity=2).run(suite())
|
@ -1,59 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
|
||||
import sys
|
||||
import os
|
||||
import unittest
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', '..'))
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
from tests.SpiffWorkflow.bpmn.BpmnWorkflowTestCase import BpmnWorkflowTestCase
|
||||
|
||||
__author__ = 'matth'
|
||||
|
||||
|
||||
class ExclusiveGatewayNonDefaultPathIntoMultiTest(BpmnWorkflowTestCase):
|
||||
"""In the example BPMN Diagram we require that "Yes" or "No" be specified
|
||||
in a user task and check that a multiinstance can follow a non-default
|
||||
path.
|
||||
"""
|
||||
|
||||
def setUp(self):
|
||||
spec, subprocesses = self.load_workflow_spec('exclusive_non_default_path_into_multi.bpmn','ExclusiveNonDefaultMulti')
|
||||
self.workflow = BpmnWorkflow(spec, subprocesses)
|
||||
|
||||
def load_workflow1_spec(self):
|
||||
return
|
||||
|
||||
def testRunThroughHappy(self):
|
||||
|
||||
|
||||
self.workflow.do_engine_steps()
|
||||
|
||||
# Set initial array size to 3 in the first user form.
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
self.assertEqual("DoStuff", task.task_spec.name)
|
||||
task.update_data({"morestuff": 'Yes'})
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
self.workflow.do_engine_steps()
|
||||
|
||||
for i in range(3):
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
if i == 0:
|
||||
self.assertEqual("GetMoreStuff", task.task_spec.name)
|
||||
else:
|
||||
self.assertEqual("GetMoreStuff_%d"%(i-1), task.task_spec.name)
|
||||
|
||||
|
||||
task.update_data({"stuff.addstuff": "Stuff %d"%i})
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
self.workflow.do_engine_steps()
|
||||
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromTestCase(ExclusiveGatewayNonDefaultPathIntoMultiTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.TextTestRunner(verbosity=2).run(suite())
|
@ -25,9 +25,6 @@ class CallActivityDataTest(BpmnWorkflowTestCase):
|
||||
|
||||
with self.assertRaises(WorkflowDataException) as exc:
|
||||
self.advance_to_subprocess()
|
||||
self.assertEqual("'in_2' was not found in the task data. "
|
||||
"You are missing a required Data Input for a call activity.",
|
||||
str(exc.exception))
|
||||
self.assertEqual(exc.exception.data_input.name,'in_2')
|
||||
|
||||
def testCallActivityMissingOutput(self):
|
||||
@ -43,10 +40,7 @@ class CallActivityDataTest(BpmnWorkflowTestCase):
|
||||
|
||||
with self.assertRaises(WorkflowDataException) as exc:
|
||||
self.complete_subprocess()
|
||||
|
||||
self.assertEqual("'out_2' was not found in the task data. A Data Output was not provided as promised.",
|
||||
str(exc.exception))
|
||||
self.assertEqual(exc.exception.data_output.name,'out_2')
|
||||
self.assertEqual(exc.exception.data_output.name, 'out_2')
|
||||
|
||||
def actual_test(self, save_restore=False):
|
||||
|
||||
@ -92,3 +86,44 @@ class CallActivityDataTest(BpmnWorkflowTestCase):
|
||||
next_task = self.workflow.get_tasks(TaskState.READY)[0]
|
||||
next_task.complete()
|
||||
waiting = self.workflow.get_tasks(TaskState.WAITING)
|
||||
|
||||
|
||||
class IOSpecOnTaskTest(BpmnWorkflowTestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.spec, self.subprocesses = self.load_workflow_spec('io_spec_on_task.bpmn', 'main')
|
||||
|
||||
def testIOSpecOnTask(self):
|
||||
self.actual_test()
|
||||
|
||||
def testIOSpecOnTaskSaveRestore(self):
|
||||
self.actual_test(True)
|
||||
|
||||
def testIOSpecOnTaskMissingInput(self):
|
||||
self.workflow = BpmnWorkflow(self.spec, self.subprocesses)
|
||||
set_data = self.workflow.spec.task_specs['set_data']
|
||||
set_data.script = """in_1, unused = 1, True"""
|
||||
with self.assertRaises(WorkflowDataException) as exc:
|
||||
self.workflow.do_engine_steps()
|
||||
self.assertEqual(exc.exception.data_input.name, 'in_2')
|
||||
|
||||
def testIOSpecOnTaskMissingOutput(self):
|
||||
self.workflow = BpmnWorkflow(self.spec, self.subprocesses)
|
||||
self.workflow.do_engine_steps()
|
||||
task = self.workflow.get_tasks_from_spec_name('any_task')[0]
|
||||
task.data.update({'out_1': 1})
|
||||
with self.assertRaises(WorkflowDataException) as exc:
|
||||
task.complete()
|
||||
self.assertEqual(exc.exception.data_output.name, 'out_2')
|
||||
|
||||
def actual_test(self, save_restore=False):
|
||||
self.workflow = BpmnWorkflow(self.spec, self.subprocesses)
|
||||
self.workflow.do_engine_steps()
|
||||
if save_restore:
|
||||
self.save_restore()
|
||||
task = self.workflow.get_tasks_from_spec_name('any_task')[0]
|
||||
self.assertDictEqual(task.data, {'in_1': 1, 'in_2': 'hello world'})
|
||||
task.data.update({'out_1': 1, 'out_2': 'bye', 'extra': True})
|
||||
task.complete()
|
||||
self.workflow.do_engine_steps()
|
||||
self.assertDictEqual(self.workflow.last_task.data, {'out_1': 1, 'out_2': 'bye'})
|
||||
|
@ -1,60 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import unittest
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
from tests.SpiffWorkflow.bpmn.BpmnWorkflowTestCase import BpmnWorkflowTestCase
|
||||
|
||||
__author__ = 'kellym'
|
||||
|
||||
|
||||
class LoopTaskTest(BpmnWorkflowTestCase):
|
||||
"""The example bpmn diagram has a single task with a loop cardinality of 5.
|
||||
It should repeat 5 times before termination."""
|
||||
|
||||
def setUp(self):
|
||||
spec, subprocesses = self.load_workflow_spec('bpmnLoopTask.bpmn','LoopTaskTest')
|
||||
self.workflow = BpmnWorkflow(spec, subprocesses)
|
||||
|
||||
def testRunThroughHappy(self):
|
||||
|
||||
for i in range(5):
|
||||
self.workflow.do_engine_steps()
|
||||
ready_tasks = self.workflow.get_ready_user_tasks()
|
||||
self.assertTrue(len(ready_tasks) ==1)
|
||||
self.assertTrue(ready_tasks[0].task_spec.is_loop_task())
|
||||
self.assertFalse(self.workflow.is_completed())
|
||||
last_task = self.workflow.last_task
|
||||
|
||||
self.do_next_exclusive_step('Activity_TestLoop')
|
||||
|
||||
ready_tasks = self.workflow.get_ready_user_tasks()
|
||||
self.assertTrue(len(ready_tasks) ==1)
|
||||
ready_tasks[0].terminate_loop()
|
||||
self.do_next_exclusive_step('Activity_TestLoop')
|
||||
self.workflow.do_engine_steps()
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
|
||||
|
||||
def testSaveRestore(self):
|
||||
|
||||
for i in range(5):
|
||||
self.save_restore()
|
||||
self.workflow.do_engine_steps()
|
||||
ready_tasks = self.workflow.get_ready_user_tasks()
|
||||
self.assertTrue(len(ready_tasks) ==1)
|
||||
self.assertTrue(ready_tasks[0].task_spec.is_loop_task())
|
||||
self.assertFalse(self.workflow.is_completed())
|
||||
self.do_next_exclusive_step('Activity_TestLoop')
|
||||
|
||||
ready_tasks = self.workflow.get_ready_user_tasks()
|
||||
self.assertTrue(len(ready_tasks) ==1)
|
||||
ready_tasks[0].terminate_loop()
|
||||
self.do_next_exclusive_step('Activity_TestLoop')
|
||||
self.workflow.do_engine_steps()
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromTestCase(LoopTaskTest)
|
||||
if __name__ == '__main__':
|
||||
unittest.TextTestRunner(verbosity=2).run(suite())
|
@ -1,54 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import os
|
||||
import unittest
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', '..'))
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
from tests.SpiffWorkflow.bpmn.BpmnWorkflowTestCase import BpmnWorkflowTestCase
|
||||
|
||||
__author__ = 'matth'
|
||||
|
||||
|
||||
class MultiInstanceCondTest(BpmnWorkflowTestCase):
|
||||
"""The example bpmn diagram has a single task set to be a parallel
|
||||
multi-instance with a loop cardinality of 5.
|
||||
It should repeat 5 times before termination, and it should
|
||||
have a navigation list with 7 items in it - one for start, one for end,
|
||||
and five items for the repeating section. """
|
||||
|
||||
def setUp(self):
|
||||
spec, subprocesses = self.load_workflow_spec('MultiInstanceParallelTaskCond.bpmn', 'MultiInstance')
|
||||
self.workflow = BpmnWorkflow(spec, subprocesses)
|
||||
|
||||
def load_workflow1_spec(self):
|
||||
return
|
||||
|
||||
def testRunThroughHappy(self):
|
||||
self.actualTest()
|
||||
|
||||
def testSaveRestore(self):
|
||||
self.actualTest(True)
|
||||
|
||||
def actualTest(self, save_restore=False):
|
||||
|
||||
self.workflow.do_engine_steps()
|
||||
self.assertEqual(1, len(self.workflow.get_ready_user_tasks()))
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
task.data['collection'] = {'a':{'a':'test'},
|
||||
'b':{'b':'test'}}
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
self.workflow.do_engine_steps()
|
||||
|
||||
for task in self.workflow.get_ready_user_tasks():
|
||||
self.assertFalse(self.workflow.is_completed())
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
if save_restore:
|
||||
self.save_restore()
|
||||
self.workflow.do_engine_steps()
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromTestCase(MultiInstanceCondTest)
|
||||
if __name__ == '__main__':
|
||||
unittest.TextTestRunner(verbosity=2).run(suite())
|
@ -1,51 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import os
|
||||
import unittest
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', '..'))
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
from tests.SpiffWorkflow.bpmn.BpmnWorkflowTestCase import BpmnWorkflowTestCase
|
||||
|
||||
__author__ = 'matth'
|
||||
|
||||
|
||||
class MultiInstanceTest(BpmnWorkflowTestCase):
|
||||
"""The example bpmn diagram has a single task set to be a parallel
|
||||
multi-instance with a loop cardinality of 5.
|
||||
It should repeat 5 times before termination, and it should
|
||||
have a navigation list with 7 items in it - one for start, one for end,
|
||||
and five items for the repeating section. """
|
||||
|
||||
def setUp(self):
|
||||
spec, subprocesses = self.load_workflow_spec('MultiInstanceParallelTask.bpmn', 'MultiInstance')
|
||||
self.workflow = BpmnWorkflow(spec, subprocesses)
|
||||
|
||||
def load_workflow1_spec(self):
|
||||
return
|
||||
|
||||
def testRunThroughHappy(self):
|
||||
self.actualTest()
|
||||
|
||||
def testSaveRestore(self):
|
||||
self.actualTest(True)
|
||||
|
||||
def actualTest(self, save_restore=False):
|
||||
self.workflow.do_engine_steps()
|
||||
self.assertEqual(1, len(self.workflow.get_ready_user_tasks()))
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
task.data['collection'] = [1,2,3,4,5]
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
self.workflow.do_engine_steps()
|
||||
for task in self.workflow.get_ready_user_tasks():
|
||||
self.assertFalse(self.workflow.is_completed())
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
if save_restore:
|
||||
self.save_restore()
|
||||
self.workflow.do_engine_steps()
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromTestCase(MultiInstanceTest)
|
||||
if __name__ == '__main__':
|
||||
unittest.TextTestRunner(verbosity=2).run(suite())
|
@ -1,46 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import os
|
||||
import unittest
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', '..'))
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
from tests.SpiffWorkflow.bpmn.BpmnWorkflowTestCase import BpmnWorkflowTestCase
|
||||
|
||||
__author__ = 'matth'
|
||||
|
||||
|
||||
class MultiInstanceTest(BpmnWorkflowTestCase):
|
||||
"""The example bpmn diagram has a single task with a loop cardinality of 5.
|
||||
It should repeat 5 times before termination."""
|
||||
|
||||
def setUp(self):
|
||||
spec, subprocesses = self.load_workflow_spec('bpmnMultiUserTask.bpmn','MultiInstance')
|
||||
self.workflow = BpmnWorkflow(spec, subprocesses)
|
||||
|
||||
|
||||
def testRunThroughHappy(self):
|
||||
|
||||
for i in range(5):
|
||||
self.workflow.do_engine_steps()
|
||||
self.assertFalse(self.workflow.is_completed())
|
||||
self.do_next_exclusive_step('Activity_Loop')
|
||||
|
||||
self.workflow.do_engine_steps()
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
|
||||
def testSaveRestore(self):
|
||||
|
||||
for i in range(5):
|
||||
self.save_restore()
|
||||
self.workflow.do_engine_steps()
|
||||
self.assertFalse(self.workflow.is_completed())
|
||||
self.do_next_exclusive_step('Activity_Loop')
|
||||
|
||||
self.workflow.do_engine_steps()
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromTestCase(MultiInstanceTest)
|
||||
if __name__ == '__main__':
|
||||
unittest.TextTestRunner(verbosity=2).run(suite())
|
233
tests/SpiffWorkflow/bpmn/ParallelMultiInstanceTest.py
Normal file
233
tests/SpiffWorkflow/bpmn/ParallelMultiInstanceTest.py
Normal file
@ -0,0 +1,233 @@
|
||||
from SpiffWorkflow.task import TaskState
|
||||
from SpiffWorkflow.bpmn.exceptions import WorkflowDataException
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
from SpiffWorkflow.bpmn.specs.data_spec import TaskDataReference
|
||||
from SpiffWorkflow.bpmn.parser.ValidationException import ValidationException
|
||||
|
||||
from tests.SpiffWorkflow.bpmn.BpmnWorkflowTestCase import BpmnWorkflowTestCase
|
||||
|
||||
|
||||
class BaseTestCase(BpmnWorkflowTestCase):
|
||||
|
||||
def set_io_and_run_workflow(self, data, data_input=None, data_output=None, save_restore=False):
|
||||
|
||||
start = self.workflow.get_tasks_from_spec_name('Start')[0]
|
||||
start.data = data
|
||||
|
||||
any_task = self.workflow.get_tasks_from_spec_name('any_task')[0]
|
||||
any_task.task_spec.data_input = TaskDataReference(data_input) if data_input is not None else None
|
||||
any_task.task_spec.data_output = TaskDataReference(data_output) if data_output is not None else None
|
||||
|
||||
self.workflow.do_engine_steps()
|
||||
ready_tasks = self.workflow.get_ready_user_tasks()
|
||||
self.assertEqual(len(ready_tasks), 3)
|
||||
while len(ready_tasks) > 0:
|
||||
task = ready_tasks[0]
|
||||
self.assertEqual(task.task_spec.name, 'any_task [child]')
|
||||
self.assertIn('input_item', task.data)
|
||||
task.data['output_item'] = task.data['input_item'] * 2
|
||||
task.complete()
|
||||
if save_restore:
|
||||
self.save_restore()
|
||||
ready_tasks = self.workflow.get_ready_user_tasks()
|
||||
self.workflow.refresh_waiting_tasks()
|
||||
self.workflow.do_engine_steps()
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
|
||||
def run_workflow_with_condition(self, data):
|
||||
|
||||
start = self.workflow.get_tasks_from_spec_name('Start')[0]
|
||||
start.data = data
|
||||
|
||||
task = self.workflow.get_tasks_from_spec_name('any_task')[0]
|
||||
task.task_spec.condition = "input_item == 2"
|
||||
|
||||
self.workflow.do_engine_steps()
|
||||
ready_tasks = self.workflow.get_ready_user_tasks()
|
||||
self.assertEqual(len(ready_tasks), 3)
|
||||
task = [t for t in ready_tasks if t.data['input_item'] == 2][0]
|
||||
task.data['output_item'] = task.data['input_item'] * 2
|
||||
task.complete()
|
||||
self.workflow.do_engine_steps()
|
||||
self.workflow.refresh_waiting_tasks()
|
||||
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
self.assertEqual(len([ t for t in ready_tasks if t.state == TaskState.CANCELLED]), 2)
|
||||
|
||||
|
||||
class ParallellMultiInstanceExistingOutputTest(BaseTestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.spec, subprocess = self.load_workflow_spec('parallel_multiinstance_loop_input.bpmn', 'main')
|
||||
self.workflow = BpmnWorkflow(self.spec)
|
||||
|
||||
def testListWithDictOutput(self):
|
||||
data = {
|
||||
'input_data': [1, 2, 3],
|
||||
'output_data': {},
|
||||
}
|
||||
self.set_io_and_run_workflow(data, data_input='input_data', data_output='output_data')
|
||||
self.assertDictEqual(self.workflow.data, {
|
||||
'input_data': [1, 2, 3],
|
||||
'output_data': {0: 2, 1: 4, 2: 6},
|
||||
})
|
||||
|
||||
def testDictWithListOutput(self):
|
||||
data = {
|
||||
'input_data': {'a': 1, 'b': 2, 'c': 3},
|
||||
'output_data': [],
|
||||
}
|
||||
self.set_io_and_run_workflow(data, data_input='input_data', data_output='output_data')
|
||||
self.assertDictEqual(self.workflow.data, {
|
||||
'input_data': {'a': 1, 'b': 2, 'c': 3},
|
||||
'output_data': [2, 4, 6],
|
||||
})
|
||||
|
||||
def testNonEmptyOutput(self):
|
||||
with self.assertRaises(WorkflowDataException) as exc:
|
||||
data = {
|
||||
'input_data': [1, 2, 3],
|
||||
'output_data': [1, 2, 3],
|
||||
}
|
||||
self.set_io_and_run_workflow(data, data_input='input_data', data_output='output_data')
|
||||
self.assertEqual(exc.exception.message,
|
||||
"If the input is not being updated in place, the output must be empty or it must be a map (dict)")
|
||||
|
||||
def testInvalidOutputType(self):
|
||||
with self.assertRaises(WorkflowDataException) as exc:
|
||||
data = {
|
||||
'input_data': set([1, 2, 3]),
|
||||
'output_data': set(),
|
||||
}
|
||||
self.set_io_and_run_workflow(data, data_input='input_data', data_output='output_data')
|
||||
self.assertEqual(exc.exception.message, "Only a mutable map (dict) or sequence (list) can be used for output")
|
||||
|
||||
|
||||
class ParallelMultiInstanceNewOutputTest(BaseTestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.spec, subprocess = self.load_workflow_spec('parallel_multiinstance_loop_input.bpmn', 'main')
|
||||
self.workflow = BpmnWorkflow(self.spec)
|
||||
|
||||
def testList(self):
|
||||
data = {'input_data': [1, 2, 3]}
|
||||
self.set_io_and_run_workflow(data, data_input='input_data', data_output='output_data')
|
||||
self.assertDictEqual(self.workflow.data, {
|
||||
'input_data': [1, 2, 3],
|
||||
'output_data': [2, 4, 6]
|
||||
})
|
||||
|
||||
def testListSaveRestore(self):
|
||||
data = {'input_data': [1, 2, 3]}
|
||||
self.set_io_and_run_workflow(data, data_input='input_data', data_output='output_data', save_restore=True)
|
||||
self.assertDictEqual(self.workflow.data, {
|
||||
'input_data': [1, 2, 3],
|
||||
'output_data': [2, 4, 6]
|
||||
})
|
||||
|
||||
def testDict(self):
|
||||
data = {'input_data': {'a': 1, 'b': 2, 'c': 3} }
|
||||
self.set_io_and_run_workflow(data, data_input='input_data', data_output='output_data')
|
||||
self.assertDictEqual(self.workflow.data, {
|
||||
'input_data': {'a': 1, 'b': 2, 'c': 3},
|
||||
'output_data': {'a': 2, 'b': 4, 'c': 6}
|
||||
})
|
||||
|
||||
def testDictSaveRestore(self):
|
||||
data = {'input_data': {'a': 1, 'b': 2, 'c': 3} }
|
||||
self.set_io_and_run_workflow(data, data_input='input_data', data_output='output_data', save_restore=True)
|
||||
self.assertDictEqual(self.workflow.data, {
|
||||
'input_data': {'a': 1, 'b': 2, 'c': 3},
|
||||
'output_data': {'a': 2, 'b': 4, 'c': 6}
|
||||
})
|
||||
|
||||
def testSet(self):
|
||||
data = {'input_data': set([1, 2, 3])}
|
||||
self.set_io_and_run_workflow(data, data_input='input_data', data_output='output_data')
|
||||
self.assertDictEqual(self.workflow.data, {
|
||||
'input_data': set([1, 2, 3]),
|
||||
'output_data': [2, 4, 6]
|
||||
})
|
||||
|
||||
def testEmptyCollection(self):
|
||||
|
||||
start = self.workflow.get_tasks_from_spec_name('Start')[0]
|
||||
start.data = {'input_data': []}
|
||||
self.workflow.do_engine_steps()
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
self.assertDictEqual(self.workflow.data, {'input_data': [], 'output_data': []})
|
||||
|
||||
def testCondition(self):
|
||||
self.run_workflow_with_condition({'input_data': [1, 2, 3]})
|
||||
self.assertDictEqual(self.workflow.data, {
|
||||
'input_data': [1, 2, 3],
|
||||
'output_data': [4]
|
||||
})
|
||||
|
||||
|
||||
class ParallelMultiInstanceUpdateInputTest(BaseTestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.spec, subprocess = self.load_workflow_spec('parallel_multiinstance_loop_input.bpmn', 'main')
|
||||
self.workflow = BpmnWorkflow(self.spec)
|
||||
|
||||
def testList(self):
|
||||
data = { 'input_data': [1, 2, 3]}
|
||||
self.set_io_and_run_workflow(data, data_input='input_data', data_output='input_data')
|
||||
self.assertDictEqual(self.workflow.data, {'input_data': [2, 4, 6]})
|
||||
|
||||
def testDict(self):
|
||||
data = { 'input_data': {'a': 1, 'b': 2, 'c': 3}}
|
||||
self.set_io_and_run_workflow(data, data_input='input_data', data_output='input_data')
|
||||
self.assertDictEqual(self.workflow.data, {'input_data': {'a': 2, 'b': 4, 'c': 6}})
|
||||
|
||||
|
||||
class ParallelMultiInstanceWithCardinality(BaseTestCase):
|
||||
|
||||
def setUp(self) -> None:
|
||||
self.spec, subprocess = self.load_workflow_spec('parallel_multiinstance_cardinality.bpmn', 'main')
|
||||
self.workflow = BpmnWorkflow(self.spec)
|
||||
|
||||
def testCardinality(self):
|
||||
self.set_io_and_run_workflow({}, data_output='output_data')
|
||||
self.assertDictEqual(self.workflow.data, {'output_data': [0, 2, 4]})
|
||||
|
||||
def testCardinalitySaveRestore(self):
|
||||
self.set_io_and_run_workflow({}, data_output='output_data', save_restore=True)
|
||||
self.assertDictEqual(self.workflow.data, {'output_data': [0, 2, 4]})
|
||||
|
||||
def testCondition(self):
|
||||
self.run_workflow_with_condition({})
|
||||
self.assertDictEqual(self.workflow.data, {
|
||||
'output_data': [4]
|
||||
})
|
||||
|
||||
|
||||
class ParallelMultiInstanceTaskTest(BpmnWorkflowTestCase):
|
||||
|
||||
def check_reference(self, reference, name):
|
||||
self.assertIsInstance(reference, TaskDataReference)
|
||||
self.assertEqual(reference.name, name)
|
||||
|
||||
def testParseInputOutput(self):
|
||||
spec, subprocess = self.load_workflow_spec('parallel_multiinstance_loop_input.bpmn', 'main')
|
||||
workflow = BpmnWorkflow(spec)
|
||||
task_spec = workflow.get_tasks_from_spec_name('any_task')[0].task_spec
|
||||
self.check_reference(task_spec.data_input, 'input_data')
|
||||
self.check_reference(task_spec.data_output, 'output_data')
|
||||
self.check_reference(task_spec.input_item, 'input_item')
|
||||
self.check_reference(task_spec.output_item, 'output_item')
|
||||
self.assertIsNone(task_spec.cardinality)
|
||||
|
||||
def testParseCardinality(self):
|
||||
spec, subprocess = self.load_workflow_spec('parallel_multiinstance_cardinality.bpmn', 'main')
|
||||
workflow = BpmnWorkflow(spec)
|
||||
task_spec = workflow.get_tasks_from_spec_name('any_task')[0].task_spec
|
||||
self.assertIsNone(task_spec.data_input)
|
||||
self.assertEqual(task_spec.cardinality, '3')
|
||||
|
||||
def testInvalidBpmn(self):
|
||||
with self.assertRaises(ValidationException) as exc:
|
||||
spec, subprocess = self.load_workflow_spec('parallel_multiinstance_invalid.bpmn', 'main')
|
||||
self.assertEqual(exc.exception.message,
|
||||
'A multiinstance task must specify exactly one of cardinality or loop input data reference.')
|
@ -1,16 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import os
|
||||
import unittest
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', '..'))
|
||||
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
from tests.SpiffWorkflow.bpmn.BpmnWorkflowTestCase import BpmnWorkflowTestCase
|
||||
|
||||
__author__ = 'matth'
|
||||
|
||||
|
||||
class MultiInstanceTest(BpmnWorkflowTestCase):
|
||||
class ParallelOrderTest(BpmnWorkflowTestCase):
|
||||
"""The example bpmn diagram has a 4 parallel workflows, this
|
||||
verifies that the parallel tasks have a natural order that follows
|
||||
the visual layout of the diagram, rather than just the order in which
|
||||
@ -33,6 +29,6 @@ class MultiInstanceTest(BpmnWorkflowTestCase):
|
||||
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromTestCase(MultiInstanceTest)
|
||||
return unittest.TestLoader().loadTestsFromTestCase(ParallelOrderTest)
|
||||
if __name__ == '__main__':
|
||||
unittest.TextTestRunner(verbosity=2).run(suite())
|
||||
|
@ -1,25 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
|
||||
import unittest
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
from tests.SpiffWorkflow.bpmn.BpmnWorkflowTestCase import BpmnWorkflowTestCase
|
||||
|
||||
__author__ = 'leashys'
|
||||
|
||||
|
||||
class ParallelWithScriptTest(BpmnWorkflowTestCase):
|
||||
|
||||
def setUp(self):
|
||||
spec, subprocesses = self.load_workflow_spec('ParallelWithScript.bpmn', 'ParallelWithScript')
|
||||
self.workflow = BpmnWorkflow(spec, subprocesses)
|
||||
|
||||
def testRunThroughParallel(self):
|
||||
self.workflow.do_engine_steps()
|
||||
# TODO: what to assert here?
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromTestCase(ParallelWithScriptTest)
|
||||
if __name__ == '__main__':
|
||||
unittest.TextTestRunner(verbosity=2).run(suite())
|
@ -13,8 +13,8 @@ class ParserTest(unittest.TestCase):
|
||||
bpmn_file = os.path.join(os.path.dirname(__file__), 'data', 'io_spec.bpmn')
|
||||
parser.add_bpmn_file(bpmn_file)
|
||||
spec = parser.get_spec('subprocess')
|
||||
self.assertEqual(len(spec.data_inputs), 2)
|
||||
self.assertEqual(len(spec.data_outputs), 2)
|
||||
self.assertEqual(len(spec.io_specification.data_inputs), 2)
|
||||
self.assertEqual(len(spec.io_specification.data_outputs), 2)
|
||||
|
||||
def testDataReferences(self):
|
||||
|
||||
|
28
tests/SpiffWorkflow/bpmn/ResetTimerTest.py
Normal file
28
tests/SpiffWorkflow/bpmn/ResetTimerTest.py
Normal file
@ -0,0 +1,28 @@
|
||||
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
from SpiffWorkflow.task import TaskState
|
||||
|
||||
from tests.SpiffWorkflow.bpmn.BpmnWorkflowTestCase import BpmnWorkflowTestCase
|
||||
|
||||
class ResetTimerTest(BpmnWorkflowTestCase):
|
||||
|
||||
def test_timer(self):
|
||||
spec, subprocess = self.load_workflow_spec('reset_timer.bpmn', 'main')
|
||||
self.workflow = BpmnWorkflow(spec, subprocess)
|
||||
self.workflow.do_engine_steps()
|
||||
task_1 = self.workflow.get_tasks_from_spec_name('task_1')[0]
|
||||
timer = self.workflow.get_tasks_from_spec_name('timer')[0]
|
||||
original_timer = timer.internal_data.get('event_value')
|
||||
# This returns us to the task
|
||||
task_1.data['modify'] = True
|
||||
task_1.complete()
|
||||
self.workflow.do_engine_steps()
|
||||
# The timer should be waiting and the time should have been updated
|
||||
self.assertEqual(task_1.state, TaskState.READY)
|
||||
self.assertEqual(timer.state, TaskState.WAITING)
|
||||
self.assertGreater(timer.internal_data.get('event_value'), original_timer)
|
||||
task_1.data['modify'] = False
|
||||
task_1.complete()
|
||||
self.workflow.do_engine_steps()
|
||||
self.assertEqual(timer.state, TaskState.CANCELLED)
|
||||
self.assertTrue(self.workflow.is_completed())
|
213
tests/SpiffWorkflow/bpmn/SequentialMultiInstanceTest.py
Normal file
213
tests/SpiffWorkflow/bpmn/SequentialMultiInstanceTest.py
Normal file
@ -0,0 +1,213 @@
|
||||
from SpiffWorkflow.task import TaskState
|
||||
from SpiffWorkflow.bpmn.exceptions import WorkflowDataException
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
from SpiffWorkflow.bpmn.specs.data_spec import TaskDataReference
|
||||
|
||||
from tests.SpiffWorkflow.bpmn.BpmnWorkflowTestCase import BpmnWorkflowTestCase
|
||||
|
||||
|
||||
class BaseTestCase(BpmnWorkflowTestCase):
|
||||
|
||||
def set_io_and_run_workflow(self, data, data_input=None, data_output=None, save_restore=False):
|
||||
|
||||
start = self.workflow.get_tasks_from_spec_name('Start')[0]
|
||||
start.data = data
|
||||
|
||||
any_task = self.workflow.get_tasks_from_spec_name('any_task')[0]
|
||||
any_task.task_spec.data_input = TaskDataReference(data_input) if data_input is not None else None
|
||||
any_task.task_spec.data_output = TaskDataReference(data_output) if data_output is not None else None
|
||||
|
||||
self.workflow.do_engine_steps()
|
||||
self.workflow.refresh_waiting_tasks()
|
||||
ready_tasks = self.workflow.get_ready_user_tasks()
|
||||
|
||||
while len(ready_tasks) > 0:
|
||||
self.assertEqual(len(ready_tasks), 1)
|
||||
task = ready_tasks[0]
|
||||
self.assertEqual(task.task_spec.name, 'any_task [child]')
|
||||
self.assertIn('input_item', task.data)
|
||||
task.data['output_item'] = task.data['input_item'] * 2
|
||||
task.complete()
|
||||
if save_restore:
|
||||
self.save_restore()
|
||||
ready_tasks = self.workflow.get_ready_user_tasks()
|
||||
|
||||
self.workflow.do_engine_steps()
|
||||
children = self.workflow.get_tasks_from_spec_name('any_task [child]')
|
||||
self.assertEqual(len(children), 3)
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
|
||||
def run_workflow_with_condition(self, data, condition):
|
||||
|
||||
start = self.workflow.get_tasks_from_spec_name('Start')[0]
|
||||
start.data = data
|
||||
|
||||
task = self.workflow.get_tasks_from_spec_name('any_task')[0]
|
||||
task.task_spec.condition = condition
|
||||
|
||||
self.workflow.do_engine_steps()
|
||||
self.workflow.refresh_waiting_tasks()
|
||||
ready_tasks = self.workflow.get_ready_user_tasks()
|
||||
|
||||
while len(ready_tasks) > 0:
|
||||
ready = ready_tasks[0]
|
||||
self.assertEqual(ready.task_spec.name, 'any_task [child]')
|
||||
self.assertIn('input_item', ready.data)
|
||||
ready.data['output_item'] = ready.data['input_item'] * 2
|
||||
ready.complete()
|
||||
self.workflow.do_engine_steps()
|
||||
self.workflow.refresh_waiting_tasks()
|
||||
ready_tasks = self.workflow.get_ready_user_tasks()
|
||||
|
||||
self.workflow.do_engine_steps()
|
||||
children = self.workflow.get_tasks_from_spec_name('any_task [child]')
|
||||
self.assertEqual(len(children), 2)
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
|
||||
|
||||
class SequentialMultiInstanceExistingOutputTest(BaseTestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.spec, subprocess = self.load_workflow_spec('sequential_multiinstance_loop_input.bpmn', 'main')
|
||||
self.workflow = BpmnWorkflow(self.spec)
|
||||
|
||||
def testListWithDictOutput(self):
|
||||
data = {
|
||||
'input_data': [1, 2, 3],
|
||||
'output_data': {},
|
||||
}
|
||||
self.set_io_and_run_workflow(data, data_input='input_data', data_output='output_data')
|
||||
self.assertDictEqual(self.workflow.data, {
|
||||
'input_data': [1, 2, 3],
|
||||
'output_data': {0: 2, 1: 4, 2: 6},
|
||||
})
|
||||
|
||||
def testDictWithListOutput(self):
|
||||
data = {
|
||||
'input_data': {'a': 1, 'b': 2, 'c': 3},
|
||||
'output_data': [],
|
||||
}
|
||||
self.set_io_and_run_workflow(data, data_input='input_data', data_output='output_data')
|
||||
self.assertDictEqual(self.workflow.data, {
|
||||
'input_data': {'a': 1, 'b': 2, 'c': 3},
|
||||
'output_data': [2, 4, 6],
|
||||
})
|
||||
|
||||
def testNonEmptyOutput(self):
|
||||
with self.assertRaises(WorkflowDataException) as exc:
|
||||
data = {
|
||||
'input_data': [1, 2, 3],
|
||||
'output_data': [1, 2, 3],
|
||||
}
|
||||
self.set_io_and_run_workflow(data, data_input='input_data', data_output='output_data')
|
||||
self.assertEqual(exc.exception.message,
|
||||
"If the input is not being updated in place, the output must be empty or it must be a map (dict)")
|
||||
|
||||
def testInvalidOutputType(self):
|
||||
with self.assertRaises(WorkflowDataException) as exc:
|
||||
data = {
|
||||
'input_data': set([1, 2, 3]),
|
||||
'output_data': set(),
|
||||
}
|
||||
self.set_io_and_run_workflow(data, data_input='input_data', data_output='output_data')
|
||||
self.assertEqual(exc.exception.message, "Only a mutable map (dict) or sequence (list) can be used for output")
|
||||
|
||||
|
||||
class SequentialMultiInstanceNewOutputTest(BaseTestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.spec, subprocess = self.load_workflow_spec('sequential_multiinstance_loop_input.bpmn', 'main')
|
||||
self.workflow = BpmnWorkflow(self.spec)
|
||||
|
||||
def testList(self):
|
||||
data = {'input_data': [1, 2, 3]}
|
||||
self.set_io_and_run_workflow(data, data_input='input_data', data_output='output_data')
|
||||
self.assertDictEqual(self.workflow.data, {
|
||||
'input_data': [1, 2, 3],
|
||||
'output_data': [2, 4, 6]
|
||||
})
|
||||
|
||||
def testListSaveRestore(self):
|
||||
data = {'input_data': [1, 2, 3]}
|
||||
self.set_io_and_run_workflow(data, data_input='input_data', data_output='output_data', save_restore=True)
|
||||
self.assertDictEqual(self.workflow.data, {
|
||||
'input_data': [1, 2, 3],
|
||||
'output_data': [2, 4, 6]
|
||||
})
|
||||
|
||||
def testDict(self):
|
||||
data = {'input_data': {'a': 1, 'b': 2, 'c': 3} }
|
||||
self.set_io_and_run_workflow(data, data_input='input_data', data_output='output_data')
|
||||
self.assertDictEqual(self.workflow.data, {
|
||||
'input_data': {'a': 1, 'b': 2, 'c': 3},
|
||||
'output_data': {'a': 2, 'b': 4, 'c': 6}
|
||||
})
|
||||
|
||||
def testDictSaveRestore(self):
|
||||
data = {'input_data': {'a': 1, 'b': 2, 'c': 3} }
|
||||
self.set_io_and_run_workflow(data, data_input='input_data', data_output='output_data', save_restore=True)
|
||||
self.assertDictEqual(self.workflow.data, {
|
||||
'input_data': {'a': 1, 'b': 2, 'c': 3},
|
||||
'output_data': {'a': 2, 'b': 4, 'c': 6}
|
||||
})
|
||||
|
||||
def testSet(self):
|
||||
data = {'input_data': set([1, 2, 3])}
|
||||
self.set_io_and_run_workflow(data, data_input='input_data', data_output='output_data')
|
||||
self.assertDictEqual(self.workflow.data, {
|
||||
'input_data': set([1, 2, 3]),
|
||||
'output_data': [2, 4, 6]
|
||||
})
|
||||
|
||||
def testEmptyCollection(self):
|
||||
|
||||
start = self.workflow.get_tasks_from_spec_name('Start')[0]
|
||||
start.data = {'input_data': []}
|
||||
self.workflow.do_engine_steps()
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
self.assertDictEqual(self.workflow.data, {'input_data': [], 'output_data': []})
|
||||
|
||||
def testCondition(self):
|
||||
self.run_workflow_with_condition({'input_data': [1, 2, 3]}, "input_item == 2")
|
||||
self.assertDictEqual(self.workflow.data, {
|
||||
'input_data': [1, 2, 3],
|
||||
'output_data': [2, 4]
|
||||
})
|
||||
|
||||
|
||||
class SequentialMultiInstanceUpdateInputTest(BaseTestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.spec, subprocess = self.load_workflow_spec('sequential_multiinstance_loop_input.bpmn', 'main')
|
||||
self.workflow = BpmnWorkflow(self.spec)
|
||||
|
||||
def testList(self):
|
||||
data = { 'input_data': [1, 2, 3]}
|
||||
self.set_io_and_run_workflow(data, data_input='input_data', data_output='input_data')
|
||||
self.assertDictEqual(self.workflow.data, {'input_data': [2, 4, 6]})
|
||||
|
||||
def testDict(self):
|
||||
data = { 'input_data': {'a': 1, 'b': 2, 'c': 3}}
|
||||
self.set_io_and_run_workflow(data, data_input='input_data', data_output='input_data')
|
||||
self.assertDictEqual(self.workflow.data, {'input_data': {'a': 2, 'b': 4, 'c': 6}})
|
||||
|
||||
|
||||
class SequentialMultiInstanceWithCardinality(BaseTestCase):
|
||||
|
||||
def setUp(self) -> None:
|
||||
self.spec, subprocess = self.load_workflow_spec('sequential_multiinstance_cardinality.bpmn', 'main')
|
||||
self.workflow = BpmnWorkflow(self.spec)
|
||||
|
||||
def testCardinality(self):
|
||||
self.set_io_and_run_workflow({}, data_output='output_data')
|
||||
self.assertDictEqual(self.workflow.data, {'output_data': [0, 2, 4]})
|
||||
|
||||
def testCardinalitySaveRestore(self):
|
||||
self.set_io_and_run_workflow({}, data_output='output_data', save_restore=True)
|
||||
self.assertDictEqual(self.workflow.data, {'output_data': [0, 2, 4]})
|
||||
|
||||
def testCondition(self):
|
||||
self.run_workflow_with_condition({}, "input_item == 1")
|
||||
self.assertDictEqual(self.workflow.data, {
|
||||
'output_data': [0, 2]
|
||||
})
|
62
tests/SpiffWorkflow/bpmn/StandardLoopTest.py
Normal file
62
tests/SpiffWorkflow/bpmn/StandardLoopTest.py
Normal file
@ -0,0 +1,62 @@
|
||||
import os
|
||||
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
from SpiffWorkflow.bpmn.parser.BpmnParser import BpmnParser, ValidationException
|
||||
from .BpmnWorkflowTestCase import BpmnWorkflowTestCase
|
||||
|
||||
class StandardLoopTest(BpmnWorkflowTestCase):
|
||||
|
||||
def setUp(self):
|
||||
spec, subprocesses = self.load_workflow_spec('standard_loop.bpmn','main', validate=False)
|
||||
# This spec has a loop task with loopMaximum = 3 and loopCondition = 'done'
|
||||
self.workflow = BpmnWorkflow(spec, subprocesses)
|
||||
|
||||
def testLoopMaximum(self):
|
||||
|
||||
start = self.workflow.get_tasks_from_spec_name('StartEvent_1')
|
||||
start[0].data['done'] = False
|
||||
for idx in range(3):
|
||||
self.workflow.do_engine_steps()
|
||||
self.workflow.refresh_waiting_tasks()
|
||||
ready_tasks = self.workflow.get_ready_user_tasks()
|
||||
self.assertEqual(len(ready_tasks), 1)
|
||||
ready_tasks[0].data[str(idx)] = True
|
||||
ready_tasks[0].complete()
|
||||
|
||||
self.workflow.do_engine_steps()
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
|
||||
def testLoopCondition(self):
|
||||
|
||||
start = self.workflow.get_tasks_from_spec_name('StartEvent_1')
|
||||
start[0].data['done'] = False
|
||||
|
||||
self.workflow.do_engine_steps()
|
||||
self.workflow.refresh_waiting_tasks()
|
||||
ready_tasks = self.workflow.get_ready_user_tasks()
|
||||
self.assertEqual(len(ready_tasks), 1)
|
||||
ready_tasks[0].data['done'] = True
|
||||
ready_tasks[0].complete()
|
||||
|
||||
self.workflow.do_engine_steps()
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
|
||||
def testSkipLoop(self):
|
||||
|
||||
# This is called "skip loop" because I thought "testTestBefore" was a terrible name
|
||||
start = self.workflow.get_tasks_from_spec_name('StartEvent_1')
|
||||
start[0].data['done'] = True
|
||||
self.workflow.do_engine_steps()
|
||||
self.workflow.refresh_waiting_tasks()
|
||||
self.workflow.do_engine_steps()
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
|
||||
|
||||
class ParseStandardLoop(BpmnWorkflowTestCase):
|
||||
|
||||
def testParseStandardLoop(self):
|
||||
parser = BpmnParser()
|
||||
# This process has neither a loop condition nor a loop maximum
|
||||
bpmn_file = os.path.join(os.path.dirname(__file__), 'data', 'standard_loop_invalid.bpmn')
|
||||
parser.add_bpmn_file(bpmn_file)
|
||||
self.assertRaises(ValidationException, parser.get_spec, 'main')
|
@ -1,51 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import unittest
|
||||
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
from tests.SpiffWorkflow.bpmn.BpmnWorkflowTestCase import BpmnWorkflowTestCase
|
||||
|
||||
__author__ = 'matth'
|
||||
|
||||
|
||||
class SubWorkflowMultiTest(BpmnWorkflowTestCase):
|
||||
|
||||
expected_data = {
|
||||
'a': {'name': 'Apple_edit',
|
||||
'new_info': 'Adding this!'},
|
||||
'b': {'name': 'Bubble_edit',
|
||||
'new_info': 'Adding this!'},
|
||||
'c': {'name': 'Crap, I should write better code_edit',
|
||||
'new_info': 'Adding this!'}
|
||||
}
|
||||
|
||||
def testSequential(self):
|
||||
spec, subprocesses = self.load_workflow_spec('sub_workflow_multi.bpmn', 'ScriptTest')
|
||||
self.workflow = BpmnWorkflow(spec, subprocesses)
|
||||
self.workflow.do_engine_steps()
|
||||
|
||||
data = self.workflow.last_task.data
|
||||
self.assertEqual(data['my_collection'], self.expected_data)
|
||||
|
||||
def testParallel(self):
|
||||
spec, subprocesses= self.load_workflow_spec('sub_workflow_multi_parallel.bpmn', 'ScriptTest')
|
||||
self.workflow = BpmnWorkflow(spec, subprocesses)
|
||||
self.workflow.do_engine_steps()
|
||||
|
||||
data = self.workflow.last_task.data
|
||||
self.assertEqual(data['my_collection'], self.expected_data)
|
||||
|
||||
def testWrapped(self):
|
||||
spec, subprocesses = self.load_workflow_spec('sub_within_sub_multi.bpmn', 'ScriptTest')
|
||||
self.workflow = BpmnWorkflow(spec, subprocesses)
|
||||
self.workflow.do_engine_steps()
|
||||
|
||||
data = self.workflow.last_task.data
|
||||
self.assertEqual(self.expected_data, data['my_collection'])
|
||||
|
||||
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromTestCase(SubWorkflowMultiTest)
|
||||
if __name__ == '__main__':
|
||||
unittest.TextTestRunner(verbosity=2).run(suite())
|
@ -1,59 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_17fwemw" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.7.0">
|
||||
<bpmn:process id="MultiInstance" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1" name="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0t6p1sb</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0t6p1sb" sourceRef="StartEvent_1" targetRef="Activity_088tnzu" />
|
||||
<bpmn:endEvent id="Event_End" name="Event_End">
|
||||
<bpmn:incoming>Flow_0ugjw69</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0ugjw69" sourceRef="Activity_Loop" targetRef="Event_End" />
|
||||
<bpmn:userTask id="Activity_Loop" name="Activity_Loop">
|
||||
<bpmn:incoming>Flow_0ds4mp0</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0ugjw69</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics>
|
||||
<bpmn:loopCardinality xsi:type="bpmn:tFormalExpression">collection</bpmn:loopCardinality>
|
||||
</bpmn:multiInstanceLoopCharacteristics>
|
||||
</bpmn:userTask>
|
||||
<bpmn:task id="Activity_088tnzu" name="Setup">
|
||||
<bpmn:incoming>Flow_0t6p1sb</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0ds4mp0</bpmn:outgoing>
|
||||
</bpmn:task>
|
||||
<bpmn:sequenceFlow id="Flow_0ds4mp0" sourceRef="Activity_088tnzu" targetRef="Activity_Loop" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="MultiInstance">
|
||||
<bpmndi:BPMNEdge id="Flow_0ugjw69_di" bpmnElement="Flow_0ugjw69">
|
||||
<di:waypoint x="480" y="117" />
|
||||
<di:waypoint x="582" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0t6p1sb_di" bpmnElement="Flow_0t6p1sb">
|
||||
<di:waypoint x="208" y="117" />
|
||||
<di:waypoint x="230" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Event_1g0pmib_di" bpmnElement="Event_End">
|
||||
<dc:Bounds x="582" y="99" width="36" height="36" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="575" y="142" width="54" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="172" y="99" width="36" height="36" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="159" y="142" width="64" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1iyilui_di" bpmnElement="Activity_Loop">
|
||||
<dc:Bounds x="380" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_088tnzu_di" bpmnElement="Activity_088tnzu">
|
||||
<dc:Bounds x="230" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_0ds4mp0_di" bpmnElement="Flow_0ds4mp0">
|
||||
<di:waypoint x="330" y="117" />
|
||||
<di:waypoint x="380" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -1,145 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_17fwemw" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.11.1">
|
||||
<bpmn:process id="MultiInstance" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1" name="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0t6p1sb</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0t6p1sb" sourceRef="StartEvent_1" targetRef="Activity_088tnzu" />
|
||||
<bpmn:endEvent id="Event_End" name="Event_End">
|
||||
<bpmn:incoming>Flow_0ugjw69</bpmn:incoming>
|
||||
<bpmn:incoming>Flow_1oo4mpj</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0ugjw69" sourceRef="Activity_Loop" targetRef="Event_End" />
|
||||
<bpmn:userTask id="Activity_Loop" name="Activity_Loop">
|
||||
<bpmn:incoming>Flow_0u92n7b</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0ugjw69</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics camunda:collection="collection" camunda:elementVariable="x" />
|
||||
</bpmn:userTask>
|
||||
<bpmn:task id="Activity_088tnzu" name="Setup">
|
||||
<bpmn:incoming>Flow_0t6p1sb</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0ds4mp0</bpmn:outgoing>
|
||||
</bpmn:task>
|
||||
<bpmn:sequenceFlow id="Flow_0ds4mp0" sourceRef="Activity_088tnzu" targetRef="Gateway_08wnx3s" />
|
||||
<bpmn:exclusiveGateway id="Gateway_07go3pk" name="Filled Collection" default="Flow_0u92n7b">
|
||||
<bpmn:incoming>Flow_1sx7n9u</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1oo4mpj</bpmn:outgoing>
|
||||
<bpmn:outgoing>Flow_0u92n7b</bpmn:outgoing>
|
||||
</bpmn:exclusiveGateway>
|
||||
<bpmn:sequenceFlow id="Flow_1oo4mpj" name="EmptyCollection" sourceRef="Gateway_07go3pk" targetRef="Event_End">
|
||||
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">len(collection.keys())==0</bpmn:conditionExpression>
|
||||
</bpmn:sequenceFlow>
|
||||
<bpmn:sequenceFlow id="Flow_0u92n7b" name="Default" sourceRef="Gateway_07go3pk" targetRef="Activity_Loop" />
|
||||
<bpmn:sequenceFlow id="Flow_0io0g18" sourceRef="Activity_0flre28" targetRef="Gateway_1cn7vsp" />
|
||||
<bpmn:exclusiveGateway id="Gateway_08wnx3s" name="Always skip" default="Flow_1dah8xt">
|
||||
<bpmn:incoming>Flow_0ds4mp0</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1dah8xt</bpmn:outgoing>
|
||||
<bpmn:outgoing>Flow_0i1bv5g</bpmn:outgoing>
|
||||
</bpmn:exclusiveGateway>
|
||||
<bpmn:sequenceFlow id="Flow_1dah8xt" name="Flow A" sourceRef="Gateway_08wnx3s" targetRef="Activity_0flre28" />
|
||||
<bpmn:manualTask id="Activity_0flre28" name="Do something">
|
||||
<bpmn:incoming>Flow_1dah8xt</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0io0g18</bpmn:outgoing>
|
||||
</bpmn:manualTask>
|
||||
<bpmn:exclusiveGateway id="Gateway_1cn7vsp" default="Flow_1sx7n9u">
|
||||
<bpmn:incoming>Flow_0io0g18</bpmn:incoming>
|
||||
<bpmn:incoming>Flow_0i1bv5g</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1sx7n9u</bpmn:outgoing>
|
||||
</bpmn:exclusiveGateway>
|
||||
<bpmn:sequenceFlow id="Flow_1sx7n9u" sourceRef="Gateway_1cn7vsp" targetRef="Gateway_07go3pk" />
|
||||
<bpmn:sequenceFlow id="Flow_0i1bv5g" name="Flow B" sourceRef="Gateway_08wnx3s" targetRef="Gateway_1cn7vsp">
|
||||
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">1==1</bpmn:conditionExpression>
|
||||
</bpmn:sequenceFlow>
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="MultiInstance">
|
||||
<bpmndi:BPMNEdge id="Flow_0i1bv5g_di" bpmnElement="Flow_0i1bv5g">
|
||||
<di:waypoint x="370" y="142" />
|
||||
<di:waypoint x="370" y="280" />
|
||||
<di:waypoint x="560" y="280" />
|
||||
<di:waypoint x="560" y="142" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="448" y="262" width="34" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1sx7n9u_di" bpmnElement="Flow_1sx7n9u">
|
||||
<di:waypoint x="585" y="117" />
|
||||
<di:waypoint x="615" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1dah8xt_di" bpmnElement="Flow_1dah8xt">
|
||||
<di:waypoint x="395" y="117" />
|
||||
<di:waypoint x="430" y="117" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="395" y="99" width="35" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0io0g18_di" bpmnElement="Flow_0io0g18">
|
||||
<di:waypoint x="530" y="117" />
|
||||
<di:waypoint x="535" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0u92n7b_di" bpmnElement="Flow_0u92n7b">
|
||||
<di:waypoint x="665" y="117" />
|
||||
<di:waypoint x="710" y="117" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="670" y="99" width="35" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1oo4mpj_di" bpmnElement="Flow_1oo4mpj">
|
||||
<di:waypoint x="640" y="142" />
|
||||
<di:waypoint x="640" y="330" />
|
||||
<di:waypoint x="930" y="330" />
|
||||
<di:waypoint x="930" y="135" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="745" y="312" width="80" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0ds4mp0_di" bpmnElement="Flow_0ds4mp0">
|
||||
<di:waypoint x="330" y="117" />
|
||||
<di:waypoint x="345" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0ugjw69_di" bpmnElement="Flow_0ugjw69">
|
||||
<di:waypoint x="810" y="117" />
|
||||
<di:waypoint x="912" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0t6p1sb_di" bpmnElement="Flow_0t6p1sb">
|
||||
<di:waypoint x="208" y="117" />
|
||||
<di:waypoint x="230" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="172" y="99" width="36" height="36" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="159" y="142" width="64" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_1g0pmib_di" bpmnElement="Event_End">
|
||||
<dc:Bounds x="912" y="99" width="36" height="36" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="903" y="75" width="54" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1iyilui_di" bpmnElement="Activity_Loop">
|
||||
<dc:Bounds x="710" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_088tnzu_di" bpmnElement="Activity_088tnzu">
|
||||
<dc:Bounds x="230" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Gateway_07go3pk_di" bpmnElement="Gateway_07go3pk" isMarkerVisible="true">
|
||||
<dc:Bounds x="615" y="92" width="50" height="50" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="602" y="62" width="78" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Gateway_08wnx3s_di" bpmnElement="Gateway_08wnx3s" isMarkerVisible="true">
|
||||
<dc:Bounds x="345" y="92" width="50" height="50" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="341" y="62" width="58" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_0ow7pu7_di" bpmnElement="Activity_0flre28">
|
||||
<dc:Bounds x="430" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Gateway_1cn7vsp_di" bpmnElement="Gateway_1cn7vsp" isMarkerVisible="true">
|
||||
<dc:Bounds x="535" y="92" width="50" height="50" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -1,117 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_196qfv1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.0.0">
|
||||
<bpmn:process id="ParallelWithScript" name="A" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_1swtnkk</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:sequenceFlow id="Flow_1swtnkk" sourceRef="StartEvent_1" targetRef="Gateway_1" />
|
||||
<bpmn:sequenceFlow id="Flow_1ukvcj0" sourceRef="Gateway_1" targetRef="user_task_A" />
|
||||
<bpmn:sequenceFlow id="Flow_188f01l" sourceRef="Gateway_1" targetRef="user_task_B" />
|
||||
<bpmn:sequenceFlow id="Flow_1empxbr" sourceRef="Gateway_1" targetRef="script_task_C" />
|
||||
<bpmn:sequenceFlow id="Flow_1m1yz1x" sourceRef="script_task_C" targetRef="user_task_C" />
|
||||
<bpmn:sequenceFlow id="Flow_0ykkbts" sourceRef="user_task_B" targetRef="Gateway_2" />
|
||||
<bpmn:sequenceFlow id="Flow_0lmf2gd" sourceRef="user_task_A" targetRef="Gateway_2" />
|
||||
<bpmn:sequenceFlow id="Flow_0954wrk" sourceRef="user_task_C" targetRef="Gateway_2" />
|
||||
<bpmn:scriptTask id="script_task_C" name="Script">
|
||||
<bpmn:incoming>Flow_1empxbr</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1m1yz1x</bpmn:outgoing>
|
||||
<bpmn:script># do nothing</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:endEvent id="Event_0exe5n0">
|
||||
<bpmn:incoming>Flow_04k0ue9</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_04k0ue9" sourceRef="Gateway_2" targetRef="Event_0exe5n0" />
|
||||
<bpmn:parallelGateway id="Gateway_1">
|
||||
<bpmn:incoming>Flow_1swtnkk</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1ukvcj0</bpmn:outgoing>
|
||||
<bpmn:outgoing>Flow_188f01l</bpmn:outgoing>
|
||||
<bpmn:outgoing>Flow_1empxbr</bpmn:outgoing>
|
||||
</bpmn:parallelGateway>
|
||||
<bpmn:parallelGateway id="Gateway_2">
|
||||
<bpmn:incoming>Flow_0ykkbts</bpmn:incoming>
|
||||
<bpmn:incoming>Flow_0lmf2gd</bpmn:incoming>
|
||||
<bpmn:incoming>Flow_0954wrk</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_04k0ue9</bpmn:outgoing>
|
||||
</bpmn:parallelGateway>
|
||||
<bpmn:manualTask id="user_task_A" name="Task A">
|
||||
<bpmn:incoming>Flow_1ukvcj0</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0lmf2gd</bpmn:outgoing>
|
||||
</bpmn:manualTask>
|
||||
<bpmn:manualTask id="user_task_B" name="Task B">
|
||||
<bpmn:incoming>Flow_188f01l</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0ykkbts</bpmn:outgoing>
|
||||
</bpmn:manualTask>
|
||||
<bpmn:manualTask id="user_task_C" name="Task C">
|
||||
<bpmn:incoming>Flow_1m1yz1x</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0954wrk</bpmn:outgoing>
|
||||
</bpmn:manualTask>
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ParallelWithScript">
|
||||
<bpmndi:BPMNEdge id="Flow_1swtnkk_di" bpmnElement="Flow_1swtnkk">
|
||||
<di:waypoint x="188" y="117" />
|
||||
<di:waypoint x="435" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1ukvcj0_di" bpmnElement="Flow_1ukvcj0">
|
||||
<di:waypoint x="485" y="117" />
|
||||
<di:waypoint x="640" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_188f01l_di" bpmnElement="Flow_188f01l">
|
||||
<di:waypoint x="460" y="142" />
|
||||
<di:waypoint x="460" y="230" />
|
||||
<di:waypoint x="640" y="230" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1empxbr_di" bpmnElement="Flow_1empxbr">
|
||||
<di:waypoint x="460" y="142" />
|
||||
<di:waypoint x="460" y="340" />
|
||||
<di:waypoint x="510" y="340" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1m1yz1x_di" bpmnElement="Flow_1m1yz1x">
|
||||
<di:waypoint x="610" y="340" />
|
||||
<di:waypoint x="640" y="340" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0ykkbts_di" bpmnElement="Flow_0ykkbts">
|
||||
<di:waypoint x="740" y="230" />
|
||||
<di:waypoint x="865" y="230" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0lmf2gd_di" bpmnElement="Flow_0lmf2gd">
|
||||
<di:waypoint x="740" y="117" />
|
||||
<di:waypoint x="890" y="117" />
|
||||
<di:waypoint x="890" y="205" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0954wrk_di" bpmnElement="Flow_0954wrk">
|
||||
<di:waypoint x="740" y="340" />
|
||||
<di:waypoint x="890" y="340" />
|
||||
<di:waypoint x="890" y="255" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_04k0ue9_di" bpmnElement="Flow_04k0ue9">
|
||||
<di:waypoint x="915" y="230" />
|
||||
<di:waypoint x="1052" y="230" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Event_0exe5n0_di" bpmnElement="Event_0exe5n0">
|
||||
<dc:Bounds x="1052" y="212" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Gateway_1f2ua0v_di" bpmnElement="Gateway_1">
|
||||
<dc:Bounds x="435" y="92" width="50" height="50" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Gateway_06epsj9_di" bpmnElement="Gateway_2">
|
||||
<dc:Bounds x="865" y="205" width="50" height="50" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1uxd70j_di" bpmnElement="user_task_A">
|
||||
<dc:Bounds x="640" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1cr04li_di" bpmnElement="user_task_B">
|
||||
<dc:Bounds x="640" y="190" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_0ze74eq_di" bpmnElement="script_task_C">
|
||||
<dc:Bounds x="510" y="300" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1mznorb_di" bpmnElement="user_task_C">
|
||||
<dc:Bounds x="640" y="300" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="152" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -1,47 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_0lhdj7m" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.7.0">
|
||||
<bpmn:process id="LoopTaskTest" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0q33jmj</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:userTask id="Activity_TestLoop" name="Loop till user says we are done" camunda:formKey="LoopForm">
|
||||
<bpmn:documentation>Enter Name for member {{ Activity_TestLoop_CurrentVar }}</bpmn:documentation>
|
||||
<bpmn:extensionElements>
|
||||
<camunda:formData>
|
||||
<camunda:formField id="FormField_FirstName" label="Enter First Name" type="string" />
|
||||
</camunda:formData>
|
||||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>Flow_0q33jmj</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_13213ce</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics isSequential="true">
|
||||
<bpmn:loopCardinality xsi:type="bpmn:tFormalExpression">5</bpmn:loopCardinality>
|
||||
</bpmn:multiInstanceLoopCharacteristics>
|
||||
</bpmn:userTask>
|
||||
<bpmn:sequenceFlow id="Flow_0q33jmj" sourceRef="StartEvent_1" targetRef="Activity_TestLoop" />
|
||||
<bpmn:endEvent id="Event_0l4x230">
|
||||
<bpmn:incoming>Flow_13213ce</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_13213ce" sourceRef="Activity_TestLoop" targetRef="Event_0l4x230" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="LoopTaskTest">
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_0kugfe7_di" bpmnElement="Activity_TestLoop">
|
||||
<dc:Bounds x="270" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_0q33jmj_di" bpmnElement="Flow_0q33jmj">
|
||||
<di:waypoint x="215" y="117" />
|
||||
<di:waypoint x="270" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Event_1tmau7e_di" bpmnElement="Event_0l4x230">
|
||||
<dc:Bounds x="472" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_13213ce_di" bpmnElement="Flow_13213ce">
|
||||
<di:waypoint x="370" y="117" />
|
||||
<di:waypoint x="472" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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_0lhdj7m" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.7.0">
|
||||
<bpmn:process id="LoopTaskTest" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0q33jmj</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:userTask id="Activity_TestLoop" name="Loop till user says we are done" camunda:formKey="LoopForm">
|
||||
<bpmn:documentation>Enter Name for member {{ Activity_TestLoop_CurrentVar }}</bpmn:documentation>
|
||||
<bpmn:extensionElements>
|
||||
<camunda:formData>
|
||||
<camunda:formField id="FormField_FirstName" label="Enter First Name" type="string" />
|
||||
</camunda:formData>
|
||||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>Flow_0q33jmj</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_13213ce</bpmn:outgoing>
|
||||
<bpmn:standardLoopCharacteristics />
|
||||
</bpmn:userTask>
|
||||
<bpmn:sequenceFlow id="Flow_0q33jmj" sourceRef="StartEvent_1" targetRef="Activity_TestLoop" />
|
||||
<bpmn:endEvent id="Event_0l4x230">
|
||||
<bpmn:incoming>Flow_13213ce</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_13213ce" sourceRef="Activity_TestLoop" targetRef="Event_0l4x230" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="LoopTaskTest">
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_0kugfe7_di" bpmnElement="Activity_TestLoop">
|
||||
<dc:Bounds x="270" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_0q33jmj_di" bpmnElement="Flow_0q33jmj">
|
||||
<di:waypoint x="215" y="117" />
|
||||
<di:waypoint x="270" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Event_1tmau7e_di" bpmnElement="Event_0l4x230">
|
||||
<dc:Bounds x="472" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_13213ce_di" bpmnElement="Flow_13213ce">
|
||||
<di:waypoint x="370" y="117" />
|
||||
<di:waypoint x="472" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -1,49 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_17fwemw" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.7.0">
|
||||
<bpmn:process id="MultiInstance" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1" name="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0t6p1sb</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0t6p1sb" sourceRef="StartEvent_1" targetRef="Activity_Loop" />
|
||||
<bpmn:endEvent id="Event_End" name="Event_End">
|
||||
<bpmn:incoming>Flow_0ugjw69</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0ugjw69" sourceRef="Activity_Loop" targetRef="Event_End" />
|
||||
<bpmn:userTask id="Activity_Loop" name="Activity_Loop">
|
||||
<bpmn:incoming>Flow_0t6p1sb</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0ugjw69</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics isSequential="true">
|
||||
<bpmn:loopCardinality xsi:type="bpmn:tFormalExpression">5</bpmn:loopCardinality>
|
||||
</bpmn:multiInstanceLoopCharacteristics>
|
||||
</bpmn:userTask>
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="MultiInstance">
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="112" width="36" height="36" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="166" y="155" width="64" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_0t6p1sb_di" bpmnElement="Flow_0t6p1sb">
|
||||
<di:waypoint x="215" y="130" />
|
||||
<di:waypoint x="248" y="130" />
|
||||
<di:waypoint x="248" y="117" />
|
||||
<di:waypoint x="280" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Event_1g0pmib_di" bpmnElement="Event_End">
|
||||
<dc:Bounds x="492" y="99" width="36" height="36" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="485" y="142" width="54" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_0ugjw69_di" bpmnElement="Flow_0ugjw69">
|
||||
<di:waypoint x="380" y="117" />
|
||||
<di:waypoint x="492" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Activity_1iyilui_di" bpmnElement="Activity_Loop">
|
||||
<dc:Bounds x="280" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -11,6 +11,7 @@
|
||||
<bpmn:dataObjectReference id="DataObjectReference_17fhr1j" name="Data" dataObjectRef="obj_1" />
|
||||
<bpmn:dataObjectReference id="DataObjectReference_0pztwm3" name="Data" dataObjectRef="obj_1" />
|
||||
<bpmn:dataObjectReference id="DataObjectReference_0cm8dnh" name="Data" dataObjectRef="obj_1" />
|
||||
<bpmn:dataObjectReference id="DataObjectReference_1dn9eoi" name="Data" dataObjectRef="obj_1" />
|
||||
<bpmn:endEvent id="Event_0qw1yr0">
|
||||
<bpmn:incoming>Flow_19pyf8s</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
@ -38,17 +39,20 @@
|
||||
<bpmn:subProcess id="subprocess" name="Subprocess">
|
||||
<bpmn:incoming>Flow_1tnu3ej</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_19pyf8s</bpmn:outgoing>
|
||||
<bpmn:property id="Property_1q5wp77" name="__targetRef_placeholder" />
|
||||
<bpmn:dataInputAssociation id="DataInputAssociation_0w2qahx">
|
||||
<bpmn:sourceRef>DataObjectReference_0cm8dnh</bpmn:sourceRef>
|
||||
<bpmn:targetRef>Property_1q5wp77</bpmn:targetRef>
|
||||
</bpmn:dataInputAssociation>
|
||||
<bpmn:startEvent id="Event_1wuwx2f">
|
||||
<bpmn:outgoing>Flow_0yx8lkz</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:task id="placeholder">
|
||||
<bpmn:incoming>Flow_0yx8lkz</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0rk4i35</bpmn:outgoing>
|
||||
<bpmn:property id="Property_1q5wp77" name="__targetRef_placeholder" />
|
||||
<bpmn:dataInputAssociation id="DataInputAssociation_0w2qahx">
|
||||
<bpmn:sourceRef>DataObjectReference_0cm8dnh</bpmn:sourceRef>
|
||||
<bpmn:targetRef>Property_1q5wp77</bpmn:targetRef>
|
||||
</bpmn:dataInputAssociation>
|
||||
<bpmn:dataOutputAssociation id="DataOutputAssociation_164qpaq">
|
||||
<bpmn:targetRef>DataObjectReference_1dn9eoi</bpmn:targetRef>
|
||||
</bpmn:dataOutputAssociation>
|
||||
</bpmn:task>
|
||||
<bpmn:sequenceFlow id="Flow_0yx8lkz" sourceRef="Event_1wuwx2f" targetRef="placeholder" />
|
||||
<bpmn:endEvent id="Event_1qcnmnt">
|
||||
|
89
tests/SpiffWorkflow/bpmn/data/data_store.bpmn
Normal file
89
tests/SpiffWorkflow/bpmn/data/data_store.bpmn
Normal file
@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_96f6665" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.0.0-dev">
|
||||
<bpmn:dataStore name="TestDataStore" id="variableTiedToDataStore" />
|
||||
<bpmn:process id="JustDataStoreRef" name="Just DataStoreRef" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0oekyeq</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0oekyeq" sourceRef="StartEvent_1" targetRef="Activity_09dnr20" />
|
||||
<bpmn:endEvent id="Event_0zb3y75">
|
||||
<bpmn:incoming>Flow_0mc5gib</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0ah5fbf" sourceRef="Activity_09dnr20" targetRef="Activity_1k5hvvp" />
|
||||
<bpmn:sequenceFlow id="Flow_0mtq2q5" sourceRef="Activity_1k5hvvp" targetRef="Activity_1skgyn9" />
|
||||
<bpmn:sequenceFlow id="Flow_0mc5gib" sourceRef="Activity_1skgyn9" targetRef="Event_0zb3y75" />
|
||||
<bpmn:scriptTask id="Activity_09dnr20">
|
||||
<bpmn:incoming>Flow_0oekyeq</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0ah5fbf</bpmn:outgoing>
|
||||
<bpmn:dataOutputAssociation id="DataOutputAssociation_0oiimg8">
|
||||
<bpmn:targetRef>referenceToDataStore</bpmn:targetRef>
|
||||
</bpmn:dataOutputAssociation>
|
||||
<bpmn:script>variableTiedToDataStore = "Sue"</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:scriptTask id="Activity_1k5hvvp">
|
||||
<bpmn:incoming>Flow_0ah5fbf</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0mtq2q5</bpmn:outgoing>
|
||||
<bpmn:script>True</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:scriptTask id="Activity_1skgyn9">
|
||||
<bpmn:incoming>Flow_0mtq2q5</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0mc5gib</bpmn:outgoing>
|
||||
<bpmn:property id="Property_1k6jy2l" name="__targetRef_placeholder" />
|
||||
<bpmn:dataInputAssociation id="DataInputAssociation_1n1g2f7">
|
||||
<bpmn:sourceRef>referenceToDataStore</bpmn:sourceRef>
|
||||
<bpmn:targetRef>Property_1k6jy2l</bpmn:targetRef>
|
||||
</bpmn:dataInputAssociation>
|
||||
<bpmn:script>x=variableTiedToDataStore</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:dataStoreReference id="referenceToDataStore" name="Data Object Faj Fd" dataStoreRef="variableTiedToDataStore" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="JustDataStoreRef">
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="159" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_0zb3y75_di" bpmnElement="Event_0zb3y75">
|
||||
<dc:Bounds x="752" y="159" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1bam337_di" bpmnElement="Activity_09dnr20">
|
||||
<dc:Bounds x="250" y="137" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1n9loh9_di" bpmnElement="Activity_1k5hvvp">
|
||||
<dc:Bounds x="410" y="137" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1f0avql_di" bpmnElement="Activity_1skgyn9">
|
||||
<dc:Bounds x="570" y="137" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="DataStoreReference_1drvstg_di" bpmnElement="referenceToDataStore">
|
||||
<dc:Bounds x="435" y="335" width="50" height="50" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="422" y="392" width="77" height="27" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_0oekyeq_di" bpmnElement="Flow_0oekyeq">
|
||||
<di:waypoint x="215" y="177" />
|
||||
<di:waypoint x="250" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0ah5fbf_di" bpmnElement="Flow_0ah5fbf">
|
||||
<di:waypoint x="350" y="177" />
|
||||
<di:waypoint x="410" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0mtq2q5_di" bpmnElement="Flow_0mtq2q5">
|
||||
<di:waypoint x="510" y="177" />
|
||||
<di:waypoint x="570" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0mc5gib_di" bpmnElement="Flow_0mc5gib">
|
||||
<di:waypoint x="670" y="177" />
|
||||
<di:waypoint x="752" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="DataOutputAssociation_0oiimg8_di" bpmnElement="DataOutputAssociation_0oiimg8">
|
||||
<di:waypoint x="334" y="217" />
|
||||
<di:waypoint x="436" y="335" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="DataInputAssociation_1n1g2f7_di" bpmnElement="DataInputAssociation_1n1g2f7">
|
||||
<di:waypoint x="485" y="336" />
|
||||
<di:waypoint x="610" y="217" />
|
||||
</bpmndi:BPMNEdge>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
91
tests/SpiffWorkflow/bpmn/data/data_store_read.bpmn
Normal file
91
tests/SpiffWorkflow/bpmn/data/data_store_read.bpmn
Normal file
@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_96f6665" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.0.0-dev">
|
||||
<bpmn:dataStore name="TestDataStore" id="variableTiedToDataStore" />
|
||||
<bpmn:process id="JustDataStoreRef" name="Just DataStoreRef" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0oekyeq</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0oekyeq" sourceRef="StartEvent_1" targetRef="Activity_09dnr20" />
|
||||
<bpmn:endEvent id="Event_0zb3y75">
|
||||
<bpmn:incoming>Flow_0mc5gib</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0ah5fbf" sourceRef="Activity_09dnr20" targetRef="Activity_1k5hvvp" />
|
||||
<bpmn:sequenceFlow id="Flow_0mtq2q5" sourceRef="Activity_1k5hvvp" targetRef="Activity_1skgyn9" />
|
||||
<bpmn:sequenceFlow id="Flow_0mc5gib" sourceRef="Activity_1skgyn9" targetRef="Event_0zb3y75" />
|
||||
<bpmn:scriptTask id="Activity_09dnr20">
|
||||
<bpmn:incoming>Flow_0oekyeq</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0ah5fbf</bpmn:outgoing>
|
||||
<!--
|
||||
<bpmn:dataOutputAssociation id="DataOutputAssociation_0oiimg8">
|
||||
<bpmn:targetRef>referenceToDataStore</bpmn:targetRef>
|
||||
</bpmn:dataOutputAssociation>
|
||||
-->
|
||||
<bpmn:script>True</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:scriptTask id="Activity_1k5hvvp">
|
||||
<bpmn:incoming>Flow_0ah5fbf</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0mtq2q5</bpmn:outgoing>
|
||||
<bpmn:script>True</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:scriptTask id="Activity_1skgyn9">
|
||||
<bpmn:incoming>Flow_0mtq2q5</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0mc5gib</bpmn:outgoing>
|
||||
<bpmn:property id="Property_1k6jy2l" name="__targetRef_placeholder" />
|
||||
<bpmn:dataInputAssociation id="DataInputAssociation_1n1g2f7">
|
||||
<bpmn:sourceRef>referenceToDataStore</bpmn:sourceRef>
|
||||
<bpmn:targetRef>Property_1k6jy2l</bpmn:targetRef>
|
||||
</bpmn:dataInputAssociation>
|
||||
<bpmn:script>x=variableTiedToDataStore</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:dataStoreReference id="referenceToDataStore" name="Data Object Faj Fd" dataStoreRef="variableTiedToDataStore" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="JustDataStoreRef">
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="159" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_0zb3y75_di" bpmnElement="Event_0zb3y75">
|
||||
<dc:Bounds x="752" y="159" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1bam337_di" bpmnElement="Activity_09dnr20">
|
||||
<dc:Bounds x="250" y="137" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1n9loh9_di" bpmnElement="Activity_1k5hvvp">
|
||||
<dc:Bounds x="410" y="137" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1f0avql_di" bpmnElement="Activity_1skgyn9">
|
||||
<dc:Bounds x="570" y="137" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="DataStoreReference_1drvstg_di" bpmnElement="referenceToDataStore">
|
||||
<dc:Bounds x="435" y="335" width="50" height="50" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="422" y="392" width="77" height="27" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_0oekyeq_di" bpmnElement="Flow_0oekyeq">
|
||||
<di:waypoint x="215" y="177" />
|
||||
<di:waypoint x="250" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0ah5fbf_di" bpmnElement="Flow_0ah5fbf">
|
||||
<di:waypoint x="350" y="177" />
|
||||
<di:waypoint x="410" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0mtq2q5_di" bpmnElement="Flow_0mtq2q5">
|
||||
<di:waypoint x="510" y="177" />
|
||||
<di:waypoint x="570" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0mc5gib_di" bpmnElement="Flow_0mc5gib">
|
||||
<di:waypoint x="670" y="177" />
|
||||
<di:waypoint x="752" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="DataOutputAssociation_0oiimg8_di" bpmnElement="DataOutputAssociation_0oiimg8">
|
||||
<di:waypoint x="334" y="217" />
|
||||
<di:waypoint x="436" y="335" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="DataInputAssociation_1n1g2f7_di" bpmnElement="DataInputAssociation_1n1g2f7">
|
||||
<di:waypoint x="485" y="336" />
|
||||
<di:waypoint x="610" y="217" />
|
||||
</bpmndi:BPMNEdge>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
91
tests/SpiffWorkflow/bpmn/data/data_store_write.bpmn
Normal file
91
tests/SpiffWorkflow/bpmn/data/data_store_write.bpmn
Normal file
@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_96f6665" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.0.0-dev">
|
||||
<bpmn:dataStore name="TestDataStore" id="variableTiedToDataStore" />
|
||||
<bpmn:process id="JustDataStoreRef" name="Just DataStoreRef" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0oekyeq</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0oekyeq" sourceRef="StartEvent_1" targetRef="Activity_09dnr20" />
|
||||
<bpmn:endEvent id="Event_0zb3y75">
|
||||
<bpmn:incoming>Flow_0mc5gib</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0ah5fbf" sourceRef="Activity_09dnr20" targetRef="Activity_1k5hvvp" />
|
||||
<bpmn:sequenceFlow id="Flow_0mtq2q5" sourceRef="Activity_1k5hvvp" targetRef="Activity_1skgyn9" />
|
||||
<bpmn:sequenceFlow id="Flow_0mc5gib" sourceRef="Activity_1skgyn9" targetRef="Event_0zb3y75" />
|
||||
<bpmn:scriptTask id="Activity_09dnr20">
|
||||
<bpmn:incoming>Flow_0oekyeq</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0ah5fbf</bpmn:outgoing>
|
||||
<bpmn:dataOutputAssociation id="DataOutputAssociation_0oiimg8">
|
||||
<bpmn:targetRef>referenceToDataStore</bpmn:targetRef>
|
||||
</bpmn:dataOutputAssociation>
|
||||
<bpmn:script>variableTiedToDataStore = "Sue"</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:scriptTask id="Activity_1k5hvvp">
|
||||
<bpmn:incoming>Flow_0ah5fbf</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0mtq2q5</bpmn:outgoing>
|
||||
<bpmn:script>True</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:scriptTask id="Activity_1skgyn9">
|
||||
<bpmn:incoming>Flow_0mtq2q5</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0mc5gib</bpmn:outgoing>
|
||||
<bpmn:property id="Property_1k6jy2l" name="__targetRef_placeholder" />
|
||||
<!--
|
||||
<bpmn:dataInputAssociation id="DataInputAssociation_1n1g2f7">
|
||||
<bpmn:sourceRef>referenceToDataStore</bpmn:sourceRef>
|
||||
<bpmn:targetRef>Property_1k6jy2l</bpmn:targetRef>
|
||||
</bpmn:dataInputAssociation>
|
||||
-->
|
||||
<bpmn:script>True</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:dataStoreReference id="referenceToDataStore" name="Data Object Faj Fd" dataStoreRef="variableTiedToDataStore" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="JustDataStoreRef">
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="159" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_0zb3y75_di" bpmnElement="Event_0zb3y75">
|
||||
<dc:Bounds x="752" y="159" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1bam337_di" bpmnElement="Activity_09dnr20">
|
||||
<dc:Bounds x="250" y="137" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1n9loh9_di" bpmnElement="Activity_1k5hvvp">
|
||||
<dc:Bounds x="410" y="137" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1f0avql_di" bpmnElement="Activity_1skgyn9">
|
||||
<dc:Bounds x="570" y="137" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="DataStoreReference_1drvstg_di" bpmnElement="referenceToDataStore">
|
||||
<dc:Bounds x="435" y="335" width="50" height="50" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="422" y="392" width="77" height="27" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_0oekyeq_di" bpmnElement="Flow_0oekyeq">
|
||||
<di:waypoint x="215" y="177" />
|
||||
<di:waypoint x="250" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0ah5fbf_di" bpmnElement="Flow_0ah5fbf">
|
||||
<di:waypoint x="350" y="177" />
|
||||
<di:waypoint x="410" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0mtq2q5_di" bpmnElement="Flow_0mtq2q5">
|
||||
<di:waypoint x="510" y="177" />
|
||||
<di:waypoint x="570" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0mc5gib_di" bpmnElement="Flow_0mc5gib">
|
||||
<di:waypoint x="670" y="177" />
|
||||
<di:waypoint x="752" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="DataOutputAssociation_0oiimg8_di" bpmnElement="DataOutputAssociation_0oiimg8">
|
||||
<di:waypoint x="334" y="217" />
|
||||
<di:waypoint x="436" y="335" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="DataInputAssociation_1n1g2f7_di" bpmnElement="DataInputAssociation_1n1g2f7">
|
||||
<di:waypoint x="485" y="336" />
|
||||
<di:waypoint x="610" y="217" />
|
||||
</bpmndi:BPMNEdge>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -1,83 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_19d41bq" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.7.0">
|
||||
<bpmn:process id="ExclusiveToMulti" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_163toj3</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:scriptTask id="Script_Set_x_to_0" name="x = 0">
|
||||
<bpmn:incoming>Flow_163toj3</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1rakb4c</bpmn:outgoing>
|
||||
<bpmn:script>x = 0</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:sequenceFlow id="Flow_163toj3" sourceRef="StartEvent_1" targetRef="Script_Set_x_to_0" />
|
||||
<bpmn:exclusiveGateway id="Gateway_0zdq5of" default="Flow_0340se7">
|
||||
<bpmn:incoming>Flow_1rakb4c</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_04bjhw6</bpmn:outgoing>
|
||||
<bpmn:outgoing>Flow_0340se7</bpmn:outgoing>
|
||||
</bpmn:exclusiveGateway>
|
||||
<bpmn:sequenceFlow id="Flow_1rakb4c" sourceRef="Script_Set_x_to_0" targetRef="Gateway_0zdq5of" />
|
||||
<bpmn:sequenceFlow id="Flow_04bjhw6" name="x is not 0" sourceRef="Gateway_0zdq5of" targetRef="Activity_1j43xon">
|
||||
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">x != 0</bpmn:conditionExpression>
|
||||
</bpmn:sequenceFlow>
|
||||
<bpmn:sequenceFlow id="Flow_073oado" sourceRef="Activity_1j43xon" targetRef="Event_1n4p05n" />
|
||||
<bpmn:sequenceFlow id="Flow_0340se7" name="x is 0" sourceRef="Gateway_0zdq5of" targetRef="Event_1n4p05n" />
|
||||
<bpmn:userTask id="Activity_1j43xon" name="Some Multiinstance">
|
||||
<bpmn:incoming>Flow_04bjhw6</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_073oado</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics>
|
||||
<bpmn:loopCardinality xsi:type="bpmn:tFormalExpression">1</bpmn:loopCardinality>
|
||||
</bpmn:multiInstanceLoopCharacteristics>
|
||||
</bpmn:userTask>
|
||||
<bpmn:endEvent id="Event_1n4p05n">
|
||||
<bpmn:incoming>Flow_073oado</bpmn:incoming>
|
||||
<bpmn:incoming>Flow_0340se7</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ExclusiveToMulti">
|
||||
<bpmndi:BPMNEdge id="Flow_163toj3_di" bpmnElement="Flow_163toj3">
|
||||
<di:waypoint x="215" y="207" />
|
||||
<di:waypoint x="260" y="207" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1rakb4c_di" bpmnElement="Flow_1rakb4c">
|
||||
<di:waypoint x="360" y="207" />
|
||||
<di:waypoint x="405" y="207" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_04bjhw6_di" bpmnElement="Flow_04bjhw6">
|
||||
<di:waypoint x="455" y="207" />
|
||||
<di:waypoint x="520" y="207" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="457" y="189" width="45" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_073oado_di" bpmnElement="Flow_073oado">
|
||||
<di:waypoint x="620" y="207" />
|
||||
<di:waypoint x="702" y="207" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0340se7_di" bpmnElement="Flow_0340se7">
|
||||
<di:waypoint x="430" y="182" />
|
||||
<di:waypoint x="430" y="100" />
|
||||
<di:waypoint x="720" y="100" />
|
||||
<di:waypoint x="720" y="189" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="563" y="82" width="26" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="189" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1cmafjf_di" bpmnElement="Script_Set_x_to_0">
|
||||
<dc:Bounds x="260" y="167" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Gateway_0zdq5of_di" bpmnElement="Gateway_0zdq5of" isMarkerVisible="true">
|
||||
<dc:Bounds x="405" y="182" width="50" height="50" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_05dssc6_di" bpmnElement="Activity_1j43xon">
|
||||
<dc:Bounds x="520" y="167" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_0if1cvv_di" bpmnElement="Event_1n4p05n">
|
||||
<dc:Bounds x="702" y="189" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -1,97 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_0m3hv47" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.11.1" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0">
|
||||
<bpmn:process id="ExclusiveNonDefaultMulti" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent">
|
||||
<bpmn:outgoing>Flow_0rqubl2</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:userTask id="DoStuff" name="Do Stuff?" camunda:formKey="morestuffform">
|
||||
<bpmn:extensionElements>
|
||||
<camunda:formData>
|
||||
<camunda:formField id="morestuff" label="Do we need to do more stuff?" type="string" />
|
||||
</camunda:formData>
|
||||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>Flow_0rqubl2</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_02orejl</bpmn:outgoing>
|
||||
</bpmn:userTask>
|
||||
<bpmn:exclusiveGateway id="CheckResponse" name="Check Response">
|
||||
<bpmn:incoming>Flow_02orejl</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_Yes</bpmn:outgoing>
|
||||
<bpmn:outgoing>Flow_No</bpmn:outgoing>
|
||||
</bpmn:exclusiveGateway>
|
||||
<bpmn:endEvent id="EndEvent">
|
||||
<bpmn:incoming>Flow_No</bpmn:incoming>
|
||||
<bpmn:incoming>Flow_0pud9db</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:userTask id="GetMoreStuff" name="Add More Stuff">
|
||||
<bpmn:extensionElements>
|
||||
<camunda:formData>
|
||||
<camunda:formField id="stuff.addstuff" label="Add More Stuff" type="string" />
|
||||
</camunda:formData>
|
||||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>Flow_Yes</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0pud9db</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics camunda:collection="collectstuff" camunda:elementVariable="stuff">
|
||||
<bpmn:loopCardinality xsi:type="bpmn:tFormalExpression">3</bpmn:loopCardinality>
|
||||
</bpmn:multiInstanceLoopCharacteristics>
|
||||
</bpmn:userTask>
|
||||
<bpmn:sequenceFlow id="Flow_0rqubl2" sourceRef="StartEvent" targetRef="DoStuff" />
|
||||
<bpmn:sequenceFlow id="Flow_02orejl" sourceRef="DoStuff" targetRef="CheckResponse" />
|
||||
<bpmn:sequenceFlow id="Flow_Yes" name="Yes" sourceRef="CheckResponse" targetRef="GetMoreStuff">
|
||||
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">morestuff == 'Yes'</bpmn:conditionExpression>
|
||||
</bpmn:sequenceFlow>
|
||||
<bpmn:sequenceFlow id="Flow_No" name="No" sourceRef="CheckResponse" targetRef="EndEvent">
|
||||
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">morestuff == 'No'</bpmn:conditionExpression>
|
||||
</bpmn:sequenceFlow>
|
||||
<bpmn:sequenceFlow id="Flow_0pud9db" sourceRef="GetMoreStuff" targetRef="EndEvent" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ExclusiveNonDefaultMulti">
|
||||
<bpmndi:BPMNEdge id="Flow_0rqubl2_di" bpmnElement="Flow_0rqubl2">
|
||||
<di:waypoint x="158" y="130" />
|
||||
<di:waypoint x="203" y="130" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_02orejl_di" bpmnElement="Flow_02orejl">
|
||||
<di:waypoint x="303" y="130" />
|
||||
<di:waypoint x="348" y="130" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1ecte1a_di" bpmnElement="Flow_Yes">
|
||||
<di:waypoint x="398" y="130" />
|
||||
<di:waypoint x="463" y="130" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="421" y="112" width="19" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0tsq42b_di" bpmnElement="Flow_No">
|
||||
<di:waypoint x="373" y="155" />
|
||||
<di:waypoint x="373" y="253" />
|
||||
<di:waypoint x="653" y="253" />
|
||||
<di:waypoint x="653" y="148" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="506" y="235" width="15" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0pud9db_di" bpmnElement="Flow_0pud9db">
|
||||
<di:waypoint x="563" y="130" />
|
||||
<di:waypoint x="635" y="130" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Event_0sv6yoe_di" bpmnElement="StartEvent">
|
||||
<dc:Bounds x="122" y="112" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_0qp7zvb_di" bpmnElement="DoStuff">
|
||||
<dc:Bounds x="203" y="90" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Gateway_0ur3pbx_di" bpmnElement="CheckResponse" isMarkerVisible="true">
|
||||
<dc:Bounds x="348" y="105" width="50" height="50" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="331" y="75" width="84" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_1komr8a_di" bpmnElement="EndEvent">
|
||||
<dc:Bounds x="635" y="112" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1ch5bce_di" bpmnElement="GetMoreStuff">
|
||||
<dc:Bounds x="463" y="90" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -13,8 +13,8 @@
|
||||
as a required set of inputs or outputs that must all
|
||||
appear together -->
|
||||
<inputSet name="Inputs" id="INS_1">
|
||||
<dataInputRefs>id_1</dataInputRefs>
|
||||
<dataInputRefs>id_2</dataInputRefs>
|
||||
<dataInputRefs>in_1</dataInputRefs>
|
||||
<dataInputRefs>in_2</dataInputRefs>
|
||||
</inputSet>
|
||||
<outputSet name="Outputs" id="OUTS_1">
|
||||
<dataOutputRefs>out_1</dataOutputRefs>
|
||||
@ -85,4 +85,4 @@
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</definitions>
|
||||
</definitions>
|
66
tests/SpiffWorkflow/bpmn/data/io_spec_on_task.bpmn
Normal file
66
tests/SpiffWorkflow/bpmn/data/io_spec_on_task.bpmn
Normal file
@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_1bprarj" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.11.1" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0">
|
||||
<bpmn:process id="main" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0zbeoq1</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0zbeoq1" sourceRef="StartEvent_1" targetRef="set_data" />
|
||||
<bpmn:scriptTask id="set_data" name="Set Data">
|
||||
<bpmn:incoming>Flow_0zbeoq1</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_16rr3p3</bpmn:outgoing>
|
||||
<bpmn:script>in_1, in_2, unused = 1, "hello world", True
|
||||
</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:sequenceFlow id="Flow_16rr3p3" sourceRef="set_data" targetRef="any_task" />
|
||||
<bpmn:manualTask id="any_task" name="Any Task">
|
||||
<bpmn:incoming>Flow_16rr3p3</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1woo38x</bpmn:outgoing>
|
||||
<bpmn:ioSpecification>
|
||||
<bpmn:dataInput id="in_1" name="input 1" />
|
||||
<bpmn:dataInput id="in_2" name="input 2" />
|
||||
<bpmn:dataOutput id="out_1" name="output 1" />
|
||||
<bpmn:dataOutput id="out_2" name="output 2" />
|
||||
<bpmn:inputSet id="input_set" name="Inputs">
|
||||
<bpmn:dataInputRefs>in_1</bpmn:dataInputRefs>
|
||||
<bpmn:dataInputRefs>in_2</bpmn:dataInputRefs>
|
||||
</bpmn:inputSet>
|
||||
<bpmn:outputSet id="output_set" name="Outputs">
|
||||
<bpmn:dataOutputRefs>out_1</bpmn:dataOutputRefs>
|
||||
<bpmn:dataOutputRefs>out_2</bpmn:dataOutputRefs>
|
||||
</bpmn:outputSet>
|
||||
</bpmn:ioSpecification>
|
||||
</bpmn:manualTask>
|
||||
<bpmn:endEvent id="Event_1nbxxx5">
|
||||
<bpmn:incoming>Flow_1woo38x</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_1woo38x" sourceRef="any_task" targetRef="Event_1nbxxx5" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="main">
|
||||
<bpmndi:BPMNEdge id="Flow_1woo38x_di" bpmnElement="Flow_1woo38x">
|
||||
<di:waypoint x="530" y="117" />
|
||||
<di:waypoint x="592" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_16rr3p3_di" bpmnElement="Flow_16rr3p3">
|
||||
<di:waypoint x="370" y="117" />
|
||||
<di:waypoint x="430" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0zbeoq1_di" bpmnElement="Flow_0zbeoq1">
|
||||
<di:waypoint x="215" y="117" />
|
||||
<di:waypoint x="270" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_0w8jd8z_di" bpmnElement="set_data">
|
||||
<dc:Bounds x="270" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_0fltcc2_di" bpmnElement="any_task">
|
||||
<dc:Bounds x="430" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_1nbxxx5_di" bpmnElement="Event_1nbxxx5">
|
||||
<dc:Bounds x="592" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_0zetnjn" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.11.1" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0">
|
||||
<bpmn:process id="main" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0m77cxj</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:task id="any_task" name="Any Task">
|
||||
<bpmn:incoming>Flow_0m77cxj</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1jbp2el</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics>
|
||||
<bpmn:loopCardinality xsi:type="bpmn:tFormalExpression">3</bpmn:loopCardinality>
|
||||
<bpmn:loopDataOutputRef>output_data</bpmn:loopDataOutputRef>
|
||||
<bpmn:inputDataItem id="input_item" name="input item" />
|
||||
<bpmn:outputDataItem id="output_item" name="output item" />
|
||||
</bpmn:multiInstanceLoopCharacteristics>
|
||||
</bpmn:task>
|
||||
<bpmn:sequenceFlow id="Flow_0m77cxj" sourceRef="StartEvent_1" targetRef="any_task" />
|
||||
<bpmn:endEvent id="Event_1xk7z3g">
|
||||
<bpmn:incoming>Flow_1jbp2el</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_1jbp2el" sourceRef="any_task" targetRef="Event_1xk7z3g" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="main">
|
||||
<bpmndi:BPMNEdge id="Flow_1jbp2el_di" bpmnElement="Flow_1jbp2el">
|
||||
<di:waypoint x="370" y="117" />
|
||||
<di:waypoint x="452" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0m77cxj_di" bpmnElement="Flow_0m77cxj">
|
||||
<di:waypoint x="215" y="117" />
|
||||
<di:waypoint x="270" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1jay5wu_di" bpmnElement="any_task">
|
||||
<dc:Bounds x="270" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_1xk7z3g_di" bpmnElement="Event_1xk7z3g">
|
||||
<dc:Bounds x="452" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_0zetnjn" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.11.1" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0">
|
||||
<bpmn:process id="main" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0m77cxj</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:task id="any_task" name="Any Task">
|
||||
<bpmn:incoming>Flow_0m77cxj</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1jbp2el</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics>
|
||||
<bpmn:loopCardinality xsi:type="bpmn:tFormalExpression">3</bpmn:loopCardinality>
|
||||
<bpmn:loopDataInputRef>input_data</bpmn:loopDataInputRef>
|
||||
<bpmn:loopDataOutputRef>output_data</bpmn:loopDataOutputRef>
|
||||
<bpmn:inputDataItem id="input_item" name="input item" />
|
||||
<bpmn:outputDataItem id="output_item" name="output item" />
|
||||
</bpmn:multiInstanceLoopCharacteristics>
|
||||
</bpmn:task>
|
||||
<bpmn:sequenceFlow id="Flow_0m77cxj" sourceRef="StartEvent_1" targetRef="any_task" />
|
||||
<bpmn:endEvent id="Event_1xk7z3g">
|
||||
<bpmn:incoming>Flow_1jbp2el</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_1jbp2el" sourceRef="any_task" targetRef="Event_1xk7z3g" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="main">
|
||||
<bpmndi:BPMNEdge id="Flow_1jbp2el_di" bpmnElement="Flow_1jbp2el">
|
||||
<di:waypoint x="370" y="117" />
|
||||
<di:waypoint x="452" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0m77cxj_di" bpmnElement="Flow_0m77cxj">
|
||||
<di:waypoint x="215" y="117" />
|
||||
<di:waypoint x="270" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1jay5wu_di" bpmnElement="any_task">
|
||||
<dc:Bounds x="270" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_1xk7z3g_di" bpmnElement="Event_1xk7z3g">
|
||||
<dc:Bounds x="452" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_0zetnjn" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.11.1" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0">
|
||||
<bpmn:process id="main" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0m77cxj</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:task id="any_task" name="Any Task">
|
||||
<bpmn:incoming>Flow_0m77cxj</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1jbp2el</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics>
|
||||
<bpmn:loopDataInputRef>input_data</bpmn:loopDataInputRef>
|
||||
<bpmn:loopDataOutputRef>output_data</bpmn:loopDataOutputRef>
|
||||
<bpmn:inputDataItem id="input_item" name="input item" />
|
||||
<bpmn:outputDataItem id="output_item" name="output item" />
|
||||
</bpmn:multiInstanceLoopCharacteristics>
|
||||
</bpmn:task>
|
||||
<bpmn:sequenceFlow id="Flow_0m77cxj" sourceRef="StartEvent_1" targetRef="any_task" />
|
||||
<bpmn:endEvent id="Event_1xk7z3g">
|
||||
<bpmn:incoming>Flow_1jbp2el</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_1jbp2el" sourceRef="any_task" targetRef="Event_1xk7z3g" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="main">
|
||||
<bpmndi:BPMNEdge id="Flow_1jbp2el_di" bpmnElement="Flow_1jbp2el">
|
||||
<di:waypoint x="390" y="117" />
|
||||
<di:waypoint x="462" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0m77cxj_di" bpmnElement="Flow_0m77cxj">
|
||||
<di:waypoint x="215" y="117" />
|
||||
<di:waypoint x="290" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1jay5wu_di" bpmnElement="any_task">
|
||||
<dc:Bounds x="290" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_1xk7z3g_di" bpmnElement="Event_1xk7z3g">
|
||||
<dc:Bounds x="462" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
104
tests/SpiffWorkflow/bpmn/data/reset_timer.bpmn
Normal file
104
tests/SpiffWorkflow/bpmn/data/reset_timer.bpmn
Normal file
@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_1svhxil" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.11.1" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0">
|
||||
<bpmn:process id="main" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0j648np</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:exclusiveGateway id="Gateway_1hq5zma" default="Flow_13cp5nc">
|
||||
<bpmn:incoming>Flow_0j648np</bpmn:incoming>
|
||||
<bpmn:incoming>modify</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_13cp5nc</bpmn:outgoing>
|
||||
</bpmn:exclusiveGateway>
|
||||
<bpmn:sequenceFlow id="Flow_0j648np" sourceRef="StartEvent_1" targetRef="Gateway_1hq5zma" />
|
||||
<bpmn:task id="task_1" name="Task 1">
|
||||
<bpmn:incoming>Flow_13cp5nc</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1r81vou</bpmn:outgoing>
|
||||
</bpmn:task>
|
||||
<bpmn:sequenceFlow id="Flow_13cp5nc" sourceRef="Gateway_1hq5zma" targetRef="task_1" />
|
||||
<bpmn:task id="task_2" name="Task 2">
|
||||
<bpmn:incoming>Flow_0m5s7t9</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0p7c88x</bpmn:outgoing>
|
||||
</bpmn:task>
|
||||
<bpmn:endEvent id="Event_07pdq0w">
|
||||
<bpmn:incoming>Flow_1gm7381</bpmn:incoming>
|
||||
<bpmn:incoming>Flow_0p7c88x</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:boundaryEvent id="timer" attachedToRef="task_1">
|
||||
<bpmn:outgoing>Flow_0m5s7t9</bpmn:outgoing>
|
||||
<bpmn:timerEventDefinition id="TimerEventDefinition_0hu2ovu">
|
||||
<bpmn:timeDuration xsi:type="bpmn:tFormalExpression">"PT60S"</bpmn:timeDuration>
|
||||
</bpmn:timerEventDefinition>
|
||||
</bpmn:boundaryEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0m5s7t9" sourceRef="timer" targetRef="task_2" />
|
||||
<bpmn:exclusiveGateway id="Gateway_123uzx5" default="Flow_1gm7381">
|
||||
<bpmn:incoming>Flow_1r81vou</bpmn:incoming>
|
||||
<bpmn:outgoing>modify</bpmn:outgoing>
|
||||
<bpmn:outgoing>Flow_1gm7381</bpmn:outgoing>
|
||||
</bpmn:exclusiveGateway>
|
||||
<bpmn:sequenceFlow id="Flow_1r81vou" sourceRef="task_1" targetRef="Gateway_123uzx5" />
|
||||
<bpmn:sequenceFlow id="modify" name="Modify " sourceRef="Gateway_123uzx5" targetRef="Gateway_1hq5zma">
|
||||
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">modify</bpmn:conditionExpression>
|
||||
</bpmn:sequenceFlow>
|
||||
<bpmn:sequenceFlow id="Flow_1gm7381" sourceRef="Gateway_123uzx5" targetRef="Event_07pdq0w" />
|
||||
<bpmn:sequenceFlow id="Flow_0p7c88x" sourceRef="task_2" targetRef="Event_07pdq0w" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="main">
|
||||
<bpmndi:BPMNEdge id="Flow_0j648np_di" bpmnElement="Flow_0j648np">
|
||||
<di:waypoint x="215" y="197" />
|
||||
<di:waypoint x="265" y="197" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_13cp5nc_di" bpmnElement="Flow_13cp5nc">
|
||||
<di:waypoint x="315" y="197" />
|
||||
<di:waypoint x="370" y="197" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0m5s7t9_di" bpmnElement="Flow_0m5s7t9">
|
||||
<di:waypoint x="420" y="255" />
|
||||
<di:waypoint x="420" y="300" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1r81vou_di" bpmnElement="Flow_1r81vou">
|
||||
<di:waypoint x="470" y="197" />
|
||||
<di:waypoint x="525" y="197" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1l30w6o_di" bpmnElement="modify">
|
||||
<di:waypoint x="550" y="172" />
|
||||
<di:waypoint x="550" y="100" />
|
||||
<di:waypoint x="290" y="100" />
|
||||
<di:waypoint x="290" y="172" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="404" y="82" width="33" height="27" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1gm7381_di" bpmnElement="Flow_1gm7381">
|
||||
<di:waypoint x="575" y="197" />
|
||||
<di:waypoint x="632" y="197" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0p7c88x_di" bpmnElement="Flow_0p7c88x">
|
||||
<di:waypoint x="470" y="340" />
|
||||
<di:waypoint x="650" y="340" />
|
||||
<di:waypoint x="650" y="215" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="179" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Gateway_1hq5zma_di" bpmnElement="Gateway_1hq5zma" isMarkerVisible="true">
|
||||
<dc:Bounds x="265" y="172" width="50" height="50" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1f3jg2c_di" bpmnElement="task_1">
|
||||
<dc:Bounds x="370" y="157" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1r0ra56_di" bpmnElement="task_2">
|
||||
<dc:Bounds x="370" y="300" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Gateway_123uzx5_di" bpmnElement="Gateway_123uzx5" isMarkerVisible="true">
|
||||
<dc:Bounds x="525" y="172" width="50" height="50" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_07pdq0w_di" bpmnElement="Event_07pdq0w">
|
||||
<dc:Bounds x="632" y="179" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_1g1bbcs_di" bpmnElement="timer">
|
||||
<dc:Bounds x="402" y="219" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_0zetnjn" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.11.1" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0">
|
||||
<bpmn:process id="main" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0m77cxj</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:task id="any_task" name="Any Task">
|
||||
<bpmn:incoming>Flow_0m77cxj</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1jbp2el</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics isSequential="true">
|
||||
<bpmn:loopCardinality>3</bpmn:loopCardinality>
|
||||
<bpmn:loopDataOutputRef>output_data</bpmn:loopDataOutputRef>
|
||||
<bpmn:inputDataItem id="input_item" name="input item" />
|
||||
<bpmn:outputDataItem id="output_item" name="output item" />
|
||||
</bpmn:multiInstanceLoopCharacteristics>
|
||||
</bpmn:task>
|
||||
<bpmn:sequenceFlow id="Flow_0m77cxj" sourceRef="StartEvent_1" targetRef="any_task" />
|
||||
<bpmn:endEvent id="Event_1xk7z3g">
|
||||
<bpmn:incoming>Flow_1jbp2el</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_1jbp2el" sourceRef="any_task" targetRef="Event_1xk7z3g" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="main">
|
||||
<bpmndi:BPMNEdge id="Flow_1jbp2el_di" bpmnElement="Flow_1jbp2el">
|
||||
<di:waypoint x="390" y="117" />
|
||||
<di:waypoint x="462" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0m77cxj_di" bpmnElement="Flow_0m77cxj">
|
||||
<di:waypoint x="215" y="117" />
|
||||
<di:waypoint x="290" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1jay5wu_di" bpmnElement="any_task">
|
||||
<dc:Bounds x="290" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_1xk7z3g_di" bpmnElement="Event_1xk7z3g">
|
||||
<dc:Bounds x="462" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_0zetnjn" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.11.1" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0">
|
||||
<bpmn:process id="main" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0m77cxj</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:task id="any_task" name="Any Task">
|
||||
<bpmn:incoming>Flow_0m77cxj</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1jbp2el</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics isSequential="true">
|
||||
<bpmn:loopDataInputRef>input_data</bpmn:loopDataInputRef>
|
||||
<bpmn:loopDataOutputRef>output_data</bpmn:loopDataOutputRef>
|
||||
<bpmn:inputDataItem id="input_item" name="input item" />
|
||||
<bpmn:outputDataItem id="output_item" name="output item" />
|
||||
</bpmn:multiInstanceLoopCharacteristics>
|
||||
</bpmn:task>
|
||||
<bpmn:sequenceFlow id="Flow_0m77cxj" sourceRef="StartEvent_1" targetRef="any_task" />
|
||||
<bpmn:endEvent id="Event_1xk7z3g">
|
||||
<bpmn:incoming>Flow_1jbp2el</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_1jbp2el" sourceRef="any_task" targetRef="Event_1xk7z3g" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="main">
|
||||
<bpmndi:BPMNEdge id="Flow_1jbp2el_di" bpmnElement="Flow_1jbp2el">
|
||||
<di:waypoint x="390" y="117" />
|
||||
<di:waypoint x="462" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0m77cxj_di" bpmnElement="Flow_0m77cxj">
|
||||
<di:waypoint x="215" y="117" />
|
||||
<di:waypoint x="290" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1jay5wu_di" bpmnElement="any_task">
|
||||
<dc:Bounds x="290" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_1xk7z3g_di" bpmnElement="Event_1xk7z3g">
|
||||
<dc:Bounds x="462" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
731
tests/SpiffWorkflow/bpmn/data/serialization/v1.1-data.json
Normal file
731
tests/SpiffWorkflow/bpmn/data/serialization/v1.1-data.json
Normal file
@ -0,0 +1,731 @@
|
||||
{
|
||||
"serializer_version": "1.1",
|
||||
"data": {
|
||||
"obj_1": "object 1"
|
||||
},
|
||||
"last_task": "9a4925a1-a152-428e-a764-b24d81b3cfdd",
|
||||
"success": true,
|
||||
"tasks": {
|
||||
"4a2e2ad3-ad4b-4168-800d-71e31f33e225": {
|
||||
"id": "4a2e2ad3-ad4b-4168-800d-71e31f33e225",
|
||||
"parent": null,
|
||||
"children": [
|
||||
"b666abf3-1e97-49c0-94b3-6e0f1a5573ec"
|
||||
],
|
||||
"last_state_change": 1675380199.2266004,
|
||||
"state": 32,
|
||||
"task_spec": "Root",
|
||||
"triggered": false,
|
||||
"workflow_name": "parent",
|
||||
"internal_data": {},
|
||||
"data": {}
|
||||
},
|
||||
"b666abf3-1e97-49c0-94b3-6e0f1a5573ec": {
|
||||
"id": "b666abf3-1e97-49c0-94b3-6e0f1a5573ec",
|
||||
"parent": "4a2e2ad3-ad4b-4168-800d-71e31f33e225",
|
||||
"children": [
|
||||
"c066bd8f-894d-4b24-b724-8c63fb15bdbf"
|
||||
],
|
||||
"last_state_change": 1675380199.2330534,
|
||||
"state": 32,
|
||||
"task_spec": "Start",
|
||||
"triggered": false,
|
||||
"workflow_name": "parent",
|
||||
"internal_data": {},
|
||||
"data": {}
|
||||
},
|
||||
"c066bd8f-894d-4b24-b724-8c63fb15bdbf": {
|
||||
"id": "c066bd8f-894d-4b24-b724-8c63fb15bdbf",
|
||||
"parent": "b666abf3-1e97-49c0-94b3-6e0f1a5573ec",
|
||||
"children": [
|
||||
"9a4925a1-a152-428e-a764-b24d81b3cfdd"
|
||||
],
|
||||
"last_state_change": 1675380199.2362425,
|
||||
"state": 32,
|
||||
"task_spec": "Event_0xiw3t6",
|
||||
"triggered": false,
|
||||
"workflow_name": "parent",
|
||||
"internal_data": {
|
||||
"event_fired": true
|
||||
},
|
||||
"data": {}
|
||||
},
|
||||
"9a4925a1-a152-428e-a764-b24d81b3cfdd": {
|
||||
"id": "9a4925a1-a152-428e-a764-b24d81b3cfdd",
|
||||
"parent": "c066bd8f-894d-4b24-b724-8c63fb15bdbf",
|
||||
"children": [
|
||||
"dcd54745-3143-4b4d-b557-f9c8ce9c7e71"
|
||||
],
|
||||
"last_state_change": 1675380199.238688,
|
||||
"state": 32,
|
||||
"task_spec": "Activity_0haob58",
|
||||
"triggered": false,
|
||||
"workflow_name": "parent",
|
||||
"internal_data": {},
|
||||
"data": {
|
||||
"in_1": 1,
|
||||
"in_2": "hello world",
|
||||
"unused": true
|
||||
}
|
||||
},
|
||||
"dcd54745-3143-4b4d-b557-f9c8ce9c7e71": {
|
||||
"id": "dcd54745-3143-4b4d-b557-f9c8ce9c7e71",
|
||||
"parent": "9a4925a1-a152-428e-a764-b24d81b3cfdd",
|
||||
"children": [
|
||||
"3a537753-2578-4f33-914c-5e840d2f9612"
|
||||
],
|
||||
"last_state_change": 1675380199.243926,
|
||||
"state": 8,
|
||||
"task_spec": "Activity_1wdjypm",
|
||||
"triggered": false,
|
||||
"workflow_name": "parent",
|
||||
"internal_data": {},
|
||||
"data": {
|
||||
"in_1": 1,
|
||||
"in_2": "hello world",
|
||||
"unused": true
|
||||
}
|
||||
},
|
||||
"3a537753-2578-4f33-914c-5e840d2f9612": {
|
||||
"id": "3a537753-2578-4f33-914c-5e840d2f9612",
|
||||
"parent": "dcd54745-3143-4b4d-b557-f9c8ce9c7e71",
|
||||
"children": [
|
||||
"f4e68050-fdc7-48e6-b0e0-7c71aa7ff3df"
|
||||
],
|
||||
"last_state_change": 1675380199.2281342,
|
||||
"state": 4,
|
||||
"task_spec": "Event_1q277cc",
|
||||
"triggered": false,
|
||||
"workflow_name": "parent",
|
||||
"internal_data": {},
|
||||
"data": {}
|
||||
},
|
||||
"f4e68050-fdc7-48e6-b0e0-7c71aa7ff3df": {
|
||||
"id": "f4e68050-fdc7-48e6-b0e0-7c71aa7ff3df",
|
||||
"parent": "3a537753-2578-4f33-914c-5e840d2f9612",
|
||||
"children": [
|
||||
"04c50af7-cf65-4cd7-a25e-af506581de7c"
|
||||
],
|
||||
"last_state_change": 1675380199.2283747,
|
||||
"state": 4,
|
||||
"task_spec": "parent.EndJoin",
|
||||
"triggered": false,
|
||||
"workflow_name": "parent",
|
||||
"internal_data": {},
|
||||
"data": {}
|
||||
},
|
||||
"04c50af7-cf65-4cd7-a25e-af506581de7c": {
|
||||
"id": "04c50af7-cf65-4cd7-a25e-af506581de7c",
|
||||
"parent": "f4e68050-fdc7-48e6-b0e0-7c71aa7ff3df",
|
||||
"children": [],
|
||||
"last_state_change": 1675380199.2286203,
|
||||
"state": 4,
|
||||
"task_spec": "End",
|
||||
"triggered": false,
|
||||
"workflow_name": "parent",
|
||||
"internal_data": {},
|
||||
"data": {}
|
||||
}
|
||||
},
|
||||
"root": "4a2e2ad3-ad4b-4168-800d-71e31f33e225",
|
||||
"spec": {
|
||||
"name": "parent",
|
||||
"description": "Parent Process",
|
||||
"file": "/home/essweine/work/sartography/code/SpiffWorkflow/tests/SpiffWorkflow/bpmn/data/io_spec_parent_data_obj.bpmn",
|
||||
"task_specs": {
|
||||
"Start": {
|
||||
"id": "parent_1",
|
||||
"name": "Start",
|
||||
"description": "",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
"Event_0xiw3t6"
|
||||
],
|
||||
"typename": "StartTask"
|
||||
},
|
||||
"parent.EndJoin": {
|
||||
"id": "parent_2",
|
||||
"name": "parent.EndJoin",
|
||||
"description": "",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"Event_1q277cc"
|
||||
],
|
||||
"outputs": [
|
||||
"End"
|
||||
],
|
||||
"typename": "_EndJoin"
|
||||
},
|
||||
"End": {
|
||||
"id": "parent_3",
|
||||
"name": "End",
|
||||
"description": "",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"parent.EndJoin"
|
||||
],
|
||||
"outputs": [],
|
||||
"typename": "Simple"
|
||||
},
|
||||
"Event_0xiw3t6": {
|
||||
"id": "parent_4",
|
||||
"name": "Event_0xiw3t6",
|
||||
"description": null,
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"Start"
|
||||
],
|
||||
"outputs": [
|
||||
"Activity_0haob58"
|
||||
],
|
||||
"lane": null,
|
||||
"documentation": null,
|
||||
"loopTask": false,
|
||||
"position": {
|
||||
"x": 152.0,
|
||||
"y": 102.0
|
||||
},
|
||||
"outgoing_sequence_flows": {
|
||||
"Activity_0haob58": {
|
||||
"id": "Flow_00qjfvu",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Activity_0haob58",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"outgoing_sequence_flows_by_id": {
|
||||
"Flow_00qjfvu": {
|
||||
"id": "Flow_00qjfvu",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Activity_0haob58",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"data_input_associations": [],
|
||||
"data_output_associations": [],
|
||||
"event_definition": {
|
||||
"internal": false,
|
||||
"external": false,
|
||||
"typename": "NoneEventDefinition"
|
||||
},
|
||||
"typename": "StartEvent",
|
||||
"extensions": {}
|
||||
},
|
||||
"Activity_0haob58": {
|
||||
"id": "parent_5",
|
||||
"name": "Activity_0haob58",
|
||||
"description": "Set Data",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"Event_0xiw3t6"
|
||||
],
|
||||
"outputs": [
|
||||
"Activity_1wdjypm"
|
||||
],
|
||||
"lane": null,
|
||||
"documentation": null,
|
||||
"loopTask": false,
|
||||
"position": {
|
||||
"x": 240.0,
|
||||
"y": 80.0
|
||||
},
|
||||
"outgoing_sequence_flows": {
|
||||
"Activity_1wdjypm": {
|
||||
"id": "Flow_0aj70uj",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Activity_1wdjypm",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"outgoing_sequence_flows_by_id": {
|
||||
"Flow_0aj70uj": {
|
||||
"id": "Flow_0aj70uj",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Activity_1wdjypm",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"data_input_associations": [],
|
||||
"data_output_associations": [
|
||||
{
|
||||
"name": "obj_1",
|
||||
"description": "obj_1",
|
||||
"typename": "BpmnDataSpecification"
|
||||
}
|
||||
],
|
||||
"script": "in_1, in_2, unused = 1, \"hello world\", True\nobj_1='object 1'",
|
||||
"typename": "ScriptTask",
|
||||
"extensions": {}
|
||||
},
|
||||
"Activity_1wdjypm": {
|
||||
"id": "parent_6",
|
||||
"name": "Activity_1wdjypm",
|
||||
"description": "Update Data",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"Activity_0haob58"
|
||||
],
|
||||
"outputs": [
|
||||
"Event_1q277cc"
|
||||
],
|
||||
"lane": null,
|
||||
"documentation": null,
|
||||
"loopTask": false,
|
||||
"position": {
|
||||
"x": 400.0,
|
||||
"y": 80.0
|
||||
},
|
||||
"outgoing_sequence_flows": {
|
||||
"Event_1q277cc": {
|
||||
"id": "Flow_1uel76w",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Event_1q277cc",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"outgoing_sequence_flows_by_id": {
|
||||
"Flow_1uel76w": {
|
||||
"id": "Flow_1uel76w",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Event_1q277cc",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"data_input_associations": [],
|
||||
"data_output_associations": [],
|
||||
"spec": "subprocess",
|
||||
"typename": "CallActivity",
|
||||
"extensions": {}
|
||||
},
|
||||
"Event_1q277cc": {
|
||||
"id": "parent_7",
|
||||
"name": "Event_1q277cc",
|
||||
"description": null,
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"Activity_1wdjypm"
|
||||
],
|
||||
"outputs": [
|
||||
"parent.EndJoin"
|
||||
],
|
||||
"lane": null,
|
||||
"documentation": null,
|
||||
"loopTask": false,
|
||||
"position": {
|
||||
"x": 562.0,
|
||||
"y": 102.0
|
||||
},
|
||||
"outgoing_sequence_flows": {
|
||||
"parent.EndJoin": {
|
||||
"id": "Event_1q277cc.ToEndJoin",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "parent.EndJoin",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"outgoing_sequence_flows_by_id": {
|
||||
"Event_1q277cc.ToEndJoin": {
|
||||
"id": "Event_1q277cc.ToEndJoin",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "parent.EndJoin",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"data_input_associations": [],
|
||||
"data_output_associations": [],
|
||||
"event_definition": {
|
||||
"internal": false,
|
||||
"external": false,
|
||||
"typename": "NoneEventDefinition"
|
||||
},
|
||||
"typename": "EndEvent",
|
||||
"extensions": {}
|
||||
},
|
||||
"Root": {
|
||||
"id": "parent_8",
|
||||
"name": "Root",
|
||||
"description": "",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [],
|
||||
"outputs": [],
|
||||
"typename": "Simple"
|
||||
}
|
||||
},
|
||||
"data_inputs": [],
|
||||
"data_outputs": [],
|
||||
"data_objects": {
|
||||
"obj_1": {
|
||||
"name": "obj_1",
|
||||
"description": "obj_1",
|
||||
"typename": "BpmnDataSpecification"
|
||||
}
|
||||
},
|
||||
"correlation_keys": {},
|
||||
"typename": "BpmnProcessSpec"
|
||||
},
|
||||
"subprocess_specs": {
|
||||
"subprocess": {
|
||||
"name": "subprocess",
|
||||
"description": "subprocess",
|
||||
"file": "/home/essweine/work/sartography/code/SpiffWorkflow/tests/SpiffWorkflow/bpmn/data/io_spec.bpmn",
|
||||
"task_specs": {
|
||||
"Start": {
|
||||
"id": "subprocess_1",
|
||||
"name": "Start",
|
||||
"description": "",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
"Event_1rtivo5"
|
||||
],
|
||||
"typename": "StartTask"
|
||||
},
|
||||
"subprocess.EndJoin": {
|
||||
"id": "subprocess_2",
|
||||
"name": "subprocess.EndJoin",
|
||||
"description": "",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"Event_0pgucu1"
|
||||
],
|
||||
"outputs": [
|
||||
"End"
|
||||
],
|
||||
"typename": "_EndJoin"
|
||||
},
|
||||
"End": {
|
||||
"id": "subprocess_3",
|
||||
"name": "End",
|
||||
"description": "",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"subprocess.EndJoin"
|
||||
],
|
||||
"outputs": [],
|
||||
"typename": "Simple"
|
||||
},
|
||||
"Event_1rtivo5": {
|
||||
"id": "subprocess_4",
|
||||
"name": "Event_1rtivo5",
|
||||
"description": null,
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"Start"
|
||||
],
|
||||
"outputs": [
|
||||
"Activity_04d94ee"
|
||||
],
|
||||
"lane": null,
|
||||
"documentation": null,
|
||||
"loopTask": false,
|
||||
"position": {
|
||||
"x": 232.0,
|
||||
"y": 252.0
|
||||
},
|
||||
"outgoing_sequence_flows": {
|
||||
"Activity_04d94ee": {
|
||||
"id": "Flow_0n038fc",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Activity_04d94ee",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"outgoing_sequence_flows_by_id": {
|
||||
"Flow_0n038fc": {
|
||||
"id": "Flow_0n038fc",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Activity_04d94ee",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"data_input_associations": [],
|
||||
"data_output_associations": [],
|
||||
"event_definition": {
|
||||
"internal": false,
|
||||
"external": false,
|
||||
"typename": "NoneEventDefinition"
|
||||
},
|
||||
"typename": "StartEvent",
|
||||
"extensions": {}
|
||||
},
|
||||
"Activity_04d94ee": {
|
||||
"id": "subprocess_5",
|
||||
"name": "Activity_04d94ee",
|
||||
"description": "Task 1",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"Event_1rtivo5"
|
||||
],
|
||||
"outputs": [
|
||||
"Event_0pgucu1"
|
||||
],
|
||||
"lane": null,
|
||||
"documentation": null,
|
||||
"loopTask": false,
|
||||
"position": {
|
||||
"x": 320.0,
|
||||
"y": 230.0
|
||||
},
|
||||
"outgoing_sequence_flows": {
|
||||
"Event_0pgucu1": {
|
||||
"id": "Flow_1d3l0mt",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Event_0pgucu1",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"outgoing_sequence_flows_by_id": {
|
||||
"Flow_1d3l0mt": {
|
||||
"id": "Flow_1d3l0mt",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Event_0pgucu1",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"data_input_associations": [],
|
||||
"data_output_associations": [],
|
||||
"script": "out_1, out_2, unused = in_1 * 2, in_2.upper(), False\n ",
|
||||
"typename": "ScriptTask",
|
||||
"extensions": {}
|
||||
},
|
||||
"Event_0pgucu1": {
|
||||
"id": "subprocess_6",
|
||||
"name": "Event_0pgucu1",
|
||||
"description": null,
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"Activity_04d94ee"
|
||||
],
|
||||
"outputs": [
|
||||
"subprocess.EndJoin"
|
||||
],
|
||||
"lane": null,
|
||||
"documentation": null,
|
||||
"loopTask": false,
|
||||
"position": {
|
||||
"x": 472.0,
|
||||
"y": 252.0
|
||||
},
|
||||
"outgoing_sequence_flows": {
|
||||
"subprocess.EndJoin": {
|
||||
"id": "Event_0pgucu1.ToEndJoin",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "subprocess.EndJoin",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"outgoing_sequence_flows_by_id": {
|
||||
"Event_0pgucu1.ToEndJoin": {
|
||||
"id": "Event_0pgucu1.ToEndJoin",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "subprocess.EndJoin",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"data_input_associations": [],
|
||||
"data_output_associations": [],
|
||||
"event_definition": {
|
||||
"internal": false,
|
||||
"external": false,
|
||||
"typename": "NoneEventDefinition"
|
||||
},
|
||||
"typename": "EndEvent",
|
||||
"extensions": {}
|
||||
},
|
||||
"Root": {
|
||||
"id": "subprocess_7",
|
||||
"name": "Root",
|
||||
"description": "",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [],
|
||||
"outputs": [],
|
||||
"typename": "Simple"
|
||||
}
|
||||
},
|
||||
"data_inputs": [
|
||||
{
|
||||
"name": "in_1",
|
||||
"description": "input 1",
|
||||
"typename": "BpmnDataSpecification"
|
||||
},
|
||||
{
|
||||
"name": "in_2",
|
||||
"description": "input 2",
|
||||
"typename": "BpmnDataSpecification"
|
||||
}
|
||||
],
|
||||
"data_outputs": [
|
||||
{
|
||||
"name": "out_1",
|
||||
"description": "output 1",
|
||||
"typename": "BpmnDataSpecification"
|
||||
},
|
||||
{
|
||||
"name": "out_2",
|
||||
"description": "output 2",
|
||||
"typename": "BpmnDataSpecification"
|
||||
}
|
||||
],
|
||||
"data_objects": {},
|
||||
"correlation_keys": {},
|
||||
"typename": "BpmnProcessSpec"
|
||||
}
|
||||
},
|
||||
"subprocesses": {
|
||||
"dcd54745-3143-4b4d-b557-f9c8ce9c7e71": {
|
||||
"data": {
|
||||
"obj_1": "object 1"
|
||||
},
|
||||
"last_task": null,
|
||||
"success": true,
|
||||
"tasks": {
|
||||
"658250f5-54df-4300-9e0a-6e122ed17e08": {
|
||||
"id": "658250f5-54df-4300-9e0a-6e122ed17e08",
|
||||
"parent": null,
|
||||
"children": [
|
||||
"cce657f0-4534-4923-b073-0213caf8d500"
|
||||
],
|
||||
"last_state_change": 1675380199.240486,
|
||||
"state": 32,
|
||||
"task_spec": "Root",
|
||||
"triggered": false,
|
||||
"workflow_name": "Activity_1wdjypm",
|
||||
"internal_data": {},
|
||||
"data": {}
|
||||
},
|
||||
"cce657f0-4534-4923-b073-0213caf8d500": {
|
||||
"id": "cce657f0-4534-4923-b073-0213caf8d500",
|
||||
"parent": "658250f5-54df-4300-9e0a-6e122ed17e08",
|
||||
"children": [
|
||||
"d0fd83e5-e4fb-49fb-9055-27993fa09430"
|
||||
],
|
||||
"last_state_change": 1675380199.24384,
|
||||
"state": 16,
|
||||
"task_spec": "Start",
|
||||
"triggered": false,
|
||||
"workflow_name": "Activity_1wdjypm",
|
||||
"internal_data": {},
|
||||
"data": {
|
||||
"in_1": 1,
|
||||
"in_2": "hello world"
|
||||
}
|
||||
},
|
||||
"d0fd83e5-e4fb-49fb-9055-27993fa09430": {
|
||||
"id": "d0fd83e5-e4fb-49fb-9055-27993fa09430",
|
||||
"parent": "cce657f0-4534-4923-b073-0213caf8d500",
|
||||
"children": [
|
||||
"48649a1e-9fe5-48ef-8bd9-57b60ff4e98b"
|
||||
],
|
||||
"last_state_change": 1675380199.2407098,
|
||||
"state": 4,
|
||||
"task_spec": "Event_1rtivo5",
|
||||
"triggered": false,
|
||||
"workflow_name": "Activity_1wdjypm",
|
||||
"internal_data": {},
|
||||
"data": {}
|
||||
},
|
||||
"48649a1e-9fe5-48ef-8bd9-57b60ff4e98b": {
|
||||
"id": "48649a1e-9fe5-48ef-8bd9-57b60ff4e98b",
|
||||
"parent": "d0fd83e5-e4fb-49fb-9055-27993fa09430",
|
||||
"children": [
|
||||
"984b7e3e-b037-4120-a544-792d5ee91fe5"
|
||||
],
|
||||
"last_state_change": 1675380199.240903,
|
||||
"state": 4,
|
||||
"task_spec": "Activity_04d94ee",
|
||||
"triggered": false,
|
||||
"workflow_name": "Activity_1wdjypm",
|
||||
"internal_data": {},
|
||||
"data": {}
|
||||
},
|
||||
"984b7e3e-b037-4120-a544-792d5ee91fe5": {
|
||||
"id": "984b7e3e-b037-4120-a544-792d5ee91fe5",
|
||||
"parent": "48649a1e-9fe5-48ef-8bd9-57b60ff4e98b",
|
||||
"children": [
|
||||
"8b4d7999-b35b-480f-8e3d-08ad24883bce"
|
||||
],
|
||||
"last_state_change": 1675380199.2411075,
|
||||
"state": 4,
|
||||
"task_spec": "Event_0pgucu1",
|
||||
"triggered": false,
|
||||
"workflow_name": "Activity_1wdjypm",
|
||||
"internal_data": {},
|
||||
"data": {}
|
||||
},
|
||||
"8b4d7999-b35b-480f-8e3d-08ad24883bce": {
|
||||
"id": "8b4d7999-b35b-480f-8e3d-08ad24883bce",
|
||||
"parent": "984b7e3e-b037-4120-a544-792d5ee91fe5",
|
||||
"children": [
|
||||
"0ad22900-dac5-4ce8-8fcf-644849cf8827"
|
||||
],
|
||||
"last_state_change": 1675380199.2413251,
|
||||
"state": 4,
|
||||
"task_spec": "subprocess.EndJoin",
|
||||
"triggered": false,
|
||||
"workflow_name": "Activity_1wdjypm",
|
||||
"internal_data": {},
|
||||
"data": {}
|
||||
},
|
||||
"0ad22900-dac5-4ce8-8fcf-644849cf8827": {
|
||||
"id": "0ad22900-dac5-4ce8-8fcf-644849cf8827",
|
||||
"parent": "8b4d7999-b35b-480f-8e3d-08ad24883bce",
|
||||
"children": [],
|
||||
"last_state_change": 1675380199.2415493,
|
||||
"state": 4,
|
||||
"task_spec": "End",
|
||||
"triggered": false,
|
||||
"workflow_name": "Activity_1wdjypm",
|
||||
"internal_data": {},
|
||||
"data": {}
|
||||
}
|
||||
},
|
||||
"root": "658250f5-54df-4300-9e0a-6e122ed17e08"
|
||||
}
|
||||
},
|
||||
"bpmn_messages": []
|
||||
}
|
830
tests/SpiffWorkflow/bpmn/data/serialization/v1.1-gateways.json
Normal file
830
tests/SpiffWorkflow/bpmn/data/serialization/v1.1-gateways.json
Normal file
@ -0,0 +1,830 @@
|
||||
{
|
||||
"serializer_version": "1.1",
|
||||
"data": {},
|
||||
"last_task": "215867bf-41a3-42b3-8403-b836aabcfe6c",
|
||||
"success": true,
|
||||
"tasks": {
|
||||
"01bdb086-35cc-4897-805f-d059d1cfe682": {
|
||||
"id": "01bdb086-35cc-4897-805f-d059d1cfe682",
|
||||
"parent": null,
|
||||
"children": [
|
||||
"3846b631-5ed5-4913-9f53-f358886547cd"
|
||||
],
|
||||
"last_state_change": 1675380654.3327675,
|
||||
"state": 32,
|
||||
"task_spec": "Root",
|
||||
"triggered": false,
|
||||
"workflow_name": "lanes",
|
||||
"internal_data": {},
|
||||
"data": {}
|
||||
},
|
||||
"3846b631-5ed5-4913-9f53-f358886547cd": {
|
||||
"id": "3846b631-5ed5-4913-9f53-f358886547cd",
|
||||
"parent": "01bdb086-35cc-4897-805f-d059d1cfe682",
|
||||
"children": [
|
||||
"7f261ef4-047b-4941-a508-c24790f0a8c0"
|
||||
],
|
||||
"last_state_change": 1675380654.338419,
|
||||
"state": 32,
|
||||
"task_spec": "Start",
|
||||
"triggered": false,
|
||||
"workflow_name": "lanes",
|
||||
"internal_data": {},
|
||||
"data": {}
|
||||
},
|
||||
"7f261ef4-047b-4941-a508-c24790f0a8c0": {
|
||||
"id": "7f261ef4-047b-4941-a508-c24790f0a8c0",
|
||||
"parent": "3846b631-5ed5-4913-9f53-f358886547cd",
|
||||
"children": [
|
||||
"215867bf-41a3-42b3-8403-b836aabcfe6c"
|
||||
],
|
||||
"last_state_change": 1675380654.3411734,
|
||||
"state": 32,
|
||||
"task_spec": "StartEvent_1",
|
||||
"triggered": false,
|
||||
"workflow_name": "lanes",
|
||||
"internal_data": {
|
||||
"event_fired": true
|
||||
},
|
||||
"data": {}
|
||||
},
|
||||
"215867bf-41a3-42b3-8403-b836aabcfe6c": {
|
||||
"id": "215867bf-41a3-42b3-8403-b836aabcfe6c",
|
||||
"parent": "7f261ef4-047b-4941-a508-c24790f0a8c0",
|
||||
"children": [
|
||||
"5b0dc44b-0901-4989-8733-2dfcb82344c7"
|
||||
],
|
||||
"last_state_change": 1675380654.3452208,
|
||||
"state": 32,
|
||||
"task_spec": "Activity_A1",
|
||||
"triggered": false,
|
||||
"workflow_name": "lanes",
|
||||
"internal_data": {},
|
||||
"data": {}
|
||||
},
|
||||
"5b0dc44b-0901-4989-8733-2dfcb82344c7": {
|
||||
"id": "5b0dc44b-0901-4989-8733-2dfcb82344c7",
|
||||
"parent": "215867bf-41a3-42b3-8403-b836aabcfe6c",
|
||||
"children": [
|
||||
"bf645868-c2fc-4dfb-90c9-210f23b7f503"
|
||||
],
|
||||
"last_state_change": 1675380654.3462226,
|
||||
"state": 16,
|
||||
"task_spec": "Activity_B1",
|
||||
"triggered": false,
|
||||
"workflow_name": "lanes",
|
||||
"internal_data": {},
|
||||
"data": {}
|
||||
},
|
||||
"bf645868-c2fc-4dfb-90c9-210f23b7f503": {
|
||||
"id": "bf645868-c2fc-4dfb-90c9-210f23b7f503",
|
||||
"parent": "5b0dc44b-0901-4989-8733-2dfcb82344c7",
|
||||
"children": [
|
||||
"3825a6af-4ea6-4242-9570-411a7d080f96",
|
||||
"90b2d2bc-d222-4c96-95e5-9becd7260ef6"
|
||||
],
|
||||
"last_state_change": 1675380654.3340564,
|
||||
"state": 4,
|
||||
"task_spec": "Gateway_askQuestion",
|
||||
"triggered": false,
|
||||
"workflow_name": "lanes",
|
||||
"internal_data": {},
|
||||
"data": {}
|
||||
},
|
||||
"3825a6af-4ea6-4242-9570-411a7d080f96": {
|
||||
"id": "3825a6af-4ea6-4242-9570-411a7d080f96",
|
||||
"parent": "bf645868-c2fc-4dfb-90c9-210f23b7f503",
|
||||
"children": [
|
||||
"a00fc3d7-c0ab-46ec-a3b1-892ff78f4809"
|
||||
],
|
||||
"last_state_change": 1675380654.3344204,
|
||||
"state": 1,
|
||||
"task_spec": "Activity_A2",
|
||||
"triggered": false,
|
||||
"workflow_name": "lanes",
|
||||
"internal_data": {},
|
||||
"data": {}
|
||||
},
|
||||
"a00fc3d7-c0ab-46ec-a3b1-892ff78f4809": {
|
||||
"id": "a00fc3d7-c0ab-46ec-a3b1-892ff78f4809",
|
||||
"parent": "3825a6af-4ea6-4242-9570-411a7d080f96",
|
||||
"children": [],
|
||||
"last_state_change": 1675380654.3349297,
|
||||
"state": 1,
|
||||
"task_spec": "Implement_Feature",
|
||||
"triggered": false,
|
||||
"workflow_name": "lanes",
|
||||
"internal_data": {},
|
||||
"data": {}
|
||||
},
|
||||
"90b2d2bc-d222-4c96-95e5-9becd7260ef6": {
|
||||
"id": "90b2d2bc-d222-4c96-95e5-9becd7260ef6",
|
||||
"parent": "bf645868-c2fc-4dfb-90c9-210f23b7f503",
|
||||
"children": [
|
||||
"3eeb1f48-6bde-4921-b2b0-ae4557c09d1f"
|
||||
],
|
||||
"last_state_change": 1675380654.3346882,
|
||||
"state": 2,
|
||||
"task_spec": "Implement_Feature",
|
||||
"triggered": false,
|
||||
"workflow_name": "lanes",
|
||||
"internal_data": {},
|
||||
"data": {}
|
||||
},
|
||||
"3eeb1f48-6bde-4921-b2b0-ae4557c09d1f": {
|
||||
"id": "3eeb1f48-6bde-4921-b2b0-ae4557c09d1f",
|
||||
"parent": "90b2d2bc-d222-4c96-95e5-9becd7260ef6",
|
||||
"children": [],
|
||||
"last_state_change": 1675380654.3352633,
|
||||
"state": 2,
|
||||
"task_spec": "Activity_1uksrqx",
|
||||
"triggered": false,
|
||||
"workflow_name": "lanes",
|
||||
"internal_data": {},
|
||||
"data": {}
|
||||
}
|
||||
},
|
||||
"root": "01bdb086-35cc-4897-805f-d059d1cfe682",
|
||||
"spec": {
|
||||
"name": "lanes",
|
||||
"description": "lanes",
|
||||
"file": "/home/essweine/work/sartography/code/SpiffWorkflow/tests/SpiffWorkflow/bpmn/data/lanes.bpmn",
|
||||
"task_specs": {
|
||||
"Start": {
|
||||
"id": "lanes_1",
|
||||
"name": "Start",
|
||||
"description": "",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
"StartEvent_1"
|
||||
],
|
||||
"typename": "StartTask"
|
||||
},
|
||||
"lanes.EndJoin": {
|
||||
"id": "lanes_2",
|
||||
"name": "lanes.EndJoin",
|
||||
"description": "",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"Event_07pakcl"
|
||||
],
|
||||
"outputs": [
|
||||
"End"
|
||||
],
|
||||
"typename": "_EndJoin"
|
||||
},
|
||||
"End": {
|
||||
"id": "lanes_3",
|
||||
"name": "End",
|
||||
"description": "",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"lanes.EndJoin"
|
||||
],
|
||||
"outputs": [],
|
||||
"typename": "Simple"
|
||||
},
|
||||
"StartEvent_1": {
|
||||
"id": "lanes_4",
|
||||
"name": "StartEvent_1",
|
||||
"description": null,
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"Start"
|
||||
],
|
||||
"outputs": [
|
||||
"Activity_A1"
|
||||
],
|
||||
"lane": "A",
|
||||
"documentation": null,
|
||||
"loopTask": false,
|
||||
"position": {
|
||||
"x": 219.0,
|
||||
"y": 92.0
|
||||
},
|
||||
"outgoing_sequence_flows": {
|
||||
"Activity_A1": {
|
||||
"id": "Flow_0jwejm5",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Activity_A1",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"outgoing_sequence_flows_by_id": {
|
||||
"Flow_0jwejm5": {
|
||||
"id": "Flow_0jwejm5",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Activity_A1",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"data_input_associations": [],
|
||||
"data_output_associations": [],
|
||||
"event_definition": {
|
||||
"internal": false,
|
||||
"external": false,
|
||||
"typename": "NoneEventDefinition"
|
||||
},
|
||||
"typename": "StartEvent",
|
||||
"extensions": {}
|
||||
},
|
||||
"Activity_A1": {
|
||||
"id": "lanes_5",
|
||||
"name": "Activity_A1",
|
||||
"description": "Request Feature",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"StartEvent_1"
|
||||
],
|
||||
"outputs": [
|
||||
"Activity_B1"
|
||||
],
|
||||
"lane": "A",
|
||||
"documentation": null,
|
||||
"loopTask": false,
|
||||
"position": {
|
||||
"x": 300.0,
|
||||
"y": 70.0
|
||||
},
|
||||
"outgoing_sequence_flows": {
|
||||
"Activity_B1": {
|
||||
"id": "Flow_140vffb",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Activity_B1",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"outgoing_sequence_flows_by_id": {
|
||||
"Flow_140vffb": {
|
||||
"id": "Flow_140vffb",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Activity_B1",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"data_input_associations": [],
|
||||
"data_output_associations": [],
|
||||
"typename": "UserTask",
|
||||
"extensions": {}
|
||||
},
|
||||
"Activity_B1": {
|
||||
"id": "lanes_6",
|
||||
"name": "Activity_B1",
|
||||
"description": "Clarifying Questions?",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"Activity_A1"
|
||||
],
|
||||
"outputs": [
|
||||
"Gateway_askQuestion"
|
||||
],
|
||||
"lane": "B",
|
||||
"documentation": null,
|
||||
"loopTask": false,
|
||||
"position": {
|
||||
"x": 300.0,
|
||||
"y": 210.0
|
||||
},
|
||||
"outgoing_sequence_flows": {
|
||||
"Gateway_askQuestion": {
|
||||
"id": "Flow_1k9gsm1",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Gateway_askQuestion",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"outgoing_sequence_flows_by_id": {
|
||||
"Flow_1k9gsm1": {
|
||||
"id": "Flow_1k9gsm1",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Gateway_askQuestion",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"data_input_associations": [],
|
||||
"data_output_associations": [],
|
||||
"typename": "UserTask",
|
||||
"extensions": {}
|
||||
},
|
||||
"Gateway_askQuestion": {
|
||||
"id": "lanes_7",
|
||||
"name": "Gateway_askQuestion",
|
||||
"description": "Do we need Clarifcation?",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"Activity_B1"
|
||||
],
|
||||
"outputs": [
|
||||
"Activity_A2",
|
||||
"Implement_Feature"
|
||||
],
|
||||
"lane": "B",
|
||||
"documentation": null,
|
||||
"loopTask": false,
|
||||
"position": {
|
||||
"x": 465.0,
|
||||
"y": 225.0
|
||||
},
|
||||
"outgoing_sequence_flows": {
|
||||
"Activity_A2": {
|
||||
"id": "Flow_0okhwy0",
|
||||
"name": "Yes",
|
||||
"documentation": null,
|
||||
"target_task_spec": "Activity_A2",
|
||||
"typename": "SequenceFlow"
|
||||
},
|
||||
"Implement_Feature": {
|
||||
"id": "Flow_182bqvo",
|
||||
"name": "No",
|
||||
"documentation": null,
|
||||
"target_task_spec": "Implement_Feature",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"outgoing_sequence_flows_by_id": {
|
||||
"Flow_0okhwy0": {
|
||||
"id": "Flow_0okhwy0",
|
||||
"name": "Yes",
|
||||
"documentation": null,
|
||||
"target_task_spec": "Activity_A2",
|
||||
"typename": "SequenceFlow"
|
||||
},
|
||||
"Flow_182bqvo": {
|
||||
"id": "Flow_182bqvo",
|
||||
"name": "No",
|
||||
"documentation": null,
|
||||
"target_task_spec": "Implement_Feature",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"data_input_associations": [],
|
||||
"data_output_associations": [],
|
||||
"default_task_spec": "Implement_Feature",
|
||||
"cond_task_specs": [
|
||||
{
|
||||
"condition": "NeedClarification == 'Yes'",
|
||||
"task_spec": "Activity_A2"
|
||||
}
|
||||
],
|
||||
"choice": null,
|
||||
"typename": "ExclusiveGateway",
|
||||
"extensions": {}
|
||||
},
|
||||
"Implement_Feature": {
|
||||
"id": "lanes_8",
|
||||
"name": "Implement_Feature",
|
||||
"description": "Implement Feature",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"Activity_A2",
|
||||
"Gateway_askQuestion"
|
||||
],
|
||||
"outputs": [
|
||||
"Activity_1uksrqx"
|
||||
],
|
||||
"lane": "B",
|
||||
"documentation": null,
|
||||
"loopTask": false,
|
||||
"position": {
|
||||
"x": 620.0,
|
||||
"y": 200.0
|
||||
},
|
||||
"outgoing_sequence_flows": {
|
||||
"Activity_1uksrqx": {
|
||||
"id": "Flow_0xz2oco",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Activity_1uksrqx",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"outgoing_sequence_flows_by_id": {
|
||||
"Flow_0xz2oco": {
|
||||
"id": "Flow_0xz2oco",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Activity_1uksrqx",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"data_input_associations": [],
|
||||
"data_output_associations": [],
|
||||
"typename": "ManualTask",
|
||||
"extensions": {}
|
||||
},
|
||||
"Activity_1uksrqx": {
|
||||
"id": "lanes_9",
|
||||
"name": "Activity_1uksrqx",
|
||||
"description": "Send to testing",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"Implement_Feature"
|
||||
],
|
||||
"outputs": [
|
||||
"Activity_0i0rxuw"
|
||||
],
|
||||
"lane": "C",
|
||||
"documentation": null,
|
||||
"loopTask": false,
|
||||
"position": {
|
||||
"x": 620.0,
|
||||
"y": 340.0
|
||||
},
|
||||
"outgoing_sequence_flows": {
|
||||
"Activity_0i0rxuw": {
|
||||
"id": "Flow_1cybznq",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Activity_0i0rxuw",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"outgoing_sequence_flows_by_id": {
|
||||
"Flow_1cybznq": {
|
||||
"id": "Flow_1cybznq",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Activity_0i0rxuw",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"data_input_associations": [],
|
||||
"data_output_associations": [],
|
||||
"typename": "ManualTask",
|
||||
"extensions": {}
|
||||
},
|
||||
"Activity_0i0rxuw": {
|
||||
"id": "lanes_10",
|
||||
"name": "Activity_0i0rxuw",
|
||||
"description": null,
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"Activity_1uksrqx"
|
||||
],
|
||||
"outputs": [
|
||||
"Event_07pakcl"
|
||||
],
|
||||
"lane": "C",
|
||||
"documentation": null,
|
||||
"loopTask": false,
|
||||
"position": {
|
||||
"x": 760.0,
|
||||
"y": 320.0
|
||||
},
|
||||
"outgoing_sequence_flows": {
|
||||
"Event_07pakcl": {
|
||||
"id": "Flow_0e1uyol",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Event_07pakcl",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"outgoing_sequence_flows_by_id": {
|
||||
"Flow_0e1uyol": {
|
||||
"id": "Flow_0e1uyol",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Event_07pakcl",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"data_input_associations": [],
|
||||
"data_output_associations": [],
|
||||
"spec": "Activity_0i0rxuw",
|
||||
"typename": "CallActivity",
|
||||
"extensions": {}
|
||||
},
|
||||
"Event_07pakcl": {
|
||||
"id": "lanes_11",
|
||||
"name": "Event_07pakcl",
|
||||
"description": null,
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"Activity_0i0rxuw"
|
||||
],
|
||||
"outputs": [
|
||||
"lanes.EndJoin"
|
||||
],
|
||||
"lane": "C",
|
||||
"documentation": null,
|
||||
"loopTask": false,
|
||||
"position": {
|
||||
"x": 1092.0,
|
||||
"y": 362.0
|
||||
},
|
||||
"outgoing_sequence_flows": {
|
||||
"lanes.EndJoin": {
|
||||
"id": "Event_07pakcl.ToEndJoin",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "lanes.EndJoin",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"outgoing_sequence_flows_by_id": {
|
||||
"Event_07pakcl.ToEndJoin": {
|
||||
"id": "Event_07pakcl.ToEndJoin",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "lanes.EndJoin",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"data_input_associations": [],
|
||||
"data_output_associations": [],
|
||||
"event_definition": {
|
||||
"internal": false,
|
||||
"external": false,
|
||||
"typename": "NoneEventDefinition"
|
||||
},
|
||||
"typename": "EndEvent",
|
||||
"extensions": {}
|
||||
},
|
||||
"Activity_A2": {
|
||||
"id": "lanes_12",
|
||||
"name": "Activity_A2",
|
||||
"description": "Clarify Request",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"Gateway_askQuestion"
|
||||
],
|
||||
"outputs": [
|
||||
"Implement_Feature"
|
||||
],
|
||||
"lane": "A",
|
||||
"documentation": null,
|
||||
"loopTask": false,
|
||||
"position": {
|
||||
"x": 530.0,
|
||||
"y": 70.0
|
||||
},
|
||||
"outgoing_sequence_flows": {
|
||||
"Implement_Feature": {
|
||||
"id": "Flow_17rng3c",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Implement_Feature",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"outgoing_sequence_flows_by_id": {
|
||||
"Flow_17rng3c": {
|
||||
"id": "Flow_17rng3c",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Implement_Feature",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"data_input_associations": [],
|
||||
"data_output_associations": [],
|
||||
"typename": "UserTask",
|
||||
"extensions": {}
|
||||
},
|
||||
"Root": {
|
||||
"id": "lanes_13",
|
||||
"name": "Root",
|
||||
"description": "",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [],
|
||||
"outputs": [],
|
||||
"typename": "Simple"
|
||||
}
|
||||
},
|
||||
"data_inputs": [],
|
||||
"data_outputs": [],
|
||||
"data_objects": {},
|
||||
"correlation_keys": {},
|
||||
"typename": "BpmnProcessSpec"
|
||||
},
|
||||
"subprocess_specs": {
|
||||
"Activity_0i0rxuw": {
|
||||
"name": "Activity_0i0rxuw",
|
||||
"description": "Activity_0i0rxuw",
|
||||
"file": "/home/essweine/work/sartography/code/SpiffWorkflow/tests/SpiffWorkflow/bpmn/data/lanes.bpmn",
|
||||
"task_specs": {
|
||||
"Start": {
|
||||
"id": "Activity_0i0rxuw_1",
|
||||
"name": "Start",
|
||||
"description": "",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
"Event_0lbloj7"
|
||||
],
|
||||
"typename": "StartTask"
|
||||
},
|
||||
"Activity_0i0rxuw.EndJoin": {
|
||||
"id": "Activity_0i0rxuw_2",
|
||||
"name": "Activity_0i0rxuw.EndJoin",
|
||||
"description": "",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"Event_1vz21ww"
|
||||
],
|
||||
"outputs": [
|
||||
"End"
|
||||
],
|
||||
"typename": "_EndJoin"
|
||||
},
|
||||
"End": {
|
||||
"id": "Activity_0i0rxuw_3",
|
||||
"name": "End",
|
||||
"description": "",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"Activity_0i0rxuw.EndJoin"
|
||||
],
|
||||
"outputs": [],
|
||||
"typename": "Simple"
|
||||
},
|
||||
"Event_0lbloj7": {
|
||||
"id": "Activity_0i0rxuw_4",
|
||||
"name": "Event_0lbloj7",
|
||||
"description": null,
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"Start"
|
||||
],
|
||||
"outputs": [
|
||||
"SubProcessTask"
|
||||
],
|
||||
"lane": "C",
|
||||
"documentation": null,
|
||||
"loopTask": false,
|
||||
"position": {
|
||||
"x": 782.0,
|
||||
"y": 362.0
|
||||
},
|
||||
"outgoing_sequence_flows": {
|
||||
"SubProcessTask": {
|
||||
"id": "Flow_086ghyu",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "SubProcessTask",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"outgoing_sequence_flows_by_id": {
|
||||
"Flow_086ghyu": {
|
||||
"id": "Flow_086ghyu",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "SubProcessTask",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"data_input_associations": [],
|
||||
"data_output_associations": [],
|
||||
"event_definition": {
|
||||
"internal": false,
|
||||
"external": false,
|
||||
"typename": "NoneEventDefinition"
|
||||
},
|
||||
"typename": "StartEvent",
|
||||
"extensions": {}
|
||||
},
|
||||
"SubProcessTask": {
|
||||
"id": "Activity_0i0rxuw_5",
|
||||
"name": "SubProcessTask",
|
||||
"description": "SubProcessTask",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"Event_0lbloj7"
|
||||
],
|
||||
"outputs": [
|
||||
"Event_1vz21ww"
|
||||
],
|
||||
"lane": "C",
|
||||
"documentation": null,
|
||||
"loopTask": false,
|
||||
"position": {
|
||||
"x": 850.0,
|
||||
"y": 340.0
|
||||
},
|
||||
"outgoing_sequence_flows": {
|
||||
"Event_1vz21ww": {
|
||||
"id": "Flow_1jw6qrj",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Event_1vz21ww",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"outgoing_sequence_flows_by_id": {
|
||||
"Flow_1jw6qrj": {
|
||||
"id": "Flow_1jw6qrj",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Event_1vz21ww",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"data_input_associations": [],
|
||||
"data_output_associations": [],
|
||||
"typename": "ManualTask",
|
||||
"extensions": {}
|
||||
},
|
||||
"Event_1vz21ww": {
|
||||
"id": "Activity_0i0rxuw_6",
|
||||
"name": "Event_1vz21ww",
|
||||
"description": null,
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"SubProcessTask"
|
||||
],
|
||||
"outputs": [
|
||||
"Activity_0i0rxuw.EndJoin"
|
||||
],
|
||||
"lane": "C",
|
||||
"documentation": null,
|
||||
"loopTask": false,
|
||||
"position": {
|
||||
"x": 982.0,
|
||||
"y": 362.0
|
||||
},
|
||||
"outgoing_sequence_flows": {
|
||||
"Activity_0i0rxuw.EndJoin": {
|
||||
"id": "Event_1vz21ww.ToEndJoin",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Activity_0i0rxuw.EndJoin",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"outgoing_sequence_flows_by_id": {
|
||||
"Event_1vz21ww.ToEndJoin": {
|
||||
"id": "Event_1vz21ww.ToEndJoin",
|
||||
"name": null,
|
||||
"documentation": null,
|
||||
"target_task_spec": "Activity_0i0rxuw.EndJoin",
|
||||
"typename": "SequenceFlow"
|
||||
}
|
||||
},
|
||||
"data_input_associations": [],
|
||||
"data_output_associations": [],
|
||||
"event_definition": {
|
||||
"internal": false,
|
||||
"external": false,
|
||||
"typename": "NoneEventDefinition"
|
||||
},
|
||||
"typename": "EndEvent",
|
||||
"extensions": {}
|
||||
}
|
||||
},
|
||||
"data_inputs": [],
|
||||
"data_outputs": [],
|
||||
"data_objects": {},
|
||||
"correlation_keys": {},
|
||||
"typename": "BpmnProcessSpec"
|
||||
}
|
||||
},
|
||||
"subprocesses": {},
|
||||
"bpmn_messages": []
|
||||
}
|
350
tests/SpiffWorkflow/bpmn/data/serialization/v1.1-multi.json
Normal file
350
tests/SpiffWorkflow/bpmn/data/serialization/v1.1-multi.json
Normal file
@ -0,0 +1,350 @@
|
||||
{
|
||||
"serializer_version": "1.1",
|
||||
"data": {},
|
||||
"last_task": "ca089728-9745-4d50-8fbc-f2f7234dec8f",
|
||||
"success": true,
|
||||
"tasks": {
|
||||
"fa4b8656-22a2-467e-8fb0-9b1d8f1f6da6": {
|
||||
"id": "fa4b8656-22a2-467e-8fb0-9b1d8f1f6da6",
|
||||
"parent": null,
|
||||
"children": [
|
||||
"ccf50f31-880b-406a-9e61-2f3d42f39d70"
|
||||
],
|
||||
"last_state_change": 1676389310.7311432,
|
||||
"state": 32,
|
||||
"task_spec": "Root",
|
||||
"triggered": false,
|
||||
"workflow_name": "main",
|
||||
"internal_data": {},
|
||||
"data": {}
|
||||
},
|
||||
"ccf50f31-880b-406a-9e61-2f3d42f39d70": {
|
||||
"id": "ccf50f31-880b-406a-9e61-2f3d42f39d70",
|
||||
"parent": "fa4b8656-22a2-467e-8fb0-9b1d8f1f6da6",
|
||||
"children": [
|
||||
"ca089728-9745-4d50-8fbc-f2f7234dec8f"
|
||||
],
|
||||
"last_state_change": 1676389310.735502,
|
||||
"state": 32,
|
||||
"task_spec": "Start",
|
||||
"triggered": false,
|
||||
"workflow_name": "main",
|
||||
"internal_data": {},
|
||||
"data": {
|
||||
"input_data": [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"ca089728-9745-4d50-8fbc-f2f7234dec8f": {
|
||||
"id": "ca089728-9745-4d50-8fbc-f2f7234dec8f",
|
||||
"parent": "ccf50f31-880b-406a-9e61-2f3d42f39d70",
|
||||
"children": [
|
||||
"513dba6b-7017-48df-a1e0-7a2c57a1042c"
|
||||
],
|
||||
"last_state_change": 1676389310.739117,
|
||||
"state": 32,
|
||||
"task_spec": "StartEvent_1",
|
||||
"triggered": false,
|
||||
"workflow_name": "main",
|
||||
"internal_data": {
|
||||
"event_fired": true
|
||||
},
|
||||
"data": {
|
||||
"input_data": [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"513dba6b-7017-48df-a1e0-7a2c57a1042c": {
|
||||
"id": "513dba6b-7017-48df-a1e0-7a2c57a1042c",
|
||||
"parent": "ca089728-9745-4d50-8fbc-f2f7234dec8f",
|
||||
"children": [
|
||||
"638ea876-beb2-4fd6-9dc3-5fd528d7cfb9"
|
||||
],
|
||||
"last_state_change": 1676389310.7412922,
|
||||
"state": 16,
|
||||
"task_spec": "Gateway_for_any_task_start",
|
||||
"triggered": false,
|
||||
"workflow_name": "main",
|
||||
"internal_data": {},
|
||||
"data": {
|
||||
"input_data": [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"638ea876-beb2-4fd6-9dc3-5fd528d7cfb9": {
|
||||
"id": "638ea876-beb2-4fd6-9dc3-5fd528d7cfb9",
|
||||
"parent": "513dba6b-7017-48df-a1e0-7a2c57a1042c",
|
||||
"children": [
|
||||
"ec145fea-d068-4401-9f6c-6903cf153b23"
|
||||
],
|
||||
"last_state_change": 1676389310.7315657,
|
||||
"state": 4,
|
||||
"task_spec": "any_task",
|
||||
"triggered": false,
|
||||
"workflow_name": "main",
|
||||
"internal_data": {
|
||||
"splits": 1,
|
||||
"runtimes": 1
|
||||
},
|
||||
"data": {
|
||||
"item": 1
|
||||
}
|
||||
},
|
||||
"ec145fea-d068-4401-9f6c-6903cf153b23": {
|
||||
"id": "ec145fea-d068-4401-9f6c-6903cf153b23",
|
||||
"parent": "638ea876-beb2-4fd6-9dc3-5fd528d7cfb9",
|
||||
"children": [
|
||||
"eccb7e2f-4b23-4b75-b9fb-e3b3a335574f"
|
||||
],
|
||||
"last_state_change": 1676389310.7325432,
|
||||
"state": 1,
|
||||
"task_spec": "Gateway_for_any_task_end",
|
||||
"triggered": false,
|
||||
"workflow_name": "main",
|
||||
"internal_data": {},
|
||||
"data": {}
|
||||
},
|
||||
"eccb7e2f-4b23-4b75-b9fb-e3b3a335574f": {
|
||||
"id": "eccb7e2f-4b23-4b75-b9fb-e3b3a335574f",
|
||||
"parent": "ec145fea-d068-4401-9f6c-6903cf153b23",
|
||||
"children": [],
|
||||
"last_state_change": 1676389310.732967,
|
||||
"state": 1,
|
||||
"task_spec": "Event_0a6d9t5",
|
||||
"triggered": false,
|
||||
"workflow_name": "main",
|
||||
"internal_data": {},
|
||||
"data": {}
|
||||
}
|
||||
},
|
||||
"root": "fa4b8656-22a2-467e-8fb0-9b1d8f1f6da6",
|
||||
"spec": {
|
||||
"name": "main",
|
||||
"description": "main",
|
||||
"file": "/home/essweine/work/sartography/code/SpiffWorkflow/tests/SpiffWorkflow/bpmn/data/diagram_1.bpmn",
|
||||
"task_specs": {
|
||||
"Start": {
|
||||
"id": "main_1",
|
||||
"name": "Start",
|
||||
"description": "",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
"StartEvent_1"
|
||||
],
|
||||
"typename": "StartTask"
|
||||
},
|
||||
"main.EndJoin": {
|
||||
"id": "main_2",
|
||||
"name": "main.EndJoin",
|
||||
"description": "",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"Event_0a6d9t5"
|
||||
],
|
||||
"outputs": [
|
||||
"End"
|
||||
],
|
||||
"typename": "_EndJoin"
|
||||
},
|
||||
"End": {
|
||||
"id": "main_3",
|
||||
"name": "End",
|
||||
"description": "",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"main.EndJoin"
|
||||
],
|
||||
"outputs": [],
|
||||
"typename": "Simple"
|
||||
},
|
||||
"StartEvent_1": {
|
||||
"id": "main_4",
|
||||
"name": "StartEvent_1",
|
||||
"description": null,
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"Start"
|
||||
],
|
||||
"outputs": [
|
||||
"Gateway_for_any_task_start"
|
||||
],
|
||||
"lane": null,
|
||||
"documentation": null,
|
||||
"loopTask": false,
|
||||
"position": {
|
||||
"x": 179.0,
|
||||
"y": 99.0
|
||||
},
|
||||
"data_input_associations": [],
|
||||
"data_output_associations": [],
|
||||
"event_definition": {
|
||||
"internal": false,
|
||||
"external": false,
|
||||
"typename": "NoneEventDefinition"
|
||||
},
|
||||
"typename": "StartEvent",
|
||||
"extensions": {}
|
||||
},
|
||||
"any_task": {
|
||||
"id": "main_5",
|
||||
"name": "any_task",
|
||||
"description": "Any Task",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"StartEvent_1",
|
||||
"Gateway_for_any_task_start"
|
||||
],
|
||||
"outputs": [
|
||||
"Gateway_for_any_task_end"
|
||||
],
|
||||
"lane": null,
|
||||
"documentation": null,
|
||||
"loopTask": false,
|
||||
"position": {
|
||||
"x": 270.0,
|
||||
"y": 77.0
|
||||
},
|
||||
"data_input_associations": [],
|
||||
"data_output_associations": [],
|
||||
"typename": "NoneTask",
|
||||
"times": {
|
||||
"name": "input_data",
|
||||
"typename": "Attrib"
|
||||
},
|
||||
"elementVar": "item",
|
||||
"collection": {
|
||||
"name": "output_data",
|
||||
"typename": "Attrib"
|
||||
},
|
||||
"completioncondition": null,
|
||||
"prevtaskclass": "SpiffWorkflow.bpmn.specs.NoneTask.NoneTask",
|
||||
"isSequential": false,
|
||||
"expanded": 1,
|
||||
"extensions": {}
|
||||
},
|
||||
"Event_0a6d9t5": {
|
||||
"id": "main_6",
|
||||
"name": "Event_0a6d9t5",
|
||||
"description": null,
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"any_task"
|
||||
],
|
||||
"outputs": [
|
||||
"main.EndJoin"
|
||||
],
|
||||
"lane": null,
|
||||
"documentation": null,
|
||||
"loopTask": false,
|
||||
"position": {
|
||||
"x": 432.0,
|
||||
"y": 99.0
|
||||
},
|
||||
"data_input_associations": [],
|
||||
"data_output_associations": [],
|
||||
"event_definition": {
|
||||
"internal": false,
|
||||
"external": false,
|
||||
"typename": "NoneEventDefinition"
|
||||
},
|
||||
"typename": "EndEvent",
|
||||
"extensions": {}
|
||||
},
|
||||
"Root": {
|
||||
"id": "main_7",
|
||||
"name": "Root",
|
||||
"description": "",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [],
|
||||
"outputs": [],
|
||||
"typename": "Simple"
|
||||
},
|
||||
"Gateway_for_any_task_start": {
|
||||
"id": "main_8",
|
||||
"name": "Gateway_for_any_task_start",
|
||||
"description": "Begin Gateway",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"StartEvent_1"
|
||||
],
|
||||
"outputs": [
|
||||
"any_task"
|
||||
],
|
||||
"lane": null,
|
||||
"documentation": null,
|
||||
"loopTask": false,
|
||||
"position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"data_input_associations": [],
|
||||
"data_output_associations": [],
|
||||
"split_task": null,
|
||||
"threshold": null,
|
||||
"cancel": false,
|
||||
"typename": "ParallelGateway"
|
||||
},
|
||||
"Gateway_for_any_task_end": {
|
||||
"id": "main_9",
|
||||
"name": "Gateway_for_any_task_end",
|
||||
"description": "End Gateway",
|
||||
"manual": false,
|
||||
"internal": false,
|
||||
"lookahead": 2,
|
||||
"inputs": [
|
||||
"any_task"
|
||||
],
|
||||
"outputs": [
|
||||
"Event_0a6d9t5"
|
||||
],
|
||||
"lane": null,
|
||||
"documentation": null,
|
||||
"loopTask": false,
|
||||
"position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"data_input_associations": [],
|
||||
"data_output_associations": [],
|
||||
"split_task": null,
|
||||
"threshold": null,
|
||||
"cancel": false,
|
||||
"typename": "ParallelGateway"
|
||||
}
|
||||
},
|
||||
"data_inputs": [],
|
||||
"data_outputs": [],
|
||||
"data_objects": {},
|
||||
"correlation_keys": {},
|
||||
"typename": "BpmnProcessSpec"
|
||||
},
|
||||
"subprocess_specs": {},
|
||||
"subprocesses": {},
|
||||
"bpmn_messages": []
|
||||
}
|
41
tests/SpiffWorkflow/bpmn/data/standard_loop.bpmn
Normal file
41
tests/SpiffWorkflow/bpmn/data/standard_loop.bpmn
Normal file
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_0zetnjn" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.11.1" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0">
|
||||
<bpmn:process id="main" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0m77cxj</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:task id="any_task" name="Any Task">
|
||||
<bpmn:incoming>Flow_0m77cxj</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1jbp2el</bpmn:outgoing>
|
||||
<bpmn:standardLoopCharacteristics testBefore="true" loopMaximum="3">
|
||||
<bpmn:loopCondition>done</bpmn:loopCondition>
|
||||
</bpmn:standardLoopCharacteristics>
|
||||
</bpmn:task>
|
||||
<bpmn:sequenceFlow id="Flow_0m77cxj" sourceRef="StartEvent_1" targetRef="any_task" />
|
||||
<bpmn:endEvent id="Event_1xk7z3g">
|
||||
<bpmn:incoming>Flow_1jbp2el</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_1jbp2el" sourceRef="any_task" targetRef="Event_1xk7z3g" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="main">
|
||||
<bpmndi:BPMNEdge id="Flow_1jbp2el_di" bpmnElement="Flow_1jbp2el">
|
||||
<di:waypoint x="370" y="117" />
|
||||
<di:waypoint x="432" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0m77cxj_di" bpmnElement="Flow_0m77cxj">
|
||||
<di:waypoint x="215" y="117" />
|
||||
<di:waypoint x="270" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1jay5wu_di" bpmnElement="any_task">
|
||||
<dc:Bounds x="270" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_1xk7z3g_di" bpmnElement="Event_1xk7z3g">
|
||||
<dc:Bounds x="432" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
39
tests/SpiffWorkflow/bpmn/data/standard_loop_invalid.bpmn
Normal file
39
tests/SpiffWorkflow/bpmn/data/standard_loop_invalid.bpmn
Normal file
@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_0zetnjn" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.11.1" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0">
|
||||
<bpmn:process id="main" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0m77cxj</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:task id="any_task" name="Any Task">
|
||||
<bpmn:incoming>Flow_0m77cxj</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1jbp2el</bpmn:outgoing>
|
||||
<bpmn:standardLoopCharacteristics />
|
||||
</bpmn:task>
|
||||
<bpmn:sequenceFlow id="Flow_0m77cxj" sourceRef="StartEvent_1" targetRef="any_task" />
|
||||
<bpmn:endEvent id="Event_1xk7z3g">
|
||||
<bpmn:incoming>Flow_1jbp2el</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_1jbp2el" sourceRef="any_task" targetRef="Event_1xk7z3g" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="main">
|
||||
<bpmndi:BPMNEdge id="Flow_1jbp2el_di" bpmnElement="Flow_1jbp2el">
|
||||
<di:waypoint x="370" y="117" />
|
||||
<di:waypoint x="432" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0m77cxj_di" bpmnElement="Flow_0m77cxj">
|
||||
<di:waypoint x="215" y="117" />
|
||||
<di:waypoint x="270" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1jay5wu_di" bpmnElement="any_task">
|
||||
<dc:Bounds x="270" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_1xk7z3g_di" bpmnElement="Event_1xk7z3g">
|
||||
<dc:Bounds x="432" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -1,129 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_015ooho" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.10.0">
|
||||
<bpmn:process id="Process_1l85e0n" name="ScriptTest" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0dsbqk4</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0dsbqk4" sourceRef="StartEvent_1" targetRef="Activity_0umlasr" />
|
||||
<bpmn:endEvent id="Event_12boxg0">
|
||||
<bpmn:incoming>Flow_18e9qgr</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:subProcess id="MyOuterSubProcess" name="MyOuterSubProcess">
|
||||
<bpmn:incoming>Flow_1ona7kk</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_18e9qgr</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics isSequential="true" camunda:collection="my_collection" camunda:elementVariable="my_var" />
|
||||
<bpmn:endEvent id="outer_end" name="outer_end">
|
||||
<bpmn:incoming>Flow_05tjul5</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:startEvent id="outer_start" name="outer_start">
|
||||
<bpmn:outgoing>Flow_1pc1vib</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:subProcess id="MyInnerSubProcess" name="MyInnerSubProcess">
|
||||
<bpmn:incoming>Flow_1pc1vib</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_05tjul5</bpmn:outgoing>
|
||||
<bpmn:startEvent id="inner_start" name="inner_start">
|
||||
<bpmn:outgoing>Flow_0hikak1</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:scriptTask id="SubProcessScript" name="SubProcessScript">
|
||||
<bpmn:incoming>Flow_0hikak1</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0oby5rd</bpmn:outgoing>
|
||||
<bpmn:script>my_var['new_info'] = "Adding this!"
|
||||
my_var['name'] = my_var['name'] + "_edit"
|
||||
</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:sequenceFlow id="Flow_0hikak1" sourceRef="inner_start" targetRef="SubProcessScript" />
|
||||
<bpmn:endEvent id="inner_end" name="inner_end">
|
||||
<bpmn:incoming>Flow_0oby5rd</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0oby5rd" sourceRef="SubProcessScript" targetRef="inner_end" />
|
||||
</bpmn:subProcess>
|
||||
<bpmn:sequenceFlow id="Flow_1pc1vib" sourceRef="outer_start" targetRef="MyInnerSubProcess" />
|
||||
<bpmn:sequenceFlow id="Flow_05tjul5" sourceRef="MyInnerSubProcess" targetRef="outer_end" />
|
||||
</bpmn:subProcess>
|
||||
<bpmn:sequenceFlow id="Flow_18e9qgr" sourceRef="MyOuterSubProcess" targetRef="Event_12boxg0" />
|
||||
<bpmn:sequenceFlow id="Flow_1ona7kk" sourceRef="Activity_0umlasr" targetRef="MyOuterSubProcess" />
|
||||
<bpmn:scriptTask id="Activity_0umlasr" name="init">
|
||||
<bpmn:incoming>Flow_0dsbqk4</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1ona7kk</bpmn:outgoing>
|
||||
<bpmn:script>my_collection = {
|
||||
'a':{'name':'Apple'},
|
||||
'b':{'name':'Bubble'},
|
||||
'c':{'name':'Crap, I should write better code'}
|
||||
}</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1l85e0n">
|
||||
<bpmndi:BPMNEdge id="Flow_0dsbqk4_di" bpmnElement="Flow_0dsbqk4">
|
||||
<di:waypoint x="215" y="177" />
|
||||
<di:waypoint x="250" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_18e9qgr_di" bpmnElement="Flow_18e9qgr">
|
||||
<di:waypoint x="1110" y="177" />
|
||||
<di:waypoint x="1182" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1ona7kk_di" bpmnElement="Flow_1ona7kk">
|
||||
<di:waypoint x="350" y="177" />
|
||||
<di:waypoint x="430" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="159" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_18x5yaj_di" bpmnElement="Activity_0umlasr">
|
||||
<dc:Bounds x="250" y="137" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_12boxg0_di" bpmnElement="Event_12boxg0">
|
||||
<dc:Bounds x="1182" y="159" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_16u5jzz_di" bpmnElement="MyOuterSubProcess" isExpanded="true">
|
||||
<dc:Bounds x="430" y="77" width="680" height="283" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_1pc1vib_di" bpmnElement="Flow_1pc1vib">
|
||||
<di:waypoint x="518" y="177" />
|
||||
<di:waypoint x="600" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_05tjul5_di" bpmnElement="Flow_05tjul5">
|
||||
<di:waypoint x="950" y="177" />
|
||||
<di:waypoint x="1002" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Event_1u4mcv3_di" bpmnElement="outer_start">
|
||||
<dc:Bounds x="482" y="159" width="36" height="36" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="474" y="202" width="53" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_0y42ecd_di" bpmnElement="outer_end">
|
||||
<dc:Bounds x="1002" y="159" width="36" height="36" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="996" y="202" width="50" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_0f3yfji_di" bpmnElement="MyInnerSubProcess" isExpanded="true">
|
||||
<dc:Bounds x="600" y="120" width="350" height="200" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_0hikak1_di" bpmnElement="Flow_0hikak1">
|
||||
<di:waypoint x="658" y="220" />
|
||||
<di:waypoint x="730" y="220" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0oby5rd_di" bpmnElement="Flow_0oby5rd">
|
||||
<di:waypoint x="830" y="220" />
|
||||
<di:waypoint x="892" y="220" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Activity_1v1rg9x_di" bpmnElement="SubProcessScript">
|
||||
<dc:Bounds x="730" y="180" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_0tdns2c_di" bpmnElement="inner_end">
|
||||
<dc:Bounds x="892" y="202" width="36" height="36" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="886" y="245" width="49" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_0557238_di" bpmnElement="inner_start">
|
||||
<dc:Bounds x="622" y="202" width="36" height="36" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="614" y="245" width="52" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -1,93 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_015ooho" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.10.0">
|
||||
<bpmn:process id="Process_1l85e0n" name="ScriptTest" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0dsbqk4</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0dsbqk4" sourceRef="StartEvent_1" targetRef="Activity_0umlasr" />
|
||||
<bpmn:endEvent id="Event_12boxg0">
|
||||
<bpmn:incoming>Flow_18e9qgr</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:subProcess id="MySubProcess" name="MySubProcess">
|
||||
<bpmn:incoming>Flow_1ona7kk</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_18e9qgr</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics isSequential="true" camunda:collection="my_collection" camunda:elementVariable="my_var" />
|
||||
<bpmn:scriptTask id="SubProcessScript" name="SubProcessScript">
|
||||
<bpmn:incoming>Flow_14l2ton</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_06gypww</bpmn:outgoing>
|
||||
<bpmn:script>my_var['new_info'] = "Adding this!"
|
||||
my_var['name'] = my_var['name'] + "_edit"</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:endEvent id="MySubProcessEnd" name="MySubProcessEnd">
|
||||
<bpmn:incoming>Flow_06gypww</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:startEvent id="MySubProcessStart" name="MySubProcessStart">
|
||||
<bpmn:outgoing>Flow_14l2ton</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:sequenceFlow id="Flow_06gypww" sourceRef="SubProcessScript" targetRef="MySubProcessEnd" />
|
||||
<bpmn:sequenceFlow id="Flow_14l2ton" sourceRef="MySubProcessStart" targetRef="SubProcessScript" />
|
||||
</bpmn:subProcess>
|
||||
<bpmn:sequenceFlow id="Flow_18e9qgr" sourceRef="MySubProcess" targetRef="Event_12boxg0" />
|
||||
<bpmn:sequenceFlow id="Flow_1ona7kk" sourceRef="Activity_0umlasr" targetRef="MySubProcess" />
|
||||
<bpmn:scriptTask id="Activity_0umlasr" name="init">
|
||||
<bpmn:incoming>Flow_0dsbqk4</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1ona7kk</bpmn:outgoing>
|
||||
<bpmn:script>my_collection = {
|
||||
'a':{'name':'Apple'},
|
||||
'b':{'name':'Bubble'},
|
||||
'c':{'name':'Crap, I should write better code'}
|
||||
}</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1l85e0n">
|
||||
<bpmndi:BPMNEdge id="Flow_1ona7kk_di" bpmnElement="Flow_1ona7kk">
|
||||
<di:waypoint x="350" y="177" />
|
||||
<di:waypoint x="430" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_18e9qgr_di" bpmnElement="Flow_18e9qgr">
|
||||
<di:waypoint x="940" y="177" />
|
||||
<di:waypoint x="1032" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0dsbqk4_di" bpmnElement="Flow_0dsbqk4">
|
||||
<di:waypoint x="215" y="177" />
|
||||
<di:waypoint x="250" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="159" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_12boxg0_di" bpmnElement="Event_12boxg0">
|
||||
<dc:Bounds x="1032" y="159" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_16u5jzz_di" bpmnElement="MySubProcess" isExpanded="true">
|
||||
<dc:Bounds x="430" y="77" width="510" height="200" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_14l2ton_di" bpmnElement="Flow_14l2ton">
|
||||
<di:waypoint x="518" y="177" />
|
||||
<di:waypoint x="640" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_06gypww_di" bpmnElement="Flow_06gypww">
|
||||
<di:waypoint x="740" y="177" />
|
||||
<di:waypoint x="862" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Activity_1v1rg9x_di" bpmnElement="SubProcessScript">
|
||||
<dc:Bounds x="640" y="137" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_0y42ecd_di" bpmnElement="MySubProcessEnd">
|
||||
<dc:Bounds x="862" y="159" width="36" height="36" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="839" y="202" width="82" height="27" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_1u4mcv3_di" bpmnElement="MySubProcessStart">
|
||||
<dc:Bounds x="482" y="159" width="36" height="36" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="458" y="202" width="85" height="27" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_18x5yaj_di" bpmnElement="Activity_0umlasr">
|
||||
<dc:Bounds x="250" y="137" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -1,59 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_015ooho" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.7.0">
|
||||
<bpmn:process id="Process_1l85e0n" name="ScriptTest" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0dsbqk4</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0dsbqk4" sourceRef="StartEvent_1" targetRef="Activity_16giml8" />
|
||||
<bpmn:endEvent id="Event_12boxg0">
|
||||
<bpmn:incoming>Flow_1lbqsop</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:scriptTask id="Activity_1kkxlz7" name="Second Script">
|
||||
<bpmn:incoming>Flow_0n1o8w6</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1lbqsop</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics isSequential="true" camunda:collection="coll" camunda:elementVariable="a">
|
||||
<bpmn:loopCardinality xsi:type="bpmn:tFormalExpression">5</bpmn:loopCardinality>
|
||||
<bpmn:completionCondition xsi:type="bpmn:tFormalExpression">done==True</bpmn:completionCondition>
|
||||
</bpmn:multiInstanceLoopCharacteristics>
|
||||
<bpmn:script>x = {'a':a}
|
||||
if a==3:
|
||||
done=True
|
||||
a=x</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:sequenceFlow id="Flow_1lbqsop" sourceRef="Activity_1kkxlz7" targetRef="Event_12boxg0" />
|
||||
<bpmn:sequenceFlow id="Flow_0n1o8w6" sourceRef="Activity_16giml8" targetRef="Activity_1kkxlz7" />
|
||||
<bpmn:scriptTask id="Activity_16giml8" name="init">
|
||||
<bpmn:incoming>Flow_0dsbqk4</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0n1o8w6</bpmn:outgoing>
|
||||
<bpmn:script>done=False</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1l85e0n">
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="152" y="109" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_0dsbqk4_di" bpmnElement="Flow_0dsbqk4">
|
||||
<di:waypoint x="188" y="127" />
|
||||
<di:waypoint x="250" y="127" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Event_12boxg0_di" bpmnElement="Event_12boxg0">
|
||||
<dc:Bounds x="632" y="109" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1v1rg9x_di" bpmnElement="Activity_1kkxlz7">
|
||||
<dc:Bounds x="440" y="87" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_1lbqsop_di" bpmnElement="Flow_1lbqsop">
|
||||
<di:waypoint x="540" y="127" />
|
||||
<di:waypoint x="632" y="127" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0n1o8w6_di" bpmnElement="Flow_0n1o8w6">
|
||||
<di:waypoint x="350" y="127" />
|
||||
<di:waypoint x="440" y="127" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Activity_0fx0yfe_di" bpmnElement="Activity_16giml8">
|
||||
<dc:Bounds x="250" y="87" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -1,93 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_015ooho" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.10.0">
|
||||
<bpmn:process id="Process_1l85e0n" name="ScriptTest" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0dsbqk4</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0dsbqk4" sourceRef="StartEvent_1" targetRef="Activity_0umlasr" />
|
||||
<bpmn:endEvent id="Event_12boxg0">
|
||||
<bpmn:incoming>Flow_18e9qgr</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:subProcess id="MySubProcess" name="MySubProcess">
|
||||
<bpmn:incoming>Flow_1ona7kk</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_18e9qgr</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics camunda:collection="my_collection" camunda:elementVariable="my_var" />
|
||||
<bpmn:scriptTask id="SubProcessScript" name="SubProcessScript">
|
||||
<bpmn:incoming>Flow_14l2ton</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_06gypww</bpmn:outgoing>
|
||||
<bpmn:script>my_var['new_info'] = "Adding this!"
|
||||
my_var['name'] = my_var['name'] + "_edit"</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:endEvent id="MySubProcessEnd" name="MySubProcessEnd">
|
||||
<bpmn:incoming>Flow_06gypww</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:startEvent id="MySubProcessStart" name="MySubProcessStart">
|
||||
<bpmn:outgoing>Flow_14l2ton</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:sequenceFlow id="Flow_06gypww" sourceRef="SubProcessScript" targetRef="MySubProcessEnd" />
|
||||
<bpmn:sequenceFlow id="Flow_14l2ton" sourceRef="MySubProcessStart" targetRef="SubProcessScript" />
|
||||
</bpmn:subProcess>
|
||||
<bpmn:sequenceFlow id="Flow_18e9qgr" sourceRef="MySubProcess" targetRef="Event_12boxg0" />
|
||||
<bpmn:sequenceFlow id="Flow_1ona7kk" sourceRef="Activity_0umlasr" targetRef="MySubProcess" />
|
||||
<bpmn:scriptTask id="Activity_0umlasr" name="init">
|
||||
<bpmn:incoming>Flow_0dsbqk4</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1ona7kk</bpmn:outgoing>
|
||||
<bpmn:script>my_collection = {
|
||||
'a':{'name':'Apple'},
|
||||
'b':{'name':'Bubble'},
|
||||
'c':{'name':'Crap, I should write better code'}
|
||||
}</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1l85e0n">
|
||||
<bpmndi:BPMNEdge id="Flow_1ona7kk_di" bpmnElement="Flow_1ona7kk">
|
||||
<di:waypoint x="350" y="177" />
|
||||
<di:waypoint x="430" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_18e9qgr_di" bpmnElement="Flow_18e9qgr">
|
||||
<di:waypoint x="940" y="177" />
|
||||
<di:waypoint x="1032" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0dsbqk4_di" bpmnElement="Flow_0dsbqk4">
|
||||
<di:waypoint x="215" y="177" />
|
||||
<di:waypoint x="250" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="159" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_12boxg0_di" bpmnElement="Event_12boxg0">
|
||||
<dc:Bounds x="1032" y="159" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_16u5jzz_di" bpmnElement="MySubProcess" isExpanded="true">
|
||||
<dc:Bounds x="430" y="77" width="510" height="200" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_14l2ton_di" bpmnElement="Flow_14l2ton">
|
||||
<di:waypoint x="518" y="177" />
|
||||
<di:waypoint x="640" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_06gypww_di" bpmnElement="Flow_06gypww">
|
||||
<di:waypoint x="740" y="177" />
|
||||
<di:waypoint x="862" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Activity_1v1rg9x_di" bpmnElement="SubProcessScript">
|
||||
<dc:Bounds x="640" y="137" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_0y42ecd_di" bpmnElement="MySubProcessEnd">
|
||||
<dc:Bounds x="862" y="159" width="36" height="36" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="839" y="202" width="82" height="27" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_1u4mcv3_di" bpmnElement="MySubProcessStart">
|
||||
<dc:Bounds x="482" y="159" width="36" height="36" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="458" y="202" width="85" height="27" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_18x5yaj_di" bpmnElement="Activity_0umlasr">
|
||||
<dc:Bounds x="250" y="137" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -1,79 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_0r1c9o8" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.11.1" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0">
|
||||
<bpmn:collaboration id="Collaboration_1i7mjwg">
|
||||
<bpmn:participant id="Participant_0up2p6u" name="Participant 1" processRef="Proc_1" />
|
||||
<bpmn:participant id="Participant_0jlaump" name="Participant 2" processRef="Proc_2" />
|
||||
</bpmn:collaboration>
|
||||
<bpmn:process id="Proc_1" name="Process 1" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_1fumg40</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:sequenceFlow id="Flow_1fumg40" sourceRef="StartEvent_1" targetRef="Activity_15qpnpw" />
|
||||
<bpmn:endEvent id="Event_192zvak">
|
||||
<bpmn:incoming>Flow_1sfcxwo</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_1sfcxwo" sourceRef="Activity_15qpnpw" targetRef="Event_192zvak" />
|
||||
<bpmn:userTask id="Activity_15qpnpw" name="Process 1 Task">
|
||||
<bpmn:incoming>Flow_1fumg40</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1sfcxwo</bpmn:outgoing>
|
||||
</bpmn:userTask>
|
||||
</bpmn:process>
|
||||
<bpmn:process id="Proc_2" isExecutable="true">
|
||||
<bpmn:startEvent id="Event_03ne9sv">
|
||||
<bpmn:outgoing>Flow_0ptjvq1</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0ptjvq1" sourceRef="Event_03ne9sv" targetRef="Activity_15qii7z" />
|
||||
<bpmn:endEvent id="Event_10ar29a">
|
||||
<bpmn:incoming>Flow_12xe6lg</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_12xe6lg" sourceRef="Activity_15qii7z" targetRef="Event_10ar29a" />
|
||||
<bpmn:userTask id="Activity_15qii7z" name="Process 2 Task">
|
||||
<bpmn:incoming>Flow_0ptjvq1</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_12xe6lg</bpmn:outgoing>
|
||||
</bpmn:userTask>
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1i7mjwg">
|
||||
<bpmndi:BPMNShape id="Participant_0up2p6u_di" bpmnElement="Participant_0up2p6u" isHorizontal="true">
|
||||
<dc:Bounds x="120" y="52" width="400" height="250" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_1fumg40_di" bpmnElement="Flow_1fumg40">
|
||||
<di:waypoint x="215" y="177" />
|
||||
<di:waypoint x="270" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1sfcxwo_di" bpmnElement="Flow_1sfcxwo">
|
||||
<di:waypoint x="370" y="177" />
|
||||
<di:waypoint x="432" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="159" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_192zvak_di" bpmnElement="Event_192zvak">
|
||||
<dc:Bounds x="432" y="159" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1loi9tx_di" bpmnElement="Activity_15qpnpw">
|
||||
<dc:Bounds x="270" y="137" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Participant_0jlaump_di" bpmnElement="Participant_0jlaump" isHorizontal="true">
|
||||
<dc:Bounds x="120" y="340" width="400" height="250" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_0ptjvq1_di" bpmnElement="Flow_0ptjvq1">
|
||||
<di:waypoint x="218" y="470" />
|
||||
<di:waypoint x="270" y="470" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_12xe6lg_di" bpmnElement="Flow_12xe6lg">
|
||||
<di:waypoint x="370" y="470" />
|
||||
<di:waypoint x="422" y="470" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Event_03ne9sv_di" bpmnElement="Event_03ne9sv">
|
||||
<dc:Bounds x="182" y="452" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_10ar29a_di" bpmnElement="Event_10ar29a">
|
||||
<dc:Bounds x="422" y="452" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_0xvun11_di" bpmnElement="Activity_15qii7z">
|
||||
<dc:Bounds x="270" y="430" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -8,7 +8,7 @@ from SpiffWorkflow.task import TaskState
|
||||
|
||||
from ..BpmnWorkflowTestCase import BpmnWorkflowTestCase
|
||||
|
||||
class EventBsedGatewayTest(BpmnWorkflowTestCase):
|
||||
class EventBasedGatewayTest(BpmnWorkflowTestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.spec, self.subprocesses = self.load_workflow_spec('event-gateway.bpmn', 'Process_0pvx19v')
|
||||
|
@ -29,17 +29,17 @@ class TransactionSubprocessTest(BpmnWorkflowTestCase):
|
||||
|
||||
# Check that workflow and next task completed
|
||||
subprocess = self.workflow.get_tasks_from_spec_name('Subprocess')[0]
|
||||
self.assertEqual(subprocess.get_state(), TaskState.COMPLETED)
|
||||
self.assertEqual(subprocess.state, TaskState.COMPLETED)
|
||||
print_task = self.workflow.get_tasks_from_spec_name("Activity_Print_Data")[0]
|
||||
self.assertEqual(print_task.get_state(), TaskState.COMPLETED)
|
||||
self.assertEqual(print_task.state, TaskState.COMPLETED)
|
||||
|
||||
# Check that the boundary events were cancelled
|
||||
cancel_task = self.workflow.get_tasks_from_spec_name("Catch_Cancel_Event")[0]
|
||||
self.assertEqual(cancel_task.get_state(), TaskState.CANCELLED)
|
||||
self.assertEqual(cancel_task.state, TaskState.CANCELLED)
|
||||
error_1_task = self.workflow.get_tasks_from_spec_name("Catch_Error_1")[0]
|
||||
self.assertEqual(error_1_task.get_state(), TaskState.CANCELLED)
|
||||
self.assertEqual(error_1_task.state, TaskState.CANCELLED)
|
||||
error_none_task = self.workflow.get_tasks_from_spec_name("Catch_Error_None")[0]
|
||||
self.assertEqual(error_none_task.get_state(), TaskState.CANCELLED)
|
||||
self.assertEqual(error_none_task.state, TaskState.CANCELLED)
|
||||
|
||||
|
||||
def testSubworkflowCancelEvent(self):
|
||||
@ -56,13 +56,13 @@ class TransactionSubprocessTest(BpmnWorkflowTestCase):
|
||||
|
||||
# Check that we completed the Cancel Task
|
||||
cancel_task = self.workflow.get_tasks_from_spec_name("Cancel_Action")[0]
|
||||
self.assertEqual(cancel_task.get_state(), TaskState.COMPLETED)
|
||||
self.assertEqual(cancel_task.state, TaskState.COMPLETED)
|
||||
|
||||
# And cancelled the remaining tasks
|
||||
error_1_task = self.workflow.get_tasks_from_spec_name("Catch_Error_1")[0]
|
||||
self.assertEqual(error_1_task.get_state(), TaskState.CANCELLED)
|
||||
self.assertEqual(error_1_task.state, TaskState.CANCELLED)
|
||||
error_none_task = self.workflow.get_tasks_from_spec_name("Catch_Error_None")[0]
|
||||
self.assertEqual(error_none_task.get_state(), TaskState.CANCELLED)
|
||||
self.assertEqual(error_none_task.state, TaskState.CANCELLED)
|
||||
|
||||
# We should not have this task, as we followed the 'cancel branch'
|
||||
print_task = self.workflow.get_tasks_from_spec_name("Activity_Print_Data")
|
||||
@ -87,13 +87,13 @@ class TransactionSubprocessTest(BpmnWorkflowTestCase):
|
||||
|
||||
# The cancel boundary event should be cancelled
|
||||
cancel_task = self.workflow.get_tasks_from_spec_name("Catch_Cancel_Event")[0]
|
||||
self.assertEqual(cancel_task.get_state(), TaskState.CANCELLED)
|
||||
self.assertEqual(cancel_task.state, TaskState.CANCELLED)
|
||||
|
||||
# We should catch the None Error, but not Error 1
|
||||
error_none_task = self.workflow.get_tasks_from_spec_name("Catch_Error_None")[0]
|
||||
self.assertEqual(error_none_task.get_state(), TaskState.COMPLETED)
|
||||
self.assertEqual(error_none_task.state, TaskState.COMPLETED)
|
||||
error_1_task = self.workflow.get_tasks_from_spec_name("Catch_Error_1")[0]
|
||||
self.assertEqual(error_1_task.get_state(), TaskState.CANCELLED)
|
||||
self.assertEqual(error_1_task.state, TaskState.CANCELLED)
|
||||
|
||||
# Make sure this branch didn't getfollowed
|
||||
print_task = self.workflow.get_tasks_from_spec_name("Activity_Print_Data")
|
||||
@ -117,9 +117,9 @@ class TransactionSubprocessTest(BpmnWorkflowTestCase):
|
||||
|
||||
# Both boundary events should complete
|
||||
error_none_task = self.workflow.get_tasks_from_spec_name("Catch_Error_None")[0]
|
||||
self.assertEqual(error_none_task.get_state(), TaskState.COMPLETED)
|
||||
self.assertEqual(error_none_task.state, TaskState.COMPLETED)
|
||||
error_1_task = self.workflow.get_tasks_from_spec_name("Catch_Error_1")[0]
|
||||
self.assertEqual(error_1_task.get_state(), TaskState.COMPLETED)
|
||||
self.assertEqual(error_1_task.state, TaskState.COMPLETED)
|
||||
|
||||
print_task = self.workflow.get_tasks_from_spec_name("Activity_Print_Data")
|
||||
self.assertEqual(len(print_task), 0)
|
||||
|
@ -4,15 +4,16 @@ import time
|
||||
from SpiffWorkflow.task import TaskState
|
||||
from SpiffWorkflow.bpmn.PythonScriptEngine import PythonScriptEngine
|
||||
from SpiffWorkflow.bpmn.PythonScriptEngineEnvironment import TaskDataEnvironment
|
||||
from SpiffWorkflow.bpmn.serializer.migration.exceptions import VersionMigrationError
|
||||
|
||||
from .BaseTestCase import BaseTestCase
|
||||
|
||||
|
||||
class VersionMigrationTest(BaseTestCase):
|
||||
class Version_1_0_Test(BaseTestCase):
|
||||
|
||||
SERIALIZER_VERSION = "1.2"
|
||||
|
||||
def test_convert_1_0_to_1_1(self):
|
||||
def test_convert_subprocess(self):
|
||||
# The serialization used here comes from NestedSubprocessTest saved at line 25 with version 1.0
|
||||
fn = os.path.join(self.DATA_DIR, 'serialization', 'v1.0.json')
|
||||
wf = self.serializer.deserialize_json(open(fn).read())
|
||||
@ -23,10 +24,38 @@ class VersionMigrationTest(BaseTestCase):
|
||||
wf.do_engine_steps()
|
||||
self.assertEqual(True, wf.is_completed())
|
||||
|
||||
def test_convert_1_1_to_1_2(self):
|
||||
fn = os.path.join(self.DATA_DIR, 'serialization', 'v1-1.json')
|
||||
|
||||
class Version_1_1_Test(BaseTestCase):
|
||||
|
||||
def test_timers(self):
|
||||
fn = os.path.join(self.DATA_DIR, 'serialization', 'v1.1-timers.json')
|
||||
wf = self.serializer.deserialize_json(open(fn).read())
|
||||
wf.script_engine = PythonScriptEngine(environment=TaskDataEnvironment({"time": time}))
|
||||
wf.refresh_waiting_tasks()
|
||||
wf.do_engine_steps()
|
||||
self.assertTrue(wf.is_completed())
|
||||
|
||||
def test_convert_data_specs(self):
|
||||
fn = os.path.join(self.DATA_DIR, 'serialization', 'v1.1-data.json')
|
||||
wf = self.serializer.deserialize_json(open(fn).read())
|
||||
wf.do_engine_steps()
|
||||
self.assertTrue(wf.is_completed())
|
||||
|
||||
def test_convert_exclusive_gateway(self):
|
||||
fn = os.path.join(self.DATA_DIR, 'serialization', 'v1.1-gateways.json')
|
||||
wf = self.serializer.deserialize_json(open(fn).read())
|
||||
wf.do_engine_steps()
|
||||
task = wf.get_tasks_from_spec_name('Gateway_askQuestion')[0]
|
||||
self.assertEqual(len(task.task_spec.cond_task_specs), 2)
|
||||
ready_task = wf.get_ready_user_tasks()[0]
|
||||
ready_task.data['NeedClarification'] = 'Yes'
|
||||
ready_task.complete()
|
||||
wf.do_engine_steps()
|
||||
ready_task = wf.get_ready_user_tasks()[0]
|
||||
self.assertEqual(ready_task.task_spec.name, 'Activity_A2')
|
||||
|
||||
def test_check_multiinstance(self):
|
||||
fn = os.path.join(self.DATA_DIR, 'serialization', 'v1.1-multi.json')
|
||||
with self.assertRaises(VersionMigrationError) as ctx:
|
||||
wf = self.serializer.deserialize_json(open(fn).read())
|
||||
self.assertEqual(ctx.exception.message, "This workflow cannot be migrated because it contains MultiInstance Tasks")
|
@ -1,60 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
import unittest
|
||||
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
|
||||
from tests.SpiffWorkflow.camunda.BaseTestCase import BaseTestCase
|
||||
|
||||
__author__ = 'matth'
|
||||
|
||||
class DefaultGatewayPMITest(BaseTestCase):
|
||||
"""The example bpmn diagram tests both a set cardinality from user input
|
||||
as well as looping over an existing array."""
|
||||
|
||||
def setUp(self):
|
||||
spec, subprocesses = self.load_workflow_spec('default_gateway_pmi.bpmn', 'DefaultGateway')
|
||||
self.workflow = BpmnWorkflow(spec, subprocesses)
|
||||
self.workflow.do_engine_steps()
|
||||
|
||||
def testRunThroughHappy(self):
|
||||
self.actual_test(False)
|
||||
|
||||
def testRunThroughSaveRestore(self):
|
||||
self.actual_test(True)
|
||||
|
||||
def actual_test(self, save_restore=False):
|
||||
|
||||
# Set initial array size to 3 in the first user form.
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
self.assertEqual("DoStuff", task.task_spec.name)
|
||||
task.update_data({"morestuff": 'Yep'})
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
self.workflow.do_engine_steps()
|
||||
if save_restore: self.save_restore()
|
||||
|
||||
# Set the names of the 3 family members.
|
||||
for i in range(3):
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
if i == 0:
|
||||
self.assertEqual("GetMoreStuff", task.task_spec.name)
|
||||
else:
|
||||
self.assertEqual("GetMoreStuff_%d"%(i-1), task.task_spec.name)
|
||||
|
||||
|
||||
task.update_data({"stuff.addstuff": "Stuff %d"%i})
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
if save_restore: self.save_restore()
|
||||
self.workflow.do_engine_steps()
|
||||
|
||||
if save_restore: self.save_restore()
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
|
||||
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromTestCase(DefaultGatewayPMITest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.TextTestRunner(verbosity=2).run(suite())
|
@ -1,68 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import unittest
|
||||
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
|
||||
from tests.SpiffWorkflow.camunda.BaseTestCase import BaseTestCase
|
||||
|
||||
__author__ = 'matth'
|
||||
|
||||
|
||||
class ExclusiveGatewayPMITest(BaseTestCase):
|
||||
"""The example bpmn diagram tests both a set cardinality from user input
|
||||
as well as looping over an existing array."""
|
||||
|
||||
def setUp(self):
|
||||
spec, subprocesses = self.load_workflow_spec('default_gateway_pmi.bpmn', 'DefaultGateway')
|
||||
self.workflow = BpmnWorkflow(spec, subprocesses)
|
||||
|
||||
def testRunThroughHappy(self):
|
||||
self.actual_test(False)
|
||||
|
||||
def testRunThroughSaveRestore(self):
|
||||
self.actual_test(True)
|
||||
|
||||
def testRunThroughHappyNo(self):
|
||||
self.actual_test(False,'No')
|
||||
|
||||
def testRunThroughSaveRestoreNo(self):
|
||||
self.actual_test(True,'No')
|
||||
|
||||
def actual_test(self, save_restore=False,response='Yes'):
|
||||
|
||||
self.workflow.do_engine_steps()
|
||||
|
||||
# Set initial array size to 3 in the first user form.
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
self.assertEqual("DoStuff", task.task_spec.name)
|
||||
task.update_data({"morestuff": response})
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
self.workflow.do_engine_steps()
|
||||
if save_restore: self.save_restore()
|
||||
|
||||
# Set the names of the 3 family members.
|
||||
if response == 'Yes':
|
||||
for i in range(3):
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
if i == 0:
|
||||
self.assertEqual("GetMoreStuff", task.task_spec.name)
|
||||
else:
|
||||
self.assertEqual("GetMoreStuff_%d"%(i-1), task.task_spec.name)
|
||||
|
||||
|
||||
task.update_data({"stuff.addstuff": "Stuff %d"%i})
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
if save_restore: self.save_restore()
|
||||
self.workflow.do_engine_steps()
|
||||
|
||||
if save_restore: self.save_restore()
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
|
||||
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromTestCase(ExclusiveGatewayPMITest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.TextTestRunner(verbosity=2).run(suite())
|
@ -1,222 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import unittest
|
||||
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
from SpiffWorkflow.exceptions import WorkflowException
|
||||
|
||||
from tests.SpiffWorkflow.camunda.BaseTestCase import BaseTestCase
|
||||
|
||||
__author__ = 'matth'
|
||||
|
||||
|
||||
class MultiInstanceArrayTest(BaseTestCase):
|
||||
"""The example bpmn diagram tests both a set cardinality from user input
|
||||
as well as looping over an existing array."""
|
||||
|
||||
def setUp(self):
|
||||
spec, subprocesses = self.load_workflow_spec('multi_instance_array.bpmn', 'MultiInstanceArray')
|
||||
self.workflow = BpmnWorkflow(spec, subprocesses)
|
||||
self.workflow.do_engine_steps()
|
||||
|
||||
def testRunThroughHappy(self):
|
||||
self.actual_test(False)
|
||||
|
||||
def testRunThroughSaveRestore(self):
|
||||
self.actual_test(True)
|
||||
|
||||
|
||||
def testRunThroughHappyList(self):
|
||||
self.actual_test2(False)
|
||||
|
||||
def testRunThroughSaveRestoreList(self):
|
||||
self.actual_test2(True)
|
||||
|
||||
def testRunThroughHappyDict(self):
|
||||
self.actual_test_with_dict(False)
|
||||
|
||||
def testRunThroughSaveRestoreDict(self):
|
||||
self.actual_test_with_dict(True)
|
||||
|
||||
def testGetTaskExtensions(self):
|
||||
self.actual_test_for_extensions(False)
|
||||
|
||||
|
||||
def actual_test(self, save_restore=False):
|
||||
|
||||
# Set initial array size to 3 in the first user form.
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
taskinfo = task.task_info()
|
||||
self.assertEqual(taskinfo,{'is_looping':False,
|
||||
'is_sequential_mi':False,
|
||||
'is_parallel_mi':False,
|
||||
'mi_count':0,
|
||||
'mi_index':0})
|
||||
self.assertEqual("Activity_FamSize", task.task_spec.name)
|
||||
task.update_data({"Family": {"Size": 3}})
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
if save_restore: self.save_restore()
|
||||
|
||||
# Set the names of the 3 family members.
|
||||
for i in range(3):
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
taskinfo = task.task_info()
|
||||
self.assertEqual(taskinfo, {'is_looping': False,
|
||||
'is_sequential_mi': True,
|
||||
'is_parallel_mi': False,
|
||||
'mi_count': 3,
|
||||
'mi_index': i+1})
|
||||
if i > 0:
|
||||
self.assertEqual("FamilyMemberTask"+"_%d"%(i-1), task.task_spec.name)
|
||||
else:
|
||||
self.assertEqual("FamilyMemberTask", task.task_spec.name)
|
||||
|
||||
|
||||
task.update_data({"FamilyMember": {"FirstName": "The Funk #%i" % i}})
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
if save_restore: self.save_restore()
|
||||
self.workflow.do_engine_steps()
|
||||
|
||||
self.assertEqual({'1': {'FirstName': 'The Funk #0'},
|
||||
'2': {'FirstName': 'The Funk #1'},
|
||||
'3': {'FirstName': 'The Funk #2'}},
|
||||
task.data["Family"]["Members"])
|
||||
#### NB - start here
|
||||
### Data is not correctly getting to the next task upon complete of the last task
|
||||
### after do_engine_steps, the next task in the list should be the same as task.data
|
||||
### but it is not.
|
||||
|
||||
### invalid copy of data?? ## appears that parent is not hooked up correctly
|
||||
|
||||
# Set the birthdays of the 3 family members.
|
||||
for i in range(3):
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
if i > 0:
|
||||
self.assertEqual("FamilyMemberBday"+"_%d"%(i-1), task.task_spec.name)
|
||||
else:
|
||||
self.assertEqual("FamilyMemberBday", task.task_spec.name)
|
||||
task.update_data({"CurrentFamilyMember": {"Birthdate": "10/0%i/1985" % i}})
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
if save_restore: self.save_restore()
|
||||
self.workflow.do_engine_steps()
|
||||
|
||||
self.workflow.do_engine_steps()
|
||||
if save_restore: self.save_restore()
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
|
||||
self.assertEqual({'1': {'FirstName': 'The Funk #0', "Birthdate": "10/00/1985"},
|
||||
'2': {'FirstName': 'The Funk #1', "Birthdate": "10/01/1985"},
|
||||
'3': {'FirstName': 'The Funk #2', "Birthdate": "10/02/1985"}},
|
||||
self.workflow.last_task.data["Family"]["Members"])
|
||||
|
||||
|
||||
|
||||
|
||||
def actual_test2(self, save_restore=False):
|
||||
|
||||
# Set initial array size to 3 in the first user form.
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
self.assertEqual("Activity_FamSize", task.task_spec.name)
|
||||
task.update_data({"Family":{"Size": 3}})
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
if save_restore: self.save_restore()
|
||||
|
||||
# Set the names of the 3 family members.
|
||||
for i in range(3):
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
if i > 0:
|
||||
self.assertEqual("FamilyMemberTask"+"_%d"%(i-1), task.task_spec.name)
|
||||
else:
|
||||
self.assertEqual("FamilyMemberTask", task.task_spec.name)
|
||||
task.update_data({"FamilyMember": {"FirstName": "The Funk #%i" % i}})
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
if save_restore: self.save_restore()
|
||||
|
||||
self.assertEqual({'1': {'FirstName': 'The Funk #0'},
|
||||
'2': {'FirstName': 'The Funk #1'},
|
||||
'3': {'FirstName': 'The Funk #2'}},
|
||||
task.data["Family"]["Members"])
|
||||
|
||||
|
||||
# Make sure that if we have a list as both input and output
|
||||
# collection, that we raise an exception
|
||||
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
task.data['Family']['Members'] = ['The Funk #0','The Funk #1','The Funk #2']
|
||||
self.assertEqual("FamilyMemberBday", task.task_spec.name)
|
||||
task.update_data(
|
||||
{"CurrentFamilyMember": {"Birthdate": "10/0%i/1985" % i}})
|
||||
with self.assertRaises(WorkflowException) as context:
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
|
||||
|
||||
def actual_test_with_dict(self, save_restore=False):
|
||||
|
||||
# Set initial array size to 3 in the first user form.
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
self.assertEqual("Activity_FamSize", task.task_spec.name)
|
||||
task.update_data({"Family":{"Size": 3}})
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
if save_restore: self.save_restore()
|
||||
|
||||
# Set the names of the 3 family members.
|
||||
for i in range(3):
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
if i > 0:
|
||||
self.assertEqual("FamilyMemberTask"+"_%d"%(i-1), task.task_spec.name)
|
||||
else:
|
||||
self.assertEqual("FamilyMemberTask", task.task_spec.name)
|
||||
task.update_data({"FamilyMember": {"FirstName": "The Funk #%i" % i}})
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
if save_restore: self.save_restore()
|
||||
|
||||
self.assertEqual({'1': {'FirstName': 'The Funk #0'},
|
||||
'2': {'FirstName': 'The Funk #1'},
|
||||
'3': {'FirstName': 'The Funk #2'}},
|
||||
task.data["Family"]["Members"])
|
||||
|
||||
|
||||
|
||||
# Set the birthdays of the 3 family members.
|
||||
for i in range(3):
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
if i == 0:
|
||||
# Modify so that the dict keys are alpha rather than int
|
||||
task.data["Family"]["Members"] = {
|
||||
"a": {'FirstName': 'The Funk #0'},
|
||||
"b": {'FirstName': 'The Funk #1'},
|
||||
"c": {'FirstName': 'The Funk #2'}}
|
||||
if (i > 0):
|
||||
self.assertEqual("FamilyMemberBday"+"_%d"%(i-1), task.task_spec.name)
|
||||
else:
|
||||
self.assertEqual("FamilyMemberBday", task.task_spec.name)
|
||||
task.update_data(
|
||||
{"CurrentFamilyMember": {"Birthdate": "10/0%i/1985" % i}})
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
# if save_restore: self.save_restore()
|
||||
|
||||
self.workflow.do_engine_steps()
|
||||
if save_restore: self.save_restore()
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
|
||||
self.assertEqual({"a": {'FirstName': 'The Funk #0', "Birthdate": "10/00/1985"},
|
||||
"b": {'FirstName': 'The Funk #1', "Birthdate": "10/01/1985"},
|
||||
"c": {'FirstName': 'The Funk #2', "Birthdate": "10/02/1985"}},
|
||||
self.workflow.last_task.data["Family"]["Members"])
|
||||
|
||||
|
||||
|
||||
def actual_test_for_extensions(self, save_restore=False):
|
||||
|
||||
# Set initial array size to 3 in the first user form.
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
self.assertEqual("Activity_FamSize", task.task_spec.name)
|
||||
extensions = task.task_spec.extensions # assume bpmn
|
||||
self.assertEqual(extensions,{'Test1':'Value1','Test2':'Value2'})
|
||||
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromTestCase(MultiInstanceArrayTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.TextTestRunner(verbosity=2).run(suite())
|
@ -15,32 +15,21 @@ class MultiInstanceDMNTest(BaseTestCase):
|
||||
self.script_engine = PythonScriptEngine(environment=BoxedTaskDataEnvironment())
|
||||
self.workflow.script_engine = self.script_engine
|
||||
|
||||
def testConstructor(self):
|
||||
pass # this is accomplished through setup.
|
||||
|
||||
def testDmnHappy(self):
|
||||
self.workflow.do_engine_steps()
|
||||
self.workflow.complete_next()
|
||||
self.workflow.do_engine_steps()
|
||||
self.workflow.complete_next()
|
||||
self.workflow.do_engine_steps()
|
||||
self.assertEqual(self.workflow.data['stuff']['E']['y'], 'D')
|
||||
|
||||
|
||||
def testDmnSaveRestore(self):
|
||||
|
||||
self.save_restore()
|
||||
self.workflow.script_engine = self.script_engine
|
||||
self.workflow.do_engine_steps()
|
||||
self.workflow.complete_next()
|
||||
self.save_restore()
|
||||
self.workflow.script_engine = self.script_engine
|
||||
self.workflow.do_engine_steps()
|
||||
self.workflow.complete_next()
|
||||
self.save_restore()
|
||||
self.workflow.script_engine = self.script_engine
|
||||
self.workflow.do_engine_steps()
|
||||
self.save_restore()
|
||||
self.workflow.script_engine = self.script_engine
|
||||
self.assertEqual(self.workflow.data['stuff']['E']['y'], 'D')
|
||||
|
||||
|
||||
|
@ -1,113 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
|
||||
|
||||
import copy
|
||||
import sys
|
||||
import os
|
||||
import unittest
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', '..'))
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
__author__ = 'matth'
|
||||
|
||||
from tests.SpiffWorkflow.camunda.BaseTestCase import BaseTestCase
|
||||
|
||||
|
||||
class MultiInstanceDeepDictTest(BaseTestCase):
|
||||
"""The example bpmn diagram tests both a set cardinality from user input
|
||||
as well as looping over an existing array."""
|
||||
|
||||
deep_dict = {
|
||||
"StudyInfo": {
|
||||
"investigators": {
|
||||
"PI": {
|
||||
"affiliation": "",
|
||||
"department": "",
|
||||
"display_name": "Daniel Harold Funk",
|
||||
"email": "dhf8r@virginia.edu",
|
||||
"given_name": "Daniel",
|
||||
"sponsor_type": "Contractor",
|
||||
"telephone_number": "",
|
||||
"title": "",
|
||||
"type_full": "Primary Investigator",
|
||||
"user_id": "dhf8r"
|
||||
},
|
||||
"DC": {
|
||||
"type_full": "Department Contact",
|
||||
"user_id": "John Smith"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
expected_result = copy.copy(deep_dict)
|
||||
expected_result["StudyInfo"]["investigators"]["DC"]["email"] = "john.smith@gmail.com"
|
||||
expected_result["StudyInfo"]["investigators"]["PI"]["email"] = "dan.funk@gmail.com"
|
||||
|
||||
def setUp(self):
|
||||
self.spec = self.load_workflow_spec(
|
||||
'data/multi_instance_parallel_deep_data_edit.bpmn',
|
||||
'MultiInstance')
|
||||
|
||||
def testRunThroughHappy(self):
|
||||
self.actual_test(False)
|
||||
|
||||
def testRunThroughSaveRestore(self):
|
||||
self.actual_test(True)
|
||||
|
||||
def actual_test(self, save_restore=False):
|
||||
|
||||
self.workflow = BpmnWorkflow(self.spec)
|
||||
self.workflow.do_engine_steps()
|
||||
if save_restore: self.save_restore()
|
||||
|
||||
# The initial task is a script task. Set the data there
|
||||
# and move one.
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
task.data = self.deep_dict
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
self.workflow.do_engine_steps()
|
||||
if save_restore: self.save_restore()
|
||||
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
taskinfo = task.task_info()
|
||||
self.assertEqual(taskinfo,{'is_looping':False,
|
||||
'is_sequential_mi':False,
|
||||
'is_parallel_mi':True,
|
||||
'mi_count':2,
|
||||
'mi_index':1})
|
||||
self.assertEqual("MultiInstanceTask", task.task_spec.name)
|
||||
self.assertTrue("investigator" in task.data)
|
||||
data = copy.copy(task.data)
|
||||
data['investigator']['email'] = "john.smith@gmail.com"
|
||||
task.update_data(data)
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
if save_restore: self.save_restore()
|
||||
|
||||
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
taskinfo = task.task_info()
|
||||
self.assertEqual(taskinfo,{'is_looping':False,
|
||||
'is_sequential_mi':False,
|
||||
'is_parallel_mi':True,
|
||||
'mi_count':2,
|
||||
'mi_index':2})
|
||||
self.assertEqual("MultiInstanceTask", task.task_spec.name)
|
||||
self.assertTrue("investigator" in task.data)
|
||||
data = copy.copy(task.data)
|
||||
data['investigator']['email'] = "dan.funk@gmail.com"
|
||||
task.update_data(data)
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
self.workflow.do_engine_steps()
|
||||
if save_restore: self.save_restore()
|
||||
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
task = self.workflow.last_task
|
||||
self.assertEqual(self.expected_result, task.data)
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromTestCase(MultiInstanceDeepDictTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.TextTestRunner(verbosity=2).run(suite())
|
@ -1,98 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import unittest
|
||||
import random
|
||||
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
from tests.SpiffWorkflow.camunda.BaseTestCase import BaseTestCase
|
||||
|
||||
__author__ = 'matth'
|
||||
|
||||
debug = True
|
||||
|
||||
class MultiInstanceParallelArrayTest(BaseTestCase):
|
||||
"""The example bpmn diagram tests both a set cardinality from user input
|
||||
as well as looping over an existing array."""
|
||||
|
||||
def setUp(self):
|
||||
spec, subprocesses = self.load_workflow_spec('multi_instance_array_parallel.bpmn', 'MultiInstanceArray')
|
||||
self.workflow = BpmnWorkflow(spec, subprocesses)
|
||||
|
||||
def testRunThroughHappy(self):
|
||||
self.actual_test(False)
|
||||
|
||||
def testRunThroughSaveRestore(self):
|
||||
self.actual_test(True)
|
||||
|
||||
def actual_test(self, save_restore=False):
|
||||
|
||||
first_task = self.workflow.task_tree
|
||||
|
||||
# A previous task (in this case the root task) will set the data
|
||||
# so it must be found later.
|
||||
first_task.update_data({"FamilySize": 3})
|
||||
self.workflow.do_engine_steps()
|
||||
if save_restore: self.reload_save_restore()
|
||||
# Set initial array size to 3 in the first user form.
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
self.assertEqual("Activity_FamSize", task.task_spec.name)
|
||||
task.update_data({"FamilySize": 3})
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
if save_restore: self.reload_save_restore()
|
||||
self.workflow.do_engine_steps()
|
||||
|
||||
# Set the names of the 3 family members.
|
||||
for i in range(3):
|
||||
|
||||
tasks = self.workflow.get_ready_user_tasks()
|
||||
self.assertEqual(len(tasks),1) # still with sequential MI
|
||||
task = tasks[0]
|
||||
if i > 0:
|
||||
self.assertEqual("FamilyMemberTask"+"_%d"%(i-1), task.task_spec.name)
|
||||
else:
|
||||
self.assertEqual("FamilyMemberTask", task.task_spec.name)
|
||||
task.update_data({"FamilyMember": {"FirstName": "The Funk #%i" % i}})
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
self.workflow.do_engine_steps()
|
||||
if save_restore:
|
||||
self.reload_save_restore()
|
||||
tasks = self.workflow.get_ready_user_tasks()
|
||||
|
||||
self.assertEqual(3,len(tasks))
|
||||
# Set the birthdays of the 3 family members.
|
||||
for i in range(3): # emulate random Access
|
||||
task = random.choice(tasks)
|
||||
x = task.internal_data['runtimes'] -1
|
||||
self.assertEqual("FamilyMemberBday", task.task_spec.name[:16])
|
||||
self.assertEqual({"FirstName": "The Funk #%i" % x},
|
||||
task.data["CurrentFamilyMember"])
|
||||
task.update_data(
|
||||
{"CurrentFamilyMember": {"Birthdate": "10/05/1985" + str(x)}})
|
||||
self.workflow.do_engine_steps()
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
# We used to check that the current data variable was available in the task,
|
||||
# but there's no reason to preserve it after the task completes. We removed it
|
||||
# in some cases and left it in others, which just adds to the confusion.
|
||||
self.workflow.do_engine_steps()
|
||||
if save_restore:
|
||||
self.reload_save_restore()
|
||||
self.workflow.do_engine_steps()
|
||||
|
||||
tasks = self.workflow.get_ready_user_tasks()
|
||||
|
||||
self.workflow.do_engine_steps()
|
||||
if save_restore:
|
||||
self.reload_save_restore()
|
||||
|
||||
names = task.data['FamilyMembers']
|
||||
bdays = task.data['FamilyMemberBirthday']
|
||||
for x in list(names.keys()):
|
||||
self.assertEqual(str(names[x]['FirstName'][-1]),str(bdays[x]['Birthdate'][-1]))
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromTestCase(MultiInstanceParallelArrayTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.TextTestRunner(verbosity=2).run(suite())
|
91
tests/SpiffWorkflow/camunda/ParseMultiInstanceTest.py
Normal file
91
tests/SpiffWorkflow/camunda/ParseMultiInstanceTest.py
Normal file
@ -0,0 +1,91 @@
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
|
||||
from .BaseTestCase import BaseTestCase
|
||||
|
||||
# NB: I realize this is bad form, but MultiInstanceDMNTest uses a sequential MI task so I'm not adding tests
|
||||
# for that here. The task specs are updated the same way, so this should be sufficient.
|
||||
# I'm not testing the specific of operation here either, because that is pretty extensively tested in the
|
||||
# main BPMN package
|
||||
|
||||
class ParseMultiInstanceTest(BaseTestCase):
|
||||
|
||||
def testCollectionInCardinality(self):
|
||||
|
||||
spec, subprocesses = self.load_workflow_spec('parallel_multiinstance_cardinality.bpmn', 'main')
|
||||
self.workflow = BpmnWorkflow(spec)
|
||||
start = self.workflow.get_tasks_from_spec_name('Start')[0]
|
||||
start.data = {'input_data': [1, 2, 3]}
|
||||
self.workflow.do_engine_steps()
|
||||
|
||||
self.save_restore()
|
||||
|
||||
task_spec = self.workflow.get_tasks_from_spec_name('any_task')[0].task_spec
|
||||
self.assertEqual(task_spec.data_input.name, 'input_data')
|
||||
self.assertEqual(task_spec.data_output.name, 'output_data')
|
||||
self.assertEqual(task_spec.input_item.name, 'output_item')
|
||||
self.assertEqual(task_spec.output_item.name, 'output_item')
|
||||
|
||||
ready_tasks = self.workflow.get_ready_user_tasks()
|
||||
self.assertEqual(len(ready_tasks), 3)
|
||||
|
||||
ready_tasks = self.workflow.get_ready_user_tasks()
|
||||
self.assertEqual(len(ready_tasks), 3)
|
||||
for task in ready_tasks:
|
||||
task.data['output_item'] = task.data['output_item'] * 2
|
||||
task.complete()
|
||||
|
||||
self.workflow.do_engine_steps()
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
self.assertDictEqual(self.workflow.data, {'input_data': [1, 2, 3], 'output_data': [2, 4, 6]})
|
||||
|
||||
def testIntegerCardinality(self):
|
||||
|
||||
spec, subprocesses = self.load_workflow_spec('parallel_multiinstance_cardinality.bpmn', 'main')
|
||||
self.workflow = BpmnWorkflow(spec)
|
||||
task_spec = self.workflow.get_tasks_from_spec_name('any_task')[0].task_spec
|
||||
task_spec.cardinality = 'len(input_data)'
|
||||
|
||||
start = self.workflow.get_tasks_from_spec_name('Start')[0]
|
||||
start.data = {'input_data': [1, 2, 3]}
|
||||
self.workflow.do_engine_steps()
|
||||
|
||||
self.save_restore()
|
||||
|
||||
self.assertEqual(task_spec.data_input, None)
|
||||
self.assertEqual(task_spec.input_item.name, 'output_item')
|
||||
|
||||
ready_tasks = self.workflow.get_ready_user_tasks()
|
||||
self.assertEqual(len(ready_tasks), 3)
|
||||
for task in ready_tasks:
|
||||
task.data['output_item'] = task.data['output_item'] * 2
|
||||
task.complete()
|
||||
|
||||
self.workflow.do_engine_steps()
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
self.assertDictEqual(self.workflow.data, {'input_data': [1, 2, 3], 'output_data': [0, 2, 4]})
|
||||
|
||||
def testCollection(self):
|
||||
|
||||
spec, subprocesses = self.load_workflow_spec('parallel_multiinstance_collection.bpmn', 'main')
|
||||
self.workflow = BpmnWorkflow(spec)
|
||||
start = self.workflow.get_tasks_from_spec_name('Start')[0]
|
||||
start.data = {'input_data': [1, 2, 3]}
|
||||
self.workflow.do_engine_steps()
|
||||
|
||||
self.save_restore()
|
||||
|
||||
task_spec = self.workflow.get_tasks_from_spec_name('any_task')[0].task_spec
|
||||
self.assertEqual(task_spec.data_input.name, 'input_data')
|
||||
self.assertEqual(task_spec.data_output.name, 'input_data')
|
||||
self.assertEqual(task_spec.input_item.name, 'input_item')
|
||||
self.assertEqual(task_spec.output_item.name, 'input_item')
|
||||
|
||||
ready_tasks = self.workflow.get_ready_user_tasks()
|
||||
self.assertEqual(len(ready_tasks), 3)
|
||||
for task in ready_tasks:
|
||||
task.data['input_item'] = task.data['input_item'] * 2
|
||||
task.complete()
|
||||
|
||||
self.workflow.do_engine_steps()
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
self.assertDictEqual(self.workflow.data, {'input_data': [2, 4, 6]})
|
@ -1,80 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import unittest
|
||||
|
||||
from tests.SpiffWorkflow.camunda.BaseTestCase import BaseTestCase
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
|
||||
__author__ = 'kellym'
|
||||
|
||||
class ResetTokenTestMIParallel(BaseTestCase):
|
||||
"""The example bpmn diagram tests both a set cardinality from user input
|
||||
as well as looping over an existing array."""
|
||||
|
||||
def setUp(self):
|
||||
spec, subprocesses = self.load_workflow_spec('token_trial_MIParallel.bpmn', 'token')
|
||||
self.workflow = BpmnWorkflow(spec, subprocesses)
|
||||
|
||||
def testRunThroughHappy(self):
|
||||
self.actual_test(save_restore=False)
|
||||
|
||||
def testRunThroughSaveRestore(self):
|
||||
self.actual_test(save_restore=True)
|
||||
|
||||
def actual_test(self, save_restore=False,reset_data=False):
|
||||
|
||||
self.workflow.do_engine_steps()
|
||||
firsttaskid = None
|
||||
steps = [{'taskname':'First',
|
||||
'task_data': {'do_step':'Yes'}},
|
||||
{'taskname': 'FormA',
|
||||
'task_data': {'current': {'A' : 'x'}}},
|
||||
{'taskname': 'FormA',
|
||||
'task_data': {'current': {'A' : 'y'}}},
|
||||
{'taskname': 'FormA',
|
||||
'task_data': {'current': {'A' : 'z'}}}
|
||||
]
|
||||
for step in steps:
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
if firsttaskid == None and step['taskname']=='FormA':
|
||||
firsttaskid = task.id
|
||||
self.assertEqual(step['taskname'], task.task_spec.name[:len(step['taskname'])])
|
||||
task.update_data(step['task_data'])
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
self.workflow.do_engine_steps()
|
||||
if save_restore: self.save_restore()
|
||||
|
||||
self.assertEqual({'do_step': 'Yes',
|
||||
'output': {'1': {'A': 'x'}, '2': {'A': 'y'}, '3': {'A': 'z'}}},
|
||||
self.workflow.last_task.data)
|
||||
|
||||
self.workflow.reset_task_from_id(firsttaskid)
|
||||
#NB - this won't test random access
|
||||
steps = [{'taskname': 'FormA',
|
||||
'task_data': {'current': {'A' : 'a1'}}},
|
||||
{'taskname': 'FormC',
|
||||
'task_data': {'C' : 'c'}},
|
||||
]
|
||||
for step in steps:
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
self.assertEqual(step['taskname'], task.task_spec.name)
|
||||
task.update_data(step['task_data'])
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
self.workflow.do_engine_steps()
|
||||
if save_restore: self.save_restore()
|
||||
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
|
||||
self.assertEqual({'do_step': 'Yes',
|
||||
'C': 'c',
|
||||
'output': {'1': {'A': 'a1'},
|
||||
'2': {'A': 'y'},
|
||||
'3': {'A': 'z'}}},
|
||||
self.workflow.last_task.data)
|
||||
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromTestCase(ResetTokenTestMIParallel)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.TextTestRunner(verbosity=2).run(suite())
|
@ -1,81 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import unittest
|
||||
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
from tests.SpiffWorkflow.camunda.BaseTestCase import BaseTestCase
|
||||
|
||||
__author__ = 'kellym'
|
||||
|
||||
class ResetTokenTestMI(BaseTestCase):
|
||||
"""The example bpmn diagram tests both a set cardinality from user input
|
||||
as well as looping over an existing array."""
|
||||
|
||||
def setUp(self):
|
||||
spec, subprocesses = self.load_workflow_spec('token_trial_MI.bpmn', 'token')
|
||||
self.workflow = BpmnWorkflow(spec, subprocesses)
|
||||
|
||||
def testRunThroughHappy(self):
|
||||
self.actual_test(save_restore=False)
|
||||
|
||||
def testRunThroughSaveRestore(self):
|
||||
self.actual_test(save_restore=True)
|
||||
|
||||
def actual_test(self, save_restore=False,reset_data=False):
|
||||
|
||||
self.workflow.do_engine_steps()
|
||||
firsttaskid = None
|
||||
steps = [{'taskname':'First',
|
||||
'task_data': {'do_step':'Yes'}},
|
||||
{'taskname': 'FormA',
|
||||
'task_data': {'current': {'A' : 'x'}}},
|
||||
{'taskname': 'FormA_0',
|
||||
'task_data': {'current': {'A' : 'y'}}},
|
||||
{'taskname': 'FormA_1',
|
||||
'task_data': {'current': {'A' : 'z'}}}
|
||||
]
|
||||
for step in steps:
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
if firsttaskid == None and step['taskname']=='FormA':
|
||||
firsttaskid = task.id
|
||||
self.assertEqual(step['taskname'], task.task_spec.name)
|
||||
task.update_data(step['task_data'])
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
self.workflow.do_engine_steps()
|
||||
if save_restore: self.save_restore()
|
||||
|
||||
self.workflow.reset_task_from_id(firsttaskid)
|
||||
|
||||
steps = [{'taskname': 'FormA',
|
||||
'task_data': {'current': {'A': 'a1'}}},
|
||||
{'taskname': 'FormA_0',
|
||||
'task_data': {'current': {'A': 'a2'}}},
|
||||
{'taskname': 'FormA_1',
|
||||
'task_data': {'current': {'A': 'a3'}}},
|
||||
{'taskname': 'FormC',
|
||||
'task_data': {'C': 'c'}}
|
||||
]
|
||||
|
||||
for step in steps:
|
||||
task = self.workflow.get_ready_user_tasks()[0]
|
||||
self.assertEqual(step['taskname'], task.task_spec.name)
|
||||
task.update_data(step['task_data'])
|
||||
self.workflow.complete_task_from_id(task.id)
|
||||
self.workflow.do_engine_steps()
|
||||
if save_restore: self.save_restore()
|
||||
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
self.assertEqual({'do_step': 'Yes',
|
||||
'output': {'1': {'A': 'a1'},
|
||||
'2': {'A': 'a2'},
|
||||
'3': {'A': 'a3'}},
|
||||
'C': 'c'},
|
||||
self.workflow.last_task.data)
|
||||
|
||||
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromTestCase(ResetTokenTestMI)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.TextTestRunner(verbosity=2).run(suite())
|
@ -1,27 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.0.0">
|
||||
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.11.1">
|
||||
<bpmn:process id="Process_1" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_1b29lxw</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:endEvent id="EndEvent_0n32cxd">
|
||||
<bpmn:incoming>Flow_0fusz9y</bpmn:incoming>
|
||||
<bpmn:incoming>SequenceFlow_06fnqj2</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="SequenceFlow_06fnqj2" sourceRef="Task_067fajl" targetRef="Activity_1mu3z8p" />
|
||||
<bpmn:sequenceFlow id="SequenceFlow_06fnqj2" sourceRef="Task_067fajl" targetRef="EndEvent_0n32cxd" />
|
||||
<bpmn:businessRuleTask id="Task_067fajl" name="Else Decision Table" camunda:decisionRef="IntegerDecisionStringOutputTable">
|
||||
<bpmn:incoming>Flow_0z7tfh1</bpmn:incoming>
|
||||
<bpmn:incoming>Flow_09ciw49</bpmn:incoming>
|
||||
<bpmn:outgoing>SequenceFlow_06fnqj2</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics isSequential="true" camunda:collection="stuff" camunda:elementVariable="item" />
|
||||
</bpmn:businessRuleTask>
|
||||
<bpmn:sequenceFlow id="Flow_1b29lxw" sourceRef="StartEvent_1" targetRef="Activity_0qh0jpg" />
|
||||
<bpmn:sequenceFlow id="Flow_0fusz9y" sourceRef="Activity_0w0chd2" targetRef="EndEvent_0n32cxd" />
|
||||
<bpmn:scriptTask id="Activity_0w0chd2" name="Print Stuff">
|
||||
<bpmn:incoming>Flow_066d5e1</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0fusz9y</bpmn:outgoing>
|
||||
<bpmn:script>print('EndScript')
|
||||
print(stuff)</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:sequenceFlow id="Flow_09ciw49" sourceRef="Activity_0qh0jpg" targetRef="Activity_1ftn207" />
|
||||
<bpmn:sequenceFlow id="Flow_09ciw49" sourceRef="Activity_0qh0jpg" targetRef="Task_067fajl" />
|
||||
<bpmn:scriptTask id="Activity_0qh0jpg" name="Setup">
|
||||
<bpmn:documentation>This is a test
|
||||
of documentation</bpmn:documentation>
|
||||
@ -33,55 +26,24 @@ of documentation</bpmn:documentation>
|
||||
'D': {'x': 6},
|
||||
'E': {'x': 7}}</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:sequenceFlow id="Flow_0z7tfh1" sourceRef="Activity_1ftn207" targetRef="Task_067fajl" />
|
||||
<bpmn:manualTask id="Activity_1ftn207" name="do something">
|
||||
<bpmn:incoming>Flow_09ciw49</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0z7tfh1</bpmn:outgoing>
|
||||
</bpmn:manualTask>
|
||||
<bpmn:sequenceFlow id="Flow_066d5e1" sourceRef="Activity_1mu3z8p" targetRef="Activity_0w0chd2" />
|
||||
<bpmn:manualTask id="Activity_1mu3z8p" name="do something again">
|
||||
<bpmn:incoming>SequenceFlow_06fnqj2</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_066d5e1</bpmn:outgoing>
|
||||
</bpmn:manualTask>
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
|
||||
<bpmndi:BPMNEdge id="Flow_066d5e1_di" bpmnElement="Flow_066d5e1">
|
||||
<di:waypoint x="850" y="124" />
|
||||
<di:waypoint x="930" y="124" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0z7tfh1_di" bpmnElement="Flow_0z7tfh1">
|
||||
<di:waypoint x="510" y="124" />
|
||||
<di:waypoint x="575" y="124" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_09ciw49_di" bpmnElement="Flow_09ciw49">
|
||||
<di:waypoint x="340" y="124" />
|
||||
<di:waypoint x="410" y="124" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0fusz9y_di" bpmnElement="Flow_0fusz9y">
|
||||
<di:waypoint x="1030" y="124" />
|
||||
<di:waypoint x="1092" y="124" />
|
||||
<di:waypoint x="390" y="124" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1b29lxw_di" bpmnElement="Flow_1b29lxw">
|
||||
<di:waypoint x="188" y="124" />
|
||||
<di:waypoint x="240" y="124" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="SequenceFlow_06fnqj2_di" bpmnElement="SequenceFlow_06fnqj2">
|
||||
<di:waypoint x="675" y="124" />
|
||||
<di:waypoint x="750" y="124" />
|
||||
<di:waypoint x="490" y="124" />
|
||||
<di:waypoint x="552" y="124" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="850" y="462" width="0" height="12" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Activity_1uk7uyi_di" bpmnElement="Activity_0w0chd2">
|
||||
<dc:Bounds x="930" y="84" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_0vne2ba_di" bpmnElement="Activity_1ftn207">
|
||||
<dc:Bounds x="410" y="84" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_0z6lv9u_di" bpmnElement="Activity_1mu3z8p">
|
||||
<dc:Bounds x="750" y="84" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="152" y="106" width="36" height="36" />
|
||||
<bpmndi:BPMNLabel>
|
||||
@ -91,15 +53,15 @@ of documentation</bpmn:documentation>
|
||||
<bpmndi:BPMNShape id="Activity_1v5khzq_di" bpmnElement="Activity_0qh0jpg">
|
||||
<dc:Bounds x="240" y="84" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="BusinessRuleTask_1ipm12w_di" bpmnElement="Task_067fajl">
|
||||
<dc:Bounds x="390" y="84" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="EndEvent_0n32cxd_di" bpmnElement="EndEvent_0n32cxd">
|
||||
<dc:Bounds x="1092" y="106" width="36" height="36" />
|
||||
<dc:Bounds x="552" y="106" width="36" height="36" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="933" y="505" width="0" height="12" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="BusinessRuleTask_1ipm12w_di" bpmnElement="Task_067fajl">
|
||||
<dc:Bounds x="575" y="84" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
||||
|
@ -1,89 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1hbo0hp" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.10.0">
|
||||
<bpmn:process id="CommonActivity" name="CommonActivity_a" isExecutable="true">
|
||||
<bpmn:scriptTask id="Activity_0bt6ln9" name="my_custom_function('test 1 from common workflow')">
|
||||
<bpmn:incoming>Flow_0xpz6la</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_03yam6h</bpmn:outgoing>
|
||||
<bpmn:script>my_custom_function('test 1 from common workflow')</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:endEvent id="Event_1m1s0k4">
|
||||
<bpmn:incoming>Flow_1jz376x</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_03yam6h" sourceRef="Activity_0bt6ln9" targetRef="Activity_095g0z7" />
|
||||
<bpmn:userTask id="Activity_095g0z7" name="Common usertask 1" camunda:formKey="common_form1">
|
||||
<bpmn:extensionElements>
|
||||
<camunda:formData>
|
||||
<camunda:formField id="common_formfield1" label="common_formfield1" type="string" />
|
||||
</camunda:formData>
|
||||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>Flow_03yam6h</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0pc6yx9</bpmn:outgoing>
|
||||
</bpmn:userTask>
|
||||
<bpmn:sequenceFlow id="Flow_0pc6yx9" sourceRef="Activity_095g0z7" targetRef="Activity_00bzklw" />
|
||||
<bpmn:scriptTask id="Activity_00bzklw" name="my_custom_function('test 2 from common workflow')">
|
||||
<bpmn:incoming>Flow_0pc6yx9</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_16t7ue6</bpmn:outgoing>
|
||||
<bpmn:script>my_custom_function('test 2 from common workflow')</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:sequenceFlow id="Flow_16t7ue6" sourceRef="Activity_00bzklw" targetRef="Activity_0ngvhhg" />
|
||||
<bpmn:sequenceFlow id="Flow_1jz376x" sourceRef="Activity_0ngvhhg" targetRef="Event_1m1s0k4" />
|
||||
<bpmn:userTask id="Activity_0ngvhhg" name="Common usertask 2" camunda:formKey="common_form2">
|
||||
<bpmn:extensionElements>
|
||||
<camunda:formData>
|
||||
<camunda:formField id="common_formfield2" label="common_formfield2" />
|
||||
<camunda:formField id="FormField_2qmrrdl" type="enum">
|
||||
<camunda:value id="Value_3k7tvdm" />
|
||||
</camunda:formField>
|
||||
</camunda:formData>
|
||||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>Flow_16t7ue6</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1jz376x</bpmn:outgoing>
|
||||
</bpmn:userTask>
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0xpz6la</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0xpz6la" sourceRef="StartEvent_1" targetRef="Activity_0bt6ln9" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CommonActivity">
|
||||
<bpmndi:BPMNEdge id="Flow_1jz376x_di" bpmnElement="Flow_1jz376x">
|
||||
<di:waypoint x="850" y="117" />
|
||||
<di:waypoint x="882" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_16t7ue6_di" bpmnElement="Flow_16t7ue6">
|
||||
<di:waypoint x="680" y="117" />
|
||||
<di:waypoint x="750" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0pc6yx9_di" bpmnElement="Flow_0pc6yx9">
|
||||
<di:waypoint x="510" y="117" />
|
||||
<di:waypoint x="580" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_03yam6h_di" bpmnElement="Flow_03yam6h">
|
||||
<di:waypoint x="340" y="117" />
|
||||
<di:waypoint x="410" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0xpz6la_di" bpmnElement="Flow_0xpz6la">
|
||||
<di:waypoint x="215" y="117" />
|
||||
<di:waypoint x="240" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1mbn0zk_di" bpmnElement="Activity_0bt6ln9">
|
||||
<dc:Bounds x="240" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_1m1s0k4_di" bpmnElement="Event_1m1s0k4">
|
||||
<dc:Bounds x="882" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_0x4a5gl_di" bpmnElement="Activity_095g0z7">
|
||||
<dc:Bounds x="410" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_0y73xpm_di" bpmnElement="Activity_00bzklw">
|
||||
<dc:Bounds x="580" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_0haan8j_di" bpmnElement="Activity_0ngvhhg">
|
||||
<dc:Bounds x="750" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -1,89 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1n0u11m" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.7.0">
|
||||
<bpmn:process id="DefaultGateway" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_1wis1un</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:userTask id="DoStuff" name="Do Stuff?" camunda:formKey="morestuffform">
|
||||
<bpmn:extensionElements>
|
||||
<camunda:formData>
|
||||
<camunda:formField id="morestuff" label="Do we need to do more stuff?" type="string" />
|
||||
</camunda:formData>
|
||||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>Flow_1wis1un</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_144jxvd</bpmn:outgoing>
|
||||
</bpmn:userTask>
|
||||
<bpmn:sequenceFlow id="Flow_1wis1un" sourceRef="StartEvent_1" targetRef="DoStuff" />
|
||||
<bpmn:exclusiveGateway id="Gateway_1yn93jn" default="Flow_1riszc2">
|
||||
<bpmn:incoming>Flow_144jxvd</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1riszc2</bpmn:outgoing>
|
||||
<bpmn:outgoing>Flow_0xdvee4</bpmn:outgoing>
|
||||
</bpmn:exclusiveGateway>
|
||||
<bpmn:sequenceFlow id="Flow_144jxvd" sourceRef="DoStuff" targetRef="Gateway_1yn93jn" />
|
||||
<bpmn:sequenceFlow id="Flow_1riszc2" sourceRef="Gateway_1yn93jn" targetRef="GetMoreStuff" />
|
||||
<bpmn:endEvent id="Event_1xfyeiq">
|
||||
<bpmn:incoming>Flow_13ncefd</bpmn:incoming>
|
||||
<bpmn:incoming>Flow_0xdvee4</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_13ncefd" sourceRef="GetMoreStuff" targetRef="Event_1xfyeiq" />
|
||||
<bpmn:userTask id="GetMoreStuff" name="Add More Stuff">
|
||||
<bpmn:extensionElements>
|
||||
<camunda:formData>
|
||||
<camunda:formField id="stuff.addstuff" label="Add More Stuff" type="string" />
|
||||
</camunda:formData>
|
||||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>Flow_1riszc2</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_13ncefd</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics camunda:collection="collectstuff" camunda:elementVariable="stuff">
|
||||
<bpmn:loopCardinality xsi:type="bpmn:tFormalExpression">3</bpmn:loopCardinality>
|
||||
</bpmn:multiInstanceLoopCharacteristics>
|
||||
</bpmn:userTask>
|
||||
<bpmn:sequenceFlow id="Flow_0xdvee4" name="No" sourceRef="Gateway_1yn93jn" targetRef="Event_1xfyeiq">
|
||||
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">morestuff == 'No'</bpmn:conditionExpression>
|
||||
</bpmn:sequenceFlow>
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DefaultGateway">
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_10nt4mt_di" bpmnElement="DoStuff">
|
||||
<dc:Bounds x="260" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_1wis1un_di" bpmnElement="Flow_1wis1un">
|
||||
<di:waypoint x="215" y="117" />
|
||||
<di:waypoint x="260" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Gateway_1yn93jn_di" bpmnElement="Gateway_1yn93jn" isMarkerVisible="true">
|
||||
<dc:Bounds x="405" y="92" width="50" height="50" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_144jxvd_di" bpmnElement="Flow_144jxvd">
|
||||
<di:waypoint x="360" y="117" />
|
||||
<di:waypoint x="405" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1riszc2_di" bpmnElement="Flow_1riszc2">
|
||||
<di:waypoint x="455" y="117" />
|
||||
<di:waypoint x="520" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Event_1xfyeiq_di" bpmnElement="Event_1xfyeiq">
|
||||
<dc:Bounds x="692" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_13ncefd_di" bpmnElement="Flow_13ncefd">
|
||||
<di:waypoint x="620" y="117" />
|
||||
<di:waypoint x="692" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Activity_0msdtf4_di" bpmnElement="GetMoreStuff">
|
||||
<dc:Bounds x="520" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_0xdvee4_di" bpmnElement="Flow_0xdvee4">
|
||||
<di:waypoint x="430" y="142" />
|
||||
<di:waypoint x="430" y="240" />
|
||||
<di:waypoint x="710" y="240" />
|
||||
<di:waypoint x="710" y="135" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="563" y="222" width="15" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -1,99 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_0p4zkct" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.7.0">
|
||||
<bpmn:process id="MultiInstanceArray" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0bplvtg</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:userTask id="Activity_FamSize" name="Get Family Size" camunda:formKey="FamilySizeForm">
|
||||
<bpmn:documentation>Please enter family size:</bpmn:documentation>
|
||||
<bpmn:extensionElements>
|
||||
<camunda:formData>
|
||||
<camunda:formField id="Family.Size" label="Family Size" type="long" defaultValue="2">
|
||||
<camunda:validation>
|
||||
<camunda:constraint name="min1" config=">=1" />
|
||||
<camunda:constraint name="max10" config="<=10" />
|
||||
</camunda:validation>
|
||||
</camunda:formField>
|
||||
</camunda:formData>
|
||||
<camunda:inputOutput>
|
||||
<camunda:outputParameter name="Output_20ie5h1">
|
||||
<camunda:map />
|
||||
</camunda:outputParameter>
|
||||
</camunda:inputOutput>
|
||||
<camunda:properties>
|
||||
<camunda:property name="Test1" value="Value1" />
|
||||
<camunda:property name="Test2" value="Value2" />
|
||||
</camunda:properties>
|
||||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>Flow_0bplvtg</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0zpm0rc</bpmn:outgoing>
|
||||
</bpmn:userTask>
|
||||
<bpmn:sequenceFlow id="Flow_0zpm0rc" sourceRef="Activity_FamSize" targetRef="FamilyMemberTask" />
|
||||
<bpmn:userTask id="FamilyMemberTask" name="Get Name For Each Family Member" camunda:formKey="FamilyMember">
|
||||
<bpmn:documentation>Please enter information for family member {{ FamilyMember }}:</bpmn:documentation>
|
||||
<bpmn:extensionElements>
|
||||
<camunda:formData>
|
||||
<camunda:formField id="FirstName" label="First Name" type="string" />
|
||||
</camunda:formData>
|
||||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>Flow_0zpm0rc</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0659lqh</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics isSequential="true" camunda:collection="Family.Members" camunda:elementVariable="FamilyMember">
|
||||
<bpmn:loopCardinality xsi:type="bpmn:tFormalExpression">Family.Size</bpmn:loopCardinality>
|
||||
</bpmn:multiInstanceLoopCharacteristics>
|
||||
</bpmn:userTask>
|
||||
<bpmn:sequenceFlow id="Flow_0bplvtg" sourceRef="StartEvent_1" targetRef="Activity_FamSize" />
|
||||
<bpmn:userTask id="FamilyMemberBday" name="GetBirthday for each family member in prev step" camunda:formKey="FamilyBDay">
|
||||
<bpmn:documentation>Enter Birthday for {{ CurrentFamilyMember['FamilyMember.FormField_FirstName'] }}</bpmn:documentation>
|
||||
<bpmn:extensionElements>
|
||||
<camunda:formData>
|
||||
<camunda:formField id="Birthdate" label="Birthday" type="string" />
|
||||
</camunda:formData>
|
||||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>Flow_0659lqh</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0ncqf54</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics isSequential="true" camunda:collection="Family.Members" camunda:elementVariable="CurrentFamilyMember" />
|
||||
</bpmn:userTask>
|
||||
<bpmn:sequenceFlow id="Flow_0659lqh" sourceRef="FamilyMemberTask" targetRef="FamilyMemberBday" />
|
||||
<bpmn:sequenceFlow id="Flow_0ncqf54" sourceRef="FamilyMemberBday" targetRef="Event_EndJoin" />
|
||||
<bpmn:endEvent id="Event_EndJoin">
|
||||
<bpmn:documentation>XXX</bpmn:documentation>
|
||||
<bpmn:incoming>Flow_0ncqf54</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="MultiInstanceArray">
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_00ttlok_di" bpmnElement="Activity_FamSize">
|
||||
<dc:Bounds x="260" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_0zpm0rc_di" bpmnElement="Flow_0zpm0rc">
|
||||
<di:waypoint x="360" y="117" />
|
||||
<di:waypoint x="420" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Activity_0sj67t1_di" bpmnElement="FamilyMemberTask">
|
||||
<dc:Bounds x="420" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_0bplvtg_di" bpmnElement="Flow_0bplvtg">
|
||||
<di:waypoint x="215" y="117" />
|
||||
<di:waypoint x="260" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Activity_1lj1hu8_di" bpmnElement="FamilyMemberBday">
|
||||
<dc:Bounds x="590" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_0659lqh_di" bpmnElement="Flow_0659lqh">
|
||||
<di:waypoint x="520" y="117" />
|
||||
<di:waypoint x="590" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0ncqf54_di" bpmnElement="Flow_0ncqf54">
|
||||
<di:waypoint x="690" y="117" />
|
||||
<di:waypoint x="788" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Event_11av7pp_di" bpmnElement="Event_EndJoin">
|
||||
<dc:Bounds x="788" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -1,99 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_0p4zkct" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.7.0">
|
||||
<bpmn:process id="MultiInstanceArray" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0bplvtg</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:userTask id="Activity_FamSize" name="Get Family Size" camunda:formKey="FamilySizeForm">
|
||||
<bpmn:documentation>Please enter family size:</bpmn:documentation>
|
||||
<bpmn:extensionElements>
|
||||
<camunda:formData>
|
||||
<camunda:formField id="FamilySize" label="FamilyMembers" type="long" defaultValue="2">
|
||||
<camunda:validation>
|
||||
<camunda:constraint name="min1" config=">=1" />
|
||||
<camunda:constraint name="max10" config="<=10" />
|
||||
</camunda:validation>
|
||||
</camunda:formField>
|
||||
</camunda:formData>
|
||||
<camunda:inputOutput>
|
||||
<camunda:outputParameter name="Output_20ie5h1">
|
||||
<camunda:map />
|
||||
</camunda:outputParameter>
|
||||
</camunda:inputOutput>
|
||||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>Flow_0bplvtg</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0zpm0rc</bpmn:outgoing>
|
||||
</bpmn:userTask>
|
||||
<bpmn:sequenceFlow id="Flow_0zpm0rc" sourceRef="Activity_FamSize" targetRef="FamilyMemberTask" />
|
||||
<bpmn:userTask id="FamilyMemberTask" name="Get Name For Each Family Member" camunda:formKey="FamilyMember">
|
||||
<bpmn:documentation>Please enter information for family member {{ FamilyMember }}:</bpmn:documentation>
|
||||
<bpmn:extensionElements>
|
||||
<camunda:formData>
|
||||
<camunda:formField id="FirstName" label="First Name" type="string" />
|
||||
</camunda:formData>
|
||||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>Flow_0zpm0rc</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0659lqh</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics isSequential="true" camunda:collection="FamilyMembers" camunda:elementVariable="FamilyMember">
|
||||
<bpmn:loopCardinality xsi:type="bpmn:tFormalExpression">FamilySize</bpmn:loopCardinality>
|
||||
</bpmn:multiInstanceLoopCharacteristics>
|
||||
</bpmn:userTask>
|
||||
<bpmn:sequenceFlow id="Flow_0bplvtg" sourceRef="StartEvent_1" targetRef="Activity_FamSize" />
|
||||
<bpmn:userTask id="FamilyMemberBday" name="GetBirthday for each family member in prev step" camunda:formKey="FamilyBDay">
|
||||
<bpmn:documentation>Enter Birthday for {{ CurrentFamilyMember['FamilyMember.FormField_FirstName'] }}</bpmn:documentation>
|
||||
<bpmn:extensionElements>
|
||||
<camunda:formData>
|
||||
<camunda:formField id="Birthdate" label="Birthday" type="string" />
|
||||
</camunda:formData>
|
||||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>Flow_0659lqh</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0ncqf54</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics camunda:collection="FamilyMemberBirthday" camunda:elementVariable="CurrentFamilyMember">
|
||||
<bpmn:loopCardinality xsi:type="bpmn:tFormalExpression">FamilyMembers</bpmn:loopCardinality>
|
||||
</bpmn:multiInstanceLoopCharacteristics>
|
||||
</bpmn:userTask>
|
||||
<bpmn:sequenceFlow id="Flow_0659lqh" sourceRef="FamilyMemberTask" targetRef="FamilyMemberBday" />
|
||||
<bpmn:sequenceFlow id="Flow_0ncqf54" sourceRef="FamilyMemberBday" targetRef="Event_EndJoin" />
|
||||
<bpmn:endEvent id="Event_EndJoin">
|
||||
<bpmn:documentation>XXX</bpmn:documentation>
|
||||
<bpmn:incoming>Flow_0ncqf54</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="MultiInstanceArray">
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_00ttlok_di" bpmnElement="Activity_FamSize">
|
||||
<dc:Bounds x="260" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_0zpm0rc_di" bpmnElement="Flow_0zpm0rc">
|
||||
<di:waypoint x="360" y="117" />
|
||||
<di:waypoint x="410" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Activity_0sj67t1_di" bpmnElement="FamilyMemberTask">
|
||||
<dc:Bounds x="410" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_0bplvtg_di" bpmnElement="Flow_0bplvtg">
|
||||
<di:waypoint x="215" y="117" />
|
||||
<di:waypoint x="260" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Activity_1lj1hu8_di" bpmnElement="FamilyMemberBday">
|
||||
<dc:Bounds x="570" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_0659lqh_di" bpmnElement="Flow_0659lqh">
|
||||
<di:waypoint x="510" y="117" />
|
||||
<di:waypoint x="570" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0ncqf54_di" bpmnElement="Flow_0ncqf54">
|
||||
<di:waypoint x="670" y="110" />
|
||||
<di:waypoint x="806" y="110" />
|
||||
<di:waypoint x="806" y="117" />
|
||||
<di:waypoint x="942" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Event_11av7pp_di" bpmnElement="Event_EndJoin">
|
||||
<dc:Bounds x="942" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -1,66 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_17fwemw" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.7.3">
|
||||
<bpmn:process id="MultiInstance" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1" name="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0t6p1sb</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0t6p1sb" sourceRef="StartEvent_1" targetRef="Task_1v0e2zu" />
|
||||
<bpmn:endEvent id="Event_End" name="Event_End">
|
||||
<bpmn:incoming>Flow_0ugjw69</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0ugjw69" sourceRef="MultiInstanceTask" targetRef="Event_End" />
|
||||
<bpmn:userTask id="MultiInstanceTask" name="Gather more information" camunda:formKey="GetEmail">
|
||||
<bpmn:documentation># Please provide addtional information about:
|
||||
## Investigator ID: {{investigator.user_id}}
|
||||
## Role: {{investigator.type_full}}</bpmn:documentation>
|
||||
<bpmn:extensionElements>
|
||||
<camunda:formData>
|
||||
<camunda:formField id="email" label="Email Address:" type="string" />
|
||||
</camunda:formData>
|
||||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>SequenceFlow_1p568pp</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0ugjw69</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics camunda:collection="StudyInfo.investigators" camunda:elementVariable="investigator" />
|
||||
</bpmn:userTask>
|
||||
<bpmn:sequenceFlow id="SequenceFlow_1p568pp" sourceRef="Task_1v0e2zu" targetRef="MultiInstanceTask" />
|
||||
<bpmn:manualTask id="Task_1v0e2zu" name="Load Personnel">
|
||||
<bpmn:documentation>Imagine a script task here that loads a complex data set.</bpmn:documentation>
|
||||
<bpmn:incoming>Flow_0t6p1sb</bpmn:incoming>
|
||||
<bpmn:outgoing>SequenceFlow_1p568pp</bpmn:outgoing>
|
||||
</bpmn:manualTask>
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="MultiInstance">
|
||||
<bpmndi:BPMNEdge id="SequenceFlow_1p568pp_di" bpmnElement="SequenceFlow_1p568pp">
|
||||
<di:waypoint x="350" y="117" />
|
||||
<di:waypoint x="410" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0ugjw69_di" bpmnElement="Flow_0ugjw69">
|
||||
<di:waypoint x="510" y="117" />
|
||||
<di:waypoint x="582" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0t6p1sb_di" bpmnElement="Flow_0t6p1sb">
|
||||
<di:waypoint x="178" y="117" />
|
||||
<di:waypoint x="250" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="142" y="99" width="36" height="36" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="129" y="142" width="64" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_1g0pmib_di" bpmnElement="Event_End">
|
||||
<dc:Bounds x="582" y="99" width="36" height="36" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="575" y="142" width="54" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1iyilui_di" bpmnElement="MultiInstanceTask">
|
||||
<dc:Bounds x="410" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_0jcnzcm_di" bpmnElement="Task_1v0e2zu">
|
||||
<dc:Bounds x="250" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_0zetnjn" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.11.1" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0">
|
||||
<bpmn:process id="main" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0m77cxj</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:task id="any_task" name="Any Task">
|
||||
<bpmn:incoming>Flow_0m77cxj</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1jbp2el</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics camunda:collection="output_data" camunda:elementVariable="output_item">
|
||||
<bpmn:loopCardinality xsi:type="bpmn:tFormalExpression">input_data</bpmn:loopCardinality>
|
||||
</bpmn:multiInstanceLoopCharacteristics>
|
||||
</bpmn:task>
|
||||
<bpmn:sequenceFlow id="Flow_0m77cxj" sourceRef="StartEvent_1" targetRef="any_task" />
|
||||
<bpmn:endEvent id="Event_1xk7z3g">
|
||||
<bpmn:incoming>Flow_1jbp2el</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_1jbp2el" sourceRef="any_task" targetRef="Event_1xk7z3g" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="main">
|
||||
<bpmndi:BPMNEdge id="Flow_1jbp2el_di" bpmnElement="Flow_1jbp2el">
|
||||
<di:waypoint x="390" y="117" />
|
||||
<di:waypoint x="462" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0m77cxj_di" bpmnElement="Flow_0m77cxj">
|
||||
<di:waypoint x="215" y="117" />
|
||||
<di:waypoint x="290" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1jay5wu_di" bpmnElement="any_task">
|
||||
<dc:Bounds x="290" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_1xk7z3g_di" bpmnElement="Event_1xk7z3g">
|
||||
<dc:Bounds x="462" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_0zetnjn" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.11.1" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0">
|
||||
<bpmn:process id="main" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0m77cxj</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:task id="any_task" name="Any Task">
|
||||
<bpmn:incoming>Flow_0m77cxj</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1jbp2el</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics camunda:collection="input_data" camunda:elementVariable="input_item" />
|
||||
</bpmn:task>
|
||||
<bpmn:sequenceFlow id="Flow_0m77cxj" sourceRef="StartEvent_1" targetRef="any_task" />
|
||||
<bpmn:endEvent id="Event_1xk7z3g">
|
||||
<bpmn:incoming>Flow_1jbp2el</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_1jbp2el" sourceRef="any_task" targetRef="Event_1xk7z3g" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="main">
|
||||
<bpmndi:BPMNEdge id="Flow_1jbp2el_di" bpmnElement="Flow_1jbp2el">
|
||||
<di:waypoint x="390" y="117" />
|
||||
<di:waypoint x="462" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0m77cxj_di" bpmnElement="Flow_0m77cxj">
|
||||
<di:waypoint x="215" y="117" />
|
||||
<di:waypoint x="290" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1jay5wu_di" bpmnElement="any_task">
|
||||
<dc:Bounds x="290" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_1xk7z3g_di" bpmnElement="Event_1xk7z3g">
|
||||
<dc:Bounds x="462" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -1,83 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1nsvcwb" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.7.3">
|
||||
<bpmn:process id="token" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_03vnrmv</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:userTask id="First" name="First" camunda:formKey="GWForm">
|
||||
<bpmn:documentation>Do you want to do the next steps?</bpmn:documentation>
|
||||
<bpmn:extensionElements>
|
||||
<camunda:formData>
|
||||
<camunda:formField id="do_step" label="Do Steps?" type="boolean" />
|
||||
</camunda:formData>
|
||||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>Flow_03vnrmv</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_10pdq2v</bpmn:outgoing>
|
||||
</bpmn:userTask>
|
||||
<bpmn:userTask id="FormC" name="FormC" camunda:formKey="FormC">
|
||||
<bpmn:documentation>FormC</bpmn:documentation>
|
||||
<bpmn:extensionElements>
|
||||
<camunda:formData>
|
||||
<camunda:formField id="C" label="Enter Value For C" type="string" />
|
||||
</camunda:formData>
|
||||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>Flow_0ztfesh</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_039y4lk</bpmn:outgoing>
|
||||
</bpmn:userTask>
|
||||
<bpmn:sequenceFlow id="Flow_03vnrmv" sourceRef="StartEvent_1" targetRef="First" />
|
||||
<bpmn:endEvent id="Event_0xfwzm8">
|
||||
<bpmn:incoming>Flow_039y4lk</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_039y4lk" sourceRef="FormC" targetRef="Event_0xfwzm8" />
|
||||
<bpmn:userTask id="FormA" name="FormA" camunda:formKey="FormA">
|
||||
<bpmn:documentation>MI item</bpmn:documentation>
|
||||
<bpmn:extensionElements>
|
||||
<camunda:formData>
|
||||
<camunda:formField id="A" label="Enter A" />
|
||||
</camunda:formData>
|
||||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>Flow_10pdq2v</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0ztfesh</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics isSequential="true" camunda:collection="output" camunda:elementVariable="current">
|
||||
<bpmn:loopCardinality xsi:type="bpmn:tFormalExpression">3</bpmn:loopCardinality>
|
||||
</bpmn:multiInstanceLoopCharacteristics>
|
||||
</bpmn:userTask>
|
||||
<bpmn:sequenceFlow id="Flow_10pdq2v" sourceRef="First" targetRef="FormA" />
|
||||
<bpmn:sequenceFlow id="Flow_0ztfesh" sourceRef="FormA" targetRef="FormC" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="token">
|
||||
<bpmndi:BPMNEdge id="Flow_0ztfesh_di" bpmnElement="Flow_0ztfesh">
|
||||
<di:waypoint x="560" y="117" />
|
||||
<di:waypoint x="640" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_10pdq2v_di" bpmnElement="Flow_10pdq2v">
|
||||
<di:waypoint x="370" y="117" />
|
||||
<di:waypoint x="460" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_039y4lk_di" bpmnElement="Flow_039y4lk">
|
||||
<di:waypoint x="740" y="117" />
|
||||
<di:waypoint x="812" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_03vnrmv_di" bpmnElement="Flow_03vnrmv">
|
||||
<di:waypoint x="215" y="117" />
|
||||
<di:waypoint x="270" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1oyfku7_di" bpmnElement="First">
|
||||
<dc:Bounds x="270" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1byzp7w_di" bpmnElement="FormC">
|
||||
<dc:Bounds x="640" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_0xfwzm8_di" bpmnElement="Event_0xfwzm8">
|
||||
<dc:Bounds x="812" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_0z6yohn_di" bpmnElement="FormA">
|
||||
<dc:Bounds x="460" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -1,83 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1nsvcwb" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.7.0">
|
||||
<bpmn:process id="token" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_03vnrmv</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:userTask id="First" name="First" camunda:formKey="GWForm">
|
||||
<bpmn:documentation>Do you want to do the next steps?</bpmn:documentation>
|
||||
<bpmn:extensionElements>
|
||||
<camunda:formData>
|
||||
<camunda:formField id="do_step" label="Do Steps?" type="boolean" />
|
||||
</camunda:formData>
|
||||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>Flow_03vnrmv</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_10pdq2v</bpmn:outgoing>
|
||||
</bpmn:userTask>
|
||||
<bpmn:userTask id="FormC" name="FormC" camunda:formKey="FormC">
|
||||
<bpmn:documentation>FormC</bpmn:documentation>
|
||||
<bpmn:extensionElements>
|
||||
<camunda:formData>
|
||||
<camunda:formField id="C" label="Enter Value For C" />
|
||||
</camunda:formData>
|
||||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>Flow_0ztfesh</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_039y4lk</bpmn:outgoing>
|
||||
</bpmn:userTask>
|
||||
<bpmn:sequenceFlow id="Flow_03vnrmv" sourceRef="StartEvent_1" targetRef="First" />
|
||||
<bpmn:endEvent id="Event_0xfwzm8">
|
||||
<bpmn:incoming>Flow_039y4lk</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_039y4lk" sourceRef="FormC" targetRef="Event_0xfwzm8" />
|
||||
<bpmn:userTask id="FormA" name="FormA" camunda:formKey="FormA">
|
||||
<bpmn:documentation>MI item</bpmn:documentation>
|
||||
<bpmn:extensionElements>
|
||||
<camunda:formData>
|
||||
<camunda:formField id="A" label="Enter A" />
|
||||
</camunda:formData>
|
||||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>Flow_10pdq2v</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0ztfesh</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics camunda:collection="output" camunda:elementVariable="current">
|
||||
<bpmn:loopCardinality xsi:type="bpmn:tFormalExpression">3</bpmn:loopCardinality>
|
||||
</bpmn:multiInstanceLoopCharacteristics>
|
||||
</bpmn:userTask>
|
||||
<bpmn:sequenceFlow id="Flow_10pdq2v" sourceRef="First" targetRef="FormA" />
|
||||
<bpmn:sequenceFlow id="Flow_0ztfesh" sourceRef="FormA" targetRef="FormC" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="token">
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1oyfku7_di" bpmnElement="First">
|
||||
<dc:Bounds x="270" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1byzp7w_di" bpmnElement="FormC">
|
||||
<dc:Bounds x="640" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_03vnrmv_di" bpmnElement="Flow_03vnrmv">
|
||||
<di:waypoint x="215" y="117" />
|
||||
<di:waypoint x="270" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Event_0xfwzm8_di" bpmnElement="Event_0xfwzm8">
|
||||
<dc:Bounds x="812" y="99" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_039y4lk_di" bpmnElement="Flow_039y4lk">
|
||||
<di:waypoint x="740" y="117" />
|
||||
<di:waypoint x="812" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Activity_0z6yohn_di" bpmnElement="FormA">
|
||||
<dc:Bounds x="460" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_10pdq2v_di" bpmnElement="Flow_10pdq2v">
|
||||
<di:waypoint x="370" y="117" />
|
||||
<di:waypoint x="460" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0ztfesh_di" bpmnElement="Flow_0ztfesh">
|
||||
<di:waypoint x="560" y="117" />
|
||||
<di:waypoint x="640" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
@ -40,10 +40,7 @@ class ExecuteTest(TaskSpecTest):
|
||||
expected = 'Start\n testtask\n'
|
||||
workflow = run_workflow(self, self.wf_spec, expected, '')
|
||||
task = workflow.get_tasks_from_spec_name('testtask')[0]
|
||||
self.assertEqual(task.state_history, [TaskState.FUTURE,
|
||||
TaskState.WAITING,
|
||||
TaskState.READY,
|
||||
TaskState.COMPLETED])
|
||||
self.assertEqual(task.state, TaskState.COMPLETED)
|
||||
self.assertIn(b'127.0.0.1', task.results[0])
|
||||
|
||||
|
||||
|
@ -52,14 +52,6 @@ class TaskSpecTest(unittest.TestCase):
|
||||
self.assertEqual(self.spec.outputs, [spec])
|
||||
self.assertEqual(spec.inputs, [self.spec])
|
||||
|
||||
def testFollow(self):
|
||||
self.assertEqual(self.spec.outputs, [])
|
||||
self.assertEqual(self.spec.inputs, [])
|
||||
spec = self.create_instance()
|
||||
self.spec.follow(spec)
|
||||
self.assertEqual(spec.outputs, [self.spec])
|
||||
self.assertEqual(self.spec.inputs, [spec])
|
||||
|
||||
def testTest(self):
|
||||
# Should fail because the TaskSpec has no id yet.
|
||||
spec = self.create_instance()
|
||||
@ -101,12 +93,12 @@ class TaskSpecTest(unittest.TestCase):
|
||||
M = Join(self.wf_spec, 'M')
|
||||
T3 = Simple(self.wf_spec, 'T3')
|
||||
|
||||
T1.follow(self.wf_spec.start)
|
||||
T2A.follow(T1)
|
||||
T2B.follow(T1)
|
||||
self.wf_spec.start.connect(T1)
|
||||
T1.connect(T2A)
|
||||
T1.connect(T2B)
|
||||
T2A.connect(M)
|
||||
T2B.connect(M)
|
||||
T3.follow(M)
|
||||
M.connect(T3)
|
||||
|
||||
self.assertEqual(T1.ancestors(), [self.wf_spec.start])
|
||||
self.assertEqual(T2A.ancestors(), [T1, self.wf_spec.start])
|
||||
@ -118,8 +110,7 @@ class TaskSpecTest(unittest.TestCase):
|
||||
T1 = Join(self.wf_spec, 'T1')
|
||||
T2 = Simple(self.wf_spec, 'T2')
|
||||
|
||||
T1.follow(self.wf_spec.start)
|
||||
T2.follow(T1)
|
||||
self.wf_spec.start.connect(T1)
|
||||
T1.connect(T2)
|
||||
|
||||
self.assertEqual(T1.ancestors(), [self.wf_spec.start])
|
||||
|
@ -102,8 +102,8 @@ class WorkflowSpecTest(unittest.TestCase):
|
||||
task2 = Join(self.wf_spec, 'Second')
|
||||
task1.connect(task2)
|
||||
|
||||
task2.follow(task1)
|
||||
task1.follow(task2)
|
||||
task1.connect(task2)
|
||||
task2.connect(task1)
|
||||
|
||||
results = self.wf_spec.validate()
|
||||
self.assertIn("Found loop with 'Second': Second->First then 'Second' "
|
||||
|
@ -1,6 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from copy import deepcopy
|
||||
|
||||
from SpiffWorkflow.spiff.parser.process import SpiffBpmnParser, VALIDATOR
|
||||
from SpiffWorkflow.spiff.serializer.config import SPIFF_SPEC_CONFIG
|
||||
|
@ -1,10 +1,3 @@
|
||||
import os
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
dirname = os.path.dirname(__file__)
|
||||
sys.path.insert(0, os.path.join(dirname, '..', '..', '..'))
|
||||
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
|
||||
from .BaseTestCase import BaseTestCase
|
||||
|
29
tests/SpiffWorkflow/spiff/MultiInstanceTaskTest.py
Normal file
29
tests/SpiffWorkflow/spiff/MultiInstanceTaskTest.py
Normal file
@ -0,0 +1,29 @@
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
|
||||
from .BaseTestCase import BaseTestCase
|
||||
|
||||
|
||||
class MultiInstanceTaskTest(BaseTestCase):
|
||||
|
||||
def testMultiInstanceTask(self):
|
||||
spec, subprocesses = self.load_workflow_spec('spiff_multiinstance.bpmn', 'Process_1')
|
||||
self.workflow = BpmnWorkflow(spec, subprocesses)
|
||||
start = self.workflow.get_tasks_from_spec_name('Start')[0]
|
||||
start.data = {'input_data': [1, 2, 3]}
|
||||
self.workflow.do_engine_steps()
|
||||
task = self.workflow.get_tasks_from_spec_name('any_task')[0]
|
||||
self.workflow.do_engine_steps()
|
||||
|
||||
self.save_restore()
|
||||
|
||||
ready_tasks = self.workflow.get_ready_user_tasks()
|
||||
for task in ready_tasks:
|
||||
task.data['output_item'] = task.data['input_item'] * 2
|
||||
task.complete()
|
||||
self.workflow.do_engine_steps()
|
||||
|
||||
self.assertTrue(self.workflow.is_completed())
|
||||
self.assertDictEqual(self.workflow.data, {
|
||||
'input_data': [2, 3, 4], # Prescript adds 1 to input
|
||||
'output_data': [3, 5, 7], # Postscript subtracts 1 from output
|
||||
})
|
49
tests/SpiffWorkflow/spiff/data/spiff_multiinstance.bpmn
Normal file
49
tests/SpiffWorkflow/spiff/data/spiff_multiinstance.bpmn
Normal file
@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:spiffworkflow="http://spiffworkflow.org/bpmn/schema/1.0/core" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_19o7vxg" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.11.1" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.17.0">
|
||||
<bpmn:process id="Process_1" isExecutable="true">
|
||||
<bpmn:startEvent id="Event_1ftsuzw">
|
||||
<bpmn:outgoing>Flow_1hjrex4</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:task id="any_task" name="Any Task">
|
||||
<bpmn:extensionElements>
|
||||
<spiffworkflow:preScript>input_data = [ v + 1 for v in input_data ]</spiffworkflow:preScript>
|
||||
<spiffworkflow:postScript>output_data = [ v - 1 for v in output_data ]</spiffworkflow:postScript>
|
||||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>Flow_1hjrex4</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1xndbxy</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics>
|
||||
<bpmn:loopDataInputRef>input_data</bpmn:loopDataInputRef>
|
||||
<bpmn:loopDataOutputRef>output_data</bpmn:loopDataOutputRef>
|
||||
<bpmn:inputDataItem id="input_item" name="input item" />
|
||||
<bpmn:outputDataItem id="output_item" name="output item" />
|
||||
</bpmn:multiInstanceLoopCharacteristics>
|
||||
</bpmn:task>
|
||||
<bpmn:sequenceFlow id="Flow_1hjrex4" sourceRef="Event_1ftsuzw" targetRef="any_task" />
|
||||
<bpmn:endEvent id="Event_0c80924">
|
||||
<bpmn:incoming>Flow_1xndbxy</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_1xndbxy" sourceRef="any_task" targetRef="Event_0c80924" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
|
||||
<bpmndi:BPMNEdge id="Flow_1xndbxy_di" bpmnElement="Flow_1xndbxy">
|
||||
<di:waypoint x="380" y="120" />
|
||||
<di:waypoint x="432" y="120" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1hjrex4_di" bpmnElement="Flow_1hjrex4">
|
||||
<di:waypoint x="228" y="120" />
|
||||
<di:waypoint x="280" y="120" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="Event_1ftsuzw_di" bpmnElement="Event_1ftsuzw">
|
||||
<dc:Bounds x="192" y="102" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1iqs4li_di" bpmnElement="any_task">
|
||||
<dc:Bounds x="280" y="80" width="100" height="80" />
|
||||
<bpmndi:BPMNLabel />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_0c80924_di" bpmnElement="Event_0c80924">
|
||||
<dc:Bounds x="432" y="102" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
Loading…
x
Reference in New Issue
Block a user