コード例 #1
0
ファイル: WorkflowMediator.cs プロジェクト: UrviGandhi/IGRSS
        public WorkflowResults RunWorkflow(Guid instanceId)
        {
            Check.IsNotTrue(instanceId == Guid.Empty, "Invalid Workflow Instance ID");

            WorkflowInstance instance = Runtime.GetWorkflow(instanceId);

            Check.IsNotNull(instance, "Could not retrieve workflow");

            bool result = WorkflowScheduler.RunWorkflow(instance.InstanceId);

            Check.IsTrue(result, "Could not run workflow "
                         + instance.InstanceId);

            return(CurrentResultsInContext);
        }
コード例 #2
0
ファイル: WorkflowMediator.cs プロジェクト: UrviGandhi/IGRSS
        public WorkflowResults RunWorkflow(Type workflowType)
        {
            Check.ArgumentIsNotNull(workflowType, "workflowType");

            WorkflowInstance instance =
                Runtime.CreateWorkflow(workflowType);

            instance.Start();

            bool result = WorkflowScheduler.RunWorkflow(instance.InstanceId);

            Check.IsTrue(result, "Could not run workflow "
                         + instance.InstanceId);

            return(CurrentResultsInContext);
        }