// Protected Methods (1) 

        /// <inheriteddoc />
        protected override void OnLog(ILogMessage msg)
        {
            // use instance of 'msg'
            // as first argument for the workflow
            object[] basicArgs = new object[] { msg };

            // additional arguments from 'ProviderOfArguments' property
            IEnumerable <object> additionalArgs = CollectionHelper.AsSequence <object>(this._PROVIDER_OF_ARGUMENTS(this));

            // concat both
            IEnumerable <object> allArgs = basicArgs;

            if (additionalArgs != null)
            {
                allArgs = CollectionHelper.Concat(allArgs,
                                                  additionalArgs);
            }

            CollectionHelper.ForEach(this._WORKFLOW,
                                     delegate(IForEachItemExecutionContext <WorkflowFunc, object[]> ctx)
            {
                IWorkflowExecutionContext res = ctx.Item(ctx.State);

                if (res.HasBeenCanceled)
                {
                    ctx.Cancel = true;
                }
            }, CollectionHelper.ToArray(allArgs));
        }
        private static void InvokeWorkflowMethod(object obj, MethodInfo method,
                                                 IWorkflowExecutionContext ctx,
                                                 ICollection <Exception> occuredErrors)
        {
            try
            {
                object[] methodParams;
                if (method.GetParameters().Length < 1)
                {
                    methodParams = new object[0];
                }
                else
                {
                    methodParams = new object[] { ctx };
                }

                method.Invoke(obj, methodParams);
            }
            catch (Exception ex)
            {
                occuredErrors.Add(ex);

                if (ctx.ContinueOnError == false)
                {
                    throw;
                }
            }
        }
        public override void Execute(IWorkflowExecutionContext context)
        {
            if (Input == null)
                throw new Exception("Input value was not set");

            Output = Input + " !!!";
        }
Beispiel #4
0
        private static void Station_C1(IWorkflowExecutionContext ctx)
        {
            var result = new Dictionary <string, object>();

            foreach (var op in typeof(Test).GetExplicitOperators())
            {
            }
        }
Beispiel #5
0
 internal PipelineExecutionContext(IWorkflowExecutionContext workflowExecutionContext, OrationiDatabaseContext dbContext)
 {
     PipelineValues            = new Dictionary <string, object>();
     PluginStepSettings        = new Dictionary <string, object>();
     _workflowExecutionContext = workflowExecutionContext;
     _fileStores   = dbContext.FileStores;
     CacheProvider = CacheProviderFactory.Create(dbContext);
     RequestBody   = _workflowExecutionContext.MessageBody;
 }
 public override void Execute(IWorkflowExecutionContext context)
 {
     if (Condition)
     {
         context.Execute(True);
     }
     else
     {
         context.Execute(False);
     }
 }
 public override void Execute(IWorkflowExecutionContext context)
 {
     context.Execute(Next);
 }
 /// <summary>
 /// Handles an execution error.
 /// </summary>
 /// <param name="ctx">The current execution context.</param>
 protected virtual void HandleError(IWorkflowExecutionContext ctx)
 {
     ctx.ContinueOnError = false;
     throw ctx.LastError;
 }
Beispiel #9
0
 public void Step3(IWorkflowExecutionContext ctx)
 {
 }
 public override void Execute(IWorkflowExecutionContext context)
 {
     MessageBox.Show(Message);
     context.Execute(Next);
 }
 protected virtual void ExecuteNextStep(IWorkflowExecutionContext ctx)
 {
     // do nothing by default
 }
 protected void StartWorkflow(IWorkflowExecutionContext ctx)
 {
     ExecuteFirstStep(ctx);
 }
Beispiel #13
0
 public void Step2(IWorkflowExecutionContext ctx)
 {
     ctx.Next = this.Step4;
 }
 public override void Execute(IWorkflowExecutionContext context)
 {
     ExecutionCount = ExecutionCount + 1;
     if (ExecutionCount < 2)
         context.PublishEvent(new WorkflowEventData());
 }
Beispiel #15
0
 public override void Step4(IWorkflowExecutionContext ctx)
 {
 }
 public abstract void Execute(IWorkflowExecutionContext context);
Beispiel #17
0
 private static void Station_B1(IWorkflowExecutionContext ctx)
 {
     ctx.Next = Station_C1;
 }
Beispiel #18
0
 public override void Execute(IWorkflowExecutionContext context)
 {
     IsCalled = true;
     context.Execute(Next);
 }
 /// <summary>
 /// The first action for <see cref="SimpleWorkflowBase.StartWorkflow(IWorkflowExecutionContext)" />.
 /// </summary>
 /// <param name="ctx">The current execution context.</param>
 protected abstract void ExecuteFirstStep(IWorkflowExecutionContext ctx);
 /// <inheriteddoc />
 protected sealed override void ExecuteFirstStep(IWorkflowExecutionContext ctx)
 {
     _START_ACTION(ctx);
 }
Beispiel #21
0
 public virtual void Step4(IWorkflowExecutionContext ctx)
 {
 }