elsa-workflows/elsa-core

IUserTaskService enhancement - optional activityId

開放

#4,535 建立於 2023年10月13日

 (3 則留言) (0 個反應) (0 位負責人)C# (979 個分叉)batch import
bugelsa 2elsa 3enhancementgood first issuetriaged

倉庫指標

星標
 (5,486 顆星)
PR 合併指標
 (平均合併 1天 17小時) (30 天內合併 29 個 PR)

描述

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));

貢獻者指南