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

贡献者指南