/// <summary> /// Wrapper for orchestration-order to be converted to executable order /// </summary> /// <typeparam name="T"></typeparam> /// <param name="nextActorRequestContext"></param> /// <param name="payload"></param> /// <param name="order"></param> /// <param name="cancellationToken"></param> /// <returns></returns> protected virtual async Task ChainNextActorsAsync(ActorRequestContext nextActorRequestContext, object payload, Type typeOfPayload, OrchestrationOrder order, CancellationToken cancellationToken) { //put more logic on to the orchestration collection later. Now it is just get the single one var anotherOrderInMyActorLifeTime = order.ToExecutableOrder(); await ChainNextActorsAsync(nextActorRequestContext, payload, typeOfPayload, anotherOrderInMyActorLifeTime, cancellationToken); //just do nothing because no order }
public static ExecutableOrchestrationOrder ToExecutableOrder(this OrchestrationOrder orchestrationOrder) => new ExecutableOrchestrationOrder() { ActorId = orchestrationOrder.ActorId ?? Guid.NewGuid().ToString(), ActorServiceUri = (orchestrationOrder.ActorServiceUri == null) ? null : string.Copy(orchestrationOrder.ActorServiceUri.ToString()), Condition = orchestrationOrder.Condition == null ? null : string.Copy(orchestrationOrder.Condition) };