MCPcopy
hub / github.com/sartography/SpiffWorkflow / cancel

Method cancel

SpiffWorkflow/task.py:360–368  ·  view source on GitHub ↗

Cancels the item if it was not yet completed; recursively cancels its children.

(self)

Source from the content-addressed store, hash-verified

358 return retval
359
360 def cancel(self):
361 """Cancels the item if it was not yet completed; recursively cancels its children."""
362 if self.has_state(TaskState.FINISHED_MASK):
363 for child in self.children:
364 child.cancel()
365 else:
366 self._set_state(TaskState.CANCELLED)
367 self._drop_children()
368 self.task_spec._on_cancel(self)
369
370 def complete(self):
371 """Marks this task complete."""

Callers

nothing calls this directly

Calls 4

has_stateMethod · 0.95
_set_stateMethod · 0.95
_drop_childrenMethod · 0.95
_on_cancelMethod · 0.45

Tested by

no test coverage detected