void INodeHandler.Execute(ProcessNode processNode, ProcessNode previousNode) { Console.WriteLine(processNode.NodeName + " Executing Sequence"); bool result = true; if (processNode.Expression != null) { Console.WriteLine(processNode.NodeName + " Conditional Sequence"); Console.WriteLine("Condition: " + processNode.Expression); var globals = new Globals(processNode.InputParameters.ToDictionary(e => e.Key, e => e.Value)); try { result = CSharpScript.EvaluateAsync <bool>(processNode.Expression, globals: globals).Result; Console.WriteLine("Condition result: " + result.ToString()); } catch (Exception e) { Console.WriteLine(e.Message); } } if (result) { processNode.Done(); } }
void INodeHandler.Execute(ProcessNode processNode, ProcessNode previousNode) { Console.WriteLine(processNode.NodeName); sequenceWait.GetOrAdd(processNode, new List <ProcessNode>(processNode.PreviousNodes)); lock (sequenceWait[processNode]) { sequenceWait[processNode].Remove(previousNode); } if (sequenceWait[processNode].Count == 0) { processNode.Done(); } }
void INodeHandler.Execute(ProcessNode processNode, ProcessNode previousNode) { Console.WriteLine(processNode.NodeName + " Executing Script"); if (processNode.Expression != null) { Console.WriteLine("Script: " + processNode.Expression); var globals = new Globals(processNode.InputParameters.ToDictionary(e => e.Key, e => e.Value)); try { processNode.OutputParameters = CSharpScript.EvaluateAsync <IDictionary <string, object> >(processNode.Expression, globals: globals) .Result.ToImmutableDictionary(); } catch (Exception e) { Console.WriteLine(e.Message); } } processNode.Done(); }
void INodeHandler.Execute(ProcessNode processNode, ProcessNode previousNode) { Console.WriteLine(processNode.NodeName + " Executing End"); processNode.ProcessInstance.SetOutputParameters(processNode); processNode.Done(); }
void INodeHandler.Execute(ProcessNode processNode, ProcessNode previousNode) { Console.WriteLine(processNode.NodeName + " Executing BusinessRule"); processNode.Done(); }
void INodeHandler.Execute(ProcessNode processNode, ProcessNode previousNode) { Console.WriteLine(processNode.NodeName); processNode.Done(); }
void INodeHandler.Execute(ProcessNode processNode, ProcessNode previousNode) { Console.WriteLine(processNode.NodeName + " Executing Exclusive Gateway (default)"); processNode.Done(); }