IUserTaskService enhancement - optional activityId
#4.535 aberto em 13 de out. de 2023
Métricas do repositório
- Stars
- (5.486 estrelas)
- Métricas de merge de PR
- (Mesclagem média 1d 17h) (29 fundiu PRs em 30d)
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<CollectedWorkflow> DispatchUserActionAsync(TriggerUserAction taskAction, CancellationToken cancellationToken = default(CancellationToken));