static void Main(string[] args) { IInitializeWFParams actor = ActorProxy.Create <IInitializeWFParams>(ActorId.CreateRandom(), new Uri("fabric:/Zellenfertigung_Demo/InitializeWFParamsActorService")); Task <string> retval = actor.GetHelloWorldInitAsync(); Console.WriteLine($"Hello World! {retval.Result}"); IGetGantryJob getGantryJobActor = ActorProxy.Create <IGetGantryJob>(ActorId.CreateRandom(), new Uri("fabric:/Zellenfertigung_Demo/GetGantryJobActorService")); Task <string> GantryJobRetVal = getGantryJobActor.GetHelloWorldGantryJobAsync(retval.Result); Console.WriteLine($"Hello World! {GantryJobRetVal.Result}"); //IMyService helloWorldClient = ServiceProxy.Create<IMyService>(new Uri("fabric:/Zellenfertigung_Demo/Stateless1")); //var message = helloWorldClient.HelloWorldAsync(); //Console.WriteLine($"Hello World von StatelessService {message.Result }"); Console.ReadKey(); }
public override void Run(System.Threading.CancellationToken token, object state, object parameterDto = null) { if (!token.IsCancellationRequested) { var s = state as FertigungszelleWorkflowState; StateToken = s; IGetGantryJob getGantryJobActor = ActorProxy.Create <IGetGantryJob>(ActorId.CreateRandom(), new Uri("fabric:/Zellenfertigung_Demo/GetGantryJobActorService")); Task <string> GantryJobRetVal = getGantryJobActor.GetHelloWorldGantryJobAsync(s.Test); Console.WriteLine($"Hello World! {GantryJobRetVal.Result}"); } else { Core.Logger.InfoFormat($"Fertigungszelle has been canceled by user"); } FinishActivity(); //FinishActivityAsSuccess(false); }