コード例 #1
0
 public ActorRequestContext(string managerId, string actionName, string requestId = null, FlowInstanceId flowInstanceId = null) : this()
 {
     ManagerId      = managerId;
     ActionName     = actionName;
     RequestId      = requestId;
     FlowInstanceId = flowInstanceId;
 }
コード例 #2
0
 protected async Task TryCreateFlow(string applicationName, FlowInstanceId flowInstanceId, string startedPayload)
 {
     try
     {
         var startRequest = new StartFlowRequest()
         {
             FlowInstanceId = flowInstanceId,
             StartDate      = DateTime.UtcNow,
             UserStarted    = $"{this.GetType().Name} - {flowInstanceId.Id}",
             StartedPayload = startedPayload
         };
         await AsyncActorFlow.CreateFlowAsync(new ActorIdentity(Guid.NewGuid().ToString(), applicationName), flowInstanceId, startRequest, CancellationToken.None);
     }
     catch (Exception ex)
     {
         Logger.LogInformation(ex, $"Failed to create flow to flow service");
     }
 }
コード例 #3
0
 protected abstract Task <bool> FlowInitialize(ActorRequestContext actorRequestContext, FlowInstanceId flowInstanceId, CancellationToken cancellationToken);
コード例 #4
0
 public virtual Task <bool> InitFlowAsync(ActorRequestContext actorRequestContext, FlowInstanceId flowInstanceId, CancellationToken cancellationToken)
 {
     FlowInstanceId = flowInstanceId;
     FlowServiceUri = actorRequestContext.ManagerService;
     return(FlowInitialize(actorRequestContext, flowInstanceId, cancellationToken));
 }
コード例 #5
0
 public ActorRequestContext(string managerId, string actionName, string requestId = null, ActorIdentity targetActor = null, FlowInstanceId flowInstanceId = null) : this(managerId, actionName, requestId, flowInstanceId)
 {
     TargetActor = targetActor;
 }