def cancel(self, success=False):
self.success = success<EOL>cancel = []<EOL>mask = Task.NOT_FINISHED_MASK<EOL>for task in Task.Iterator(self.task_tree, mask):<EOL><INDENT>cancel.append(task)<EOL><DEDENT>for task in cancel:<EOL><INDENT>task.cancel()<EOL><DEDENT>
Cancels all open tasks in the workflow.

:type  success: bool
:param success: Whether the Workflow should be marked as successfully
                completed.