elsa-workflows / elsa-workflows/elsa-core

IUserTaskService enhancement - optional activityId

Open
#4,535 3 comments 0 reactions 0 assignees View on GitHub
bug elsa 2 elsa 3 enhancement good first issue triaged
Dominant language
C#
Stars
7.9k
Forks
1.5k
Avg merge
15h 22m
Merged PRs (30d)
114

Description

The IUserTaskService is great but, I think it needs an improvement.

Specifically, i think the TriggerUserAction record needs an optional activityId, to be absolutely specific if the action being performed is going to target the correct activity.

`public record TriggerUserAction(string Action,string? WorkflowInstanceId = default,string? CorrelationId = default );`

to become

`public record TriggerUserAction(string Action,string? WorkflowInstanceId = default, string? ActivityId = default, string? CorrelationId = default );`

If you consider the possibility that a Fork has a blocking activity on each branch, and each perhaps has the same outcome names, then the specificity requires in that use providing the activityId.

This change would also predicate the IUserTaskService needing two additional methods:

```
Task< CollectedWorkflow> ExecuteUserActionAsync(TriggerUserAction taskAction, CancellationToken cancellationToken = default(CancellationToken));

Task DispatchUserActionAsync(TriggerUserAction taskAction, CancellationToken cancellationToken = default(CancellationToken));
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.