Exemplo n.º 1
0
        public RunStateBase(WorkflowMetadata metaData, WorkflowRun _workflowRun, RequestContextData effectiveSecurityContext)
            : this(metaData)
        {
            WorkflowInvoker = new WorkflowInvoker();
            WorkflowRun     = _workflowRun;

            StepsTakenInSession      = 0;
            EffectiveSecurityContext = effectiveSecurityContext;
            ExitPointId     = _workflowRun.WorkflowRunExitPoint;
            HasTimeout      = _workflowRun.HasTimeout ?? false;
            PendingActivity = _workflowRun.PendingActivity;
            RunStatus       = _workflowRun.WorkflowRunStatus_Enum;
            CompletedAt     = _workflowRun.RunCompletedAt;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Keep running outstanding activities until completion.
        /// </summary>
        /// <returns>True, workflow has completed, False if there are pending activities.</returns>
        bool RunTillCompletion(WorkflowInvoker invoker, IRunState runState)
        {
            bool hasCompleted = invoker.RunTillCompletion(runState);

            return(hasCompleted);
        }