mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-01-28 18:55:14 +00:00
7515519bc9
d9fcd45a Updating release numbers e0d04877 Merge pull request #251 from sartography/bugfix/make-data-objects-available-to-prescripts 7d260c36 Merge pull request #252 from sartography/bug/data_object_serializer_fix 3de54d97 Fixing a failing test. 27c5d3e1 A minor fix during deserialization to avoid issues for some users that upgraded between official releases. 250311d6 copy data objects before prescript execution git-subtree-dir: SpiffWorkflow git-subtree-split: d9fcd45a384f8376a669cf58677564289d2c661c
55 lines
1.7 KiB
Python
55 lines
1.7 KiB
Python
from SpiffWorkflow.bpmn.specs.SubWorkflowTask import SubWorkflowTask, TransactionSubprocess, CallActivity
|
|
from SpiffWorkflow.spiff.specs.spiff_task import SpiffBpmnTask
|
|
|
|
class SubWorkflowTask(SubWorkflowTask, SpiffBpmnTask):
|
|
|
|
def __init__(self, wf_spec, name, subworkflow_spec, transaction=False, **kwargs):
|
|
|
|
SpiffBpmnTask.__init__(self, wf_spec, name, **kwargs)
|
|
# We don't so much as a class hierachy as a class pile and I'm giving up doing
|
|
# this properly
|
|
self.spec = subworkflow_spec
|
|
self.transaction = transaction
|
|
self.in_assign = []
|
|
self.out_assign = []
|
|
|
|
def _on_ready_hook(self, my_task):
|
|
SpiffBpmnTask._on_ready_hook(self, my_task)
|
|
self.start_workflow(my_task)
|
|
|
|
def _on_complete_hook(self, my_task):
|
|
SpiffBpmnTask._on_complete_hook(self, my_task)
|
|
|
|
@property
|
|
def spec_type(self):
|
|
return 'Subprocess'
|
|
|
|
|
|
class TransactionSubprocess(SubWorkflowTask, TransactionSubprocess):
|
|
|
|
def __init__(self, wf_spec, name, subworkflow_spec, transaction=True, **kwargs):
|
|
|
|
SpiffBpmnTask.__init__(self, wf_spec, name, **kwargs)
|
|
self.spec = subworkflow_spec
|
|
self.transaction = transaction
|
|
self.in_assign = []
|
|
self.out_assign = []
|
|
|
|
@property
|
|
def spec_type(self):
|
|
return 'Transactional Subprocess'
|
|
|
|
|
|
class CallActivity(SubWorkflowTask, CallActivity):
|
|
|
|
def __init__(self, wf_spec, name, subworkflow_spec, **kwargs):
|
|
|
|
SpiffBpmnTask.__init__(self, wf_spec, name, **kwargs)
|
|
self.spec = subworkflow_spec
|
|
self.in_assign = []
|
|
self.out_assign = []
|
|
|
|
@property
|
|
def spec_type(self):
|
|
return 'Call Activity'
|