Squashed 'SpiffWorkflow/' changes from b3235fad59..161cb7a450
161cb7a450 Merge pull request #302 from sartography/bugfix/subprocess-task-state e12c950627 start workflow while subprocess is waiting git-subtree-dir: SpiffWorkflow git-subtree-split: 161cb7a4509a3d0e0574f3e2a98157862c053bad
This commit is contained in:
parent
f3d02daf7a
commit
71f8c94096
|
@ -27,7 +27,6 @@ class SubWorkflowTask(BpmnSpecMixin):
|
|||
|
||||
def _on_ready_hook(self, my_task):
|
||||
super()._on_ready_hook(my_task)
|
||||
self.start_workflow(my_task)
|
||||
|
||||
def _on_subworkflow_completed(self, subworkflow, my_task):
|
||||
self.update_data(my_task, subworkflow)
|
||||
|
@ -38,7 +37,8 @@ class SubWorkflowTask(BpmnSpecMixin):
|
|||
if my_task.id not in wf.subprocesses:
|
||||
super()._update_hook(my_task)
|
||||
self.create_workflow(my_task)
|
||||
return True
|
||||
self.start_workflow(my_task)
|
||||
my_task._set_state(TaskState.WAITING)
|
||||
|
||||
def _on_cancel(self, my_task):
|
||||
subworkflow = my_task.workflow.get_subprocess(my_task)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
from SpiffWorkflow.task import TaskState
|
||||
from SpiffWorkflow.bpmn.specs.SubWorkflowTask import (
|
||||
SubWorkflowTask as DefaultSubWorkflow,
|
||||
TransactionSubprocess as DefaultTransaction,
|
||||
|
@ -24,7 +25,8 @@ class SubWorkflowTask(DefaultSubWorkflow, SpiffBpmnTask):
|
|||
if my_task.id not in wf.subprocesses:
|
||||
SpiffBpmnTask._update_hook(self, my_task)
|
||||
self.create_workflow(my_task)
|
||||
return True
|
||||
self.start_workflow(my_task)
|
||||
my_task._set_state(TaskState.WAITING)
|
||||
|
||||
def _on_complete_hook(self, my_task):
|
||||
SpiffBpmnTask._on_complete_hook(self, my_task)
|
||||
|
|
Loading…
Reference in New Issue