Problem/Motivation
A workflow instance records no actor: nothing captures who started it. A requester-facing surface ('my requests', where a user lists the processes they submitted with their status) needs to answer 'which instances did this user start?', but there is no such axis today, and every existing instance list is admin-gated or assignment-scoped.
Proposed resolution
Record a first-class initiator on the process instance: the user who started it, the equivalent of Camunda's startUserId / camunda:initiator and the WS-HumanTask task initiator (as opposed to a task's actual owner, which orchestra models as the assignee).
- New
initiatorbase field onorchestra_instance: a plain uid, empty for a system, API or cron start. Stored as a bare id, not a user entity reference (matching the work item assignee), so the runtime entity keeps no hard dependency on the user module. - Set at start via a new optional argument to
start(); a subprocess inherits its parent instance's initiator; never defaulted to the current user, so a programmatic start is not mis-attributed. - Indexed, so 'the instances a user initiated' is a paged, index-served query rather than a table scan. No load-all finder ships: the initiator set is unbounded.
Remaining tasks
Review and commit. Follow-ups, as separate issues: populate the initiator from the webform submission owner; a requester 'my requests' surface (a Views filter for instances initiated by the current user, with status and current-step fields).
Issue fork orchestra-3611190
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
mably commentedComment #5
mably commented