Get the tasks for the current branch in the execution graph

Registered by Dougal Matthews

The `tasks` function is useful for querying for the current tasks. However, it is hard to get only the history for the current task.

See, for example, this example:

  wf1:
    tasks:
      task_a:
        action: std.noop
        on-success: task_b
      task_b:
        action: std.noop
        on-success:
          - task_c
          - task_d
      task_c:
        action: std.noop
      task_d:
        action: std.echo output=<% tasks(branch=True) %>

In this example, tasks(branch=True) would return task_a, task_b and task_d. task_c wouldn't be included as it is on a different branch - it branches off at task_b, which calls two tasks).

This could be useful in a number of different cases, but the most common use is likely to be when creating an audit trail - error messages could include the history of actions and/or stack trace. Or after something has been successful the steps to get there could be logged.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Dougal Matthews
Direction:
Needs approval
Assignee:
None
Definition:
Pending Approval
Series goal:
Proposed for pike
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.