-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add workflow initiator #6912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add workflow initiator #6912
Conversation
|
@sfmskywalker Any thoughts on this? |
|
@mcook-dev thanks for the PR! I'll need to find some time to review. Thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a workflow initiator property that captures the user who initiated a workflow execution, threading this information through the entire workflow system.
- Adds
Initiatorproperty to core workflow entities and execution contexts - Updates API endpoints to capture the authenticated user's name as the initiator
- Ensures the initiator information flows through all workflow creation and execution paths
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| WorkflowExecutionContext.cs | Adds Initiator property and updates constructors to accept initiator parameter |
| WorkflowState.cs | Adds Initiator property to workflow state representation |
| WorkflowInstance.cs | Adds Initiator property to the main workflow instance entity |
| WorkflowInstanceOptions.cs | Adds Initiator property to workflow creation options |
| StartWorkflowRequest.cs | Adds Initiator property to workflow start request |
| CreateWorkflowInstanceRequest.cs | Adds Initiator property to instance creation request |
| CreateAndRunWorkflowInstanceRequest.cs | Adds Initiator property to create-and-run request |
| LocalWorkflowClient.cs | Updates to pass initiator through workflow creation calls |
| DistributedWorkflowClient.cs | Updates to pass initiator through distributed workflow creation |
| DefaultWorkflowStarter.cs | Updates to pass initiator from start request to creation request |
| WorkflowInstanceFactory.cs | Updates to set initiator from options when creating instances |
| WorkflowStateExtractor.cs | Updates to extract initiator from execution context |
| EndpointBase.cs | Updates to capture authenticated user's name as initiator |
| WorkflowInstanceModel.cs | Adds Initiator property to API model |
| Mappers.cs | Updates mapper to include initiator in response |
| Api.Client models | Adds Initiator property to client-side models |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/modules/Elsa.Workflows.Api/Endpoints/WorkflowDefinitions/Execute/EndpointBase.cs
Outdated
Show resolved
Hide resolved
src/modules/Elsa.Workflows.Management/Options/WorkflowInstanceOptions.cs
Outdated
Show resolved
Hide resolved
src/modules/Elsa.Workflows.Core/Contexts/WorkflowExecutionContext.cs
Outdated
Show resolved
Hide resolved
…xecute/EndpointBase.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…Options.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ext.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@sfmskywalker Have the build dependencies been fixed so this can merge? |
|
Not yet, main is still out of date. Current focus lies with 3.6.0, but I’ll try to update main when I get a chance. |
|
@sfmskywalker Anything I can help with regarding 3.6.0? |
|
Not at the moment, but I appreciate the offer and will keep this in mind, thank you! |
|
@sfmskywalker no merge? that's upsetting |
|
@mcook-dev Not sure how this was closed, but I don’t think it was intentional. Let me reopen. |
4e58970 to
ae1bb77
Compare
Adding a workflow initiator property that captures the name claim of the authorized user if there is one
This change is