示例#1
0
        //public WorkflowResults CreateAbortedWorkflowResults(WorkflowEventArgs args)
        //{
        //    WorkflowResults results = new WorkflowResults(args);
        //    results.Status = WorkflowStatus.Aborted;
        //    return results;
        //}

        public static WorkflowResults CreateRunningWorkflowResults(WorkflowEventArgs args)
        {
            WorkflowResults results = new WorkflowResults(args);

            results.Status = WorkflowStatus.Running;
            return(results);
        }
示例#2
0
        public static WorkflowResults CreateCompletedWorkflowResults(WorkflowCompletedEventArgs args)
        {
            WorkflowResults results = new WorkflowResults(args);

            results.Status = WorkflowStatus.Completed;
            return(results);
        }
示例#3
0
        public static WorkflowResults CreateTerminatedWorkflowResults(WorkflowTerminatedEventArgs args)
        {
            WorkflowResults results = new WorkflowResults(args);

            results.Status = WorkflowStatus.Terminated;
            return(results);
        }
示例#4
0
        public static WorkflowResults RunWorkflow(Type workflowType, Dictionary <string, object> workflowParameters)
        {
            //Check.ArgumentIsNotNull(workflowType, "workflowType");
            InitilizeRuntime();
            WorkflowInstance Instance;
            WorkflowResults  Results = new WorkflowResults();

            try
            {
                Instance           = Runtime.CreateWorkflow(workflowType, workflowParameters);
                Results.InstanceId = Instance.InstanceId;
                Instance.Start();
            }
            catch (Exception ex)
            {
                Results.Exception = ex;
            }

            return(Results);
        }
示例#5
0
        public static WorkflowResults RunWorkflow(Type workflowType, Dictionary<string, object> workflowParameters)
        {
            //Check.ArgumentIsNotNull(workflowType, "workflowType");
            InitilizeRuntime();
            WorkflowInstance Instance;
            WorkflowResults Results = new WorkflowResults();
            try
            {
                Instance = Runtime.CreateWorkflow(workflowType, workflowParameters);
                Results.InstanceId = Instance.InstanceId;
                Instance.Start();
            }
            catch (Exception ex)
            {
                Results.Exception = ex;
            }

            return Results;
        }
示例#6
0
 public static WorkflowResults CreateTerminatedWorkflowResults(WorkflowTerminatedEventArgs args)
 {
     WorkflowResults results = new WorkflowResults(args);
     results.Status = WorkflowStatus.Terminated;
     return results;
 }
示例#7
0
 //public WorkflowResults CreateAbortedWorkflowResults(WorkflowEventArgs args)
 //{
 //    WorkflowResults results = new WorkflowResults(args);
 //    results.Status = WorkflowStatus.Aborted;
 //    return results;
 //}
 public static WorkflowResults CreateRunningWorkflowResults(WorkflowEventArgs args)
 {
     WorkflowResults results = new WorkflowResults(args);
     results.Status = WorkflowStatus.Running;
     return results;
 }
示例#8
0
 public static WorkflowResults CreateCompletedWorkflowResults(WorkflowCompletedEventArgs args)
 {
     WorkflowResults results = new WorkflowResults(args);
     results.Status= WorkflowStatus.Completed;
     return results;
 }
示例#9
0
 void Runtime_WorkflowIdled(object sender, WorkflowEventArgs e)
 {
     CurrentResultsInContext = WorkflowResults.CreateRunningWorkflowResults(e);
 }
示例#10
0
 void Runtime_WorkflowCompleted(object sender, WorkflowCompletedEventArgs e)
 {
     CurrentResultsInContext =
         WorkflowResults.CreateCompletedWorkflowResults(e);
 }