Skip to content

Commit

Permalink
Merge pull request #338 from sartography/bugfix/triggered-multiinstan…
Browse files Browse the repository at this point in the history
…ce-tasks

prevent errors synching children of MI tasks
  • Loading branch information
essweine authored Jun 8, 2023
2 parents 01a25fc + 11b78ce commit efcdcf5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions SpiffWorkflow/bpmn/specs/mixins/multiinstance_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def _update_hook(self, my_task):
my_task._set_state(TaskState.WAITING)
task_spec = my_task.workflow.spec.task_specs[self.task_spec]
child = my_task._add_child(task_spec, TaskState.WAITING)
child.triggered = True
child.data = deepcopy(my_task.data)

def child_completed_action(self, my_task, child):
Expand Down Expand Up @@ -128,6 +129,7 @@ def create_child(self, my_task, item, key_or_index=None):

task_spec = my_task.workflow.spec.task_specs[self.task_spec]
child = my_task._add_child(task_spec, TaskState.WAITING)
child.triggered = True
child.data = deepcopy(my_task.data)
if self.input_item is not None:
child.data[self.input_item.bpmn_id] = deepcopy(item)
Expand Down

0 comments on commit efcdcf5

Please sign in to comment.