Exemplo n.º 1
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;
        }
Exemplo n.º 2
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;
 }
Exemplo n.º 3
0
 public static WorkflowResults CreateTerminatedWorkflowResults(WorkflowTerminatedEventArgs args)
 {
     WorkflowResults results = new WorkflowResults(args);
     results.Status = WorkflowStatus.Terminated;
     return results;
 }
Exemplo n.º 4
0
 public static WorkflowResults CreateCompletedWorkflowResults(WorkflowCompletedEventArgs args)
 {
     WorkflowResults results = new WorkflowResults(args);
     results.Status= WorkflowStatus.Completed;
     return results;
 }