Example #1
0
 private void wfapp_WorkflowCompleted(WorkflowApplicationCompletedEventArgs e)
 {
 }
 static void completed(WorkflowApplicationCompletedEventArgs e)
 {
     writeRunInfo(e.InstanceId, "completed", e.CompletionState.ToString());
 }
Example #3
0
 static void OnCompleted(WorkflowApplicationCompletedEventArgs completedArgs)
 {
     completeEvent.Set();
 }
 private void OnComplete(WorkflowApplicationCompletedEventArgs arg)
 {
     Log.Debug("OnComplete({arg.InstanceId}, {arg.CompletionState})");
 }
Example #5
0
 private void workflowCompleted(WorkflowApplicationCompletedEventArgs e)
 {
     var xx = 8;
 }
 // executed when instance is persisted
 public void OnWorkflowCompleted(WorkflowApplicationCompletedEventArgs e)
 {
 }
Example #7
0
 private void ReadOutputs(string workflowName, WorkflowApplicationCompletedEventArgs e)
 {
     NextWorkFlow = e.Outputs["ServiceArg"].ToString();
 }
Example #8
0
 private static void OnWorkflowCompleted(WorkflowApplicationCompletedEventArgs args)
 {
     Debug.WriteLine("OnWorkflowCompleted");
 }
Example #9
0
        // <summary>
        //     This method gets called when the workflow completes or gets terminated
        // </summary>
        private void _workflowInstance_WorkflowCompleted(WorkflowApplicationCompletedEventArgs e)
        {
            _synchronizationContext.Post(
                state =>
            {
                // If we are just cleaning up the workflow, no need to do anything
                // except enable the appropriate buttons (we might be heading to the
                // previous page)
                if (_onWorkflowCleanup)
                {
                    Wizard.EnableButton(ButtonType.Previous, false);
                    Wizard.EnableButton(ButtonType.Next, true);
                    Wizard.EnableButton(ButtonType.Finish, false);
                    Wizard.EnableButton(ButtonType.Cancel, true);
                    _onWorkflowCleanup = false;

                    return;
                }

                // If there was an exception, then the UnhandledException handler should have
                // already handled it.
                if (e.TerminationException == null)
                {
                    // The workflow has completed successfully

                    // Hide the status message on the DDL tab
                    HideStatus();

                    SummaryTabs.Enabled  = true;
                    txtSaveDdlAs.Enabled = true;

                    // Immediately enable the Finish button if we've gotten a hold of the WorkflowInstance
                    // We also enable going back to the connection page and cancelling out of the wizard completely
                    Wizard.EnableButton(ButtonType.Previous, true);
                    Wizard.EnableButton(ButtonType.Next, false);
                    Wizard.EnableButton(ButtonType.Finish, true);
                    Wizard.EnableButton(ButtonType.Cancel, true);

                    // Examine the SSDL output. Display an error if we can't find it.
                    object ssdlOutputObj;
                    var ssdlOutput = String.Empty;
                    if (e.Outputs.TryGetValue(EdmConstants.ssdlOutputName, out ssdlOutputObj) &&
                        ssdlOutputObj != null &&
                        !String.IsNullOrEmpty(ssdlOutput = ssdlOutputObj as string))
                    {
                        Wizard.ModelBuilderSettings.SsdlStringReader = new StringReader(ssdlOutput);
                    }

                    // Examine the MSL output. Display an error if we can't find it.
                    object mslOutputObj;
                    var mslOutput = String.Empty;
                    if (e.Outputs.TryGetValue(EdmConstants.mslOutputName, out mslOutputObj) &&
                        mslOutputObj != null &&
                        !String.IsNullOrEmpty(mslOutput = mslOutputObj as string))
                    {
                        Wizard.ModelBuilderSettings.MslStringReader = new StringReader(mslOutput);
                    }

                    // Examine the DDL output. Display an error if we can't find it.
                    object ddlOutputObj;
                    var ddlOutput = String.Empty;
                    if (e.Outputs.TryGetValue(EdmConstants.ddlOutputName, out ddlOutputObj) &&
                        ddlOutputObj != null &&
                        !String.IsNullOrEmpty(ddlOutput = ddlOutputObj as string))
                    {
                        Wizard.ModelBuilderSettings.DdlStringReader = new StringReader(ddlOutput);
                    }

                    // Display the DDL in the textbox
                    if (!String.IsNullOrEmpty(ddlOutput))
                    {
                        InferTablesAndDisplayDDL(ddlOutput);
                    }
                }
            }, null);
        }
Example #10
0
 Task IActivityActorInternal.OnCompletedAsync(WorkflowApplicationCompletedEventArgs args)
 {
     return(OnCompletedAsync(args));
 }
            private void OnCompleted(WorkflowApplicationCompletedEventArgs args)
            {
                _result = args.GetInstanceExtensions <IDSFDataObject>().ToList().First();
                IDictionary <string, object> outputs = args.Outputs;

                try
                {
                    if (!_isDebug)
                    {
                        // Travis.Frisinger : 19.10.2012 - Duplicated Recordset Data Bug 6038

                        object parentId;

                        outputs.TryGetValue("ParentWorkflowInstanceId", out parentId);

                        parentId = _result.ParentWorkflowInstanceId;

                        object parentServiceName;
                        outputs.TryGetValue("ParentServiceName", out parentServiceName);

                        var parentServiceNameStr = string.IsNullOrEmpty(_result.ParentServiceName) ? string.Empty : _result.ParentServiceName;

                        if (!string.IsNullOrEmpty(parentServiceNameStr) && Guid.TryParse(parentId.ToString(), out _parentWorkflowInstanceID))
                        {
                            if (_parentWorkflowInstanceID != _currentInstanceID)
                            {
                                // BUG 7850 - TWR - 2013.03.11 - ResourceCatalog refactor
                                var services = ResourceCatalog.Instance.GetDynamicObjects <DynamicServiceObjectBase>(_workspace.ID, parentServiceNameStr);
                                if (services != null && services.Count > 0)
                                {
                                    var service = services[0] as DynamicService;
                                    if (service != null)
                                    {
                                        _currentInstanceID = _parentWorkflowInstanceID;

                                        var actionSet = service.Actions;

                                        if (_result.WorkflowResumeable)
                                        {
                                            var serviceAction = actionSet.First();
                                            PooledServiceActivity wfActivity = serviceAction.PopActivity();

                                            try
                                            {
                                                ErrorResultTO invokeErrors;
                                                _result = _owner.InvokeWorkflow(wfActivity.Value, _result, _executionExtensions, _parentWorkflowInstanceID, _workspace, "dsfResumption", out invokeErrors);
                                                // attach any execution errors
                                                if (AllErrors != null)
                                                {
                                                    AllErrors.MergeErrors(invokeErrors);
                                                }
                                            }
                                            finally
                                            {
                                                serviceAction.PushActivity(wfActivity);
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    Dev2Logger.Log.Error(ex);
                    ExecutionStatusCallbackDispatcher.Instance.Post(_result.ExecutionCallbackID, ExecutionStatusCallbackMessageType.ErrorCallback);
                }
                finally
                {
                    try
                    {
                        if (_waitHandle != null)
                        {
                            _waitHandle.Set();
                        }
                        ExecutableServiceRepository.Instance.Remove(this);
                        if (DataTransferObject != null)
                        {
                            DataTransferObject.NumberOfSteps = _previousNumberOfSteps;
                        }
                    }
                    catch (Exception e)
                    {
                        // Best effort ;)
                        Dev2Logger.Log.Error(e);
                    }
                }


                // force a throw to kill the engine ;)
                if (args.TerminationException != null)
                {
                    _instance.Terminate("Force Terminate", new TimeSpan(0, 0, 1, 0));
                }

                // Not compatable with run.Dispose()
            }
Example #12
0
 /// <summary>
 /// Invoked when the <see cref="ActivityActor"/> is completed.
 /// </summary>
 /// <param name="args"></param>
 /// <returns></returns>
 protected virtual Task OnCompletedAsync(WorkflowApplicationCompletedEventArgs args)
 {
     return(Task.FromResult(true));
 }
Example #13
0
 public static void OnCompleted(WorkflowApplicationCompletedEventArgs e)
 {
     idleEvent.Set();
 }
Example #14
0
 private static void Completed(WorkflowApplicationCompletedEventArgs e)
 {
     Program.syncEvent.Set();
 }
Example #15
0
 public override void Completed(WorkflowApplicationCompletedEventArgs e)
 {
     base.Completed(e);
     Close();
     Dispose();
 }
Example #16
0
 static void workflowCompleted(WorkflowApplicationCompletedEventArgs e)
 {
     Console.WriteLine("状态:{0}", e.CompletionState.ToString());
     Console.WriteLine("实例编号:{0}", e.InstanceId);
 }
Example #17
0
 public void OnWorkflowViewCompleted(WorkflowApplicationCompletedEventArgs e)
 {
     result = e.Outputs;
 }
Example #18
0
 static void completed(WorkflowApplicationCompletedEventArgs e)
 {
     Console.WriteLine(e.Outputs["v3"].ToString());
 }
Example #19
0
 static void OnCompleted(WorkflowApplicationCompletedEventArgs e)
 {
     syncEvent.Set();
 }
Example #20
0
 private void OnWorkflowCompleted(WorkflowApplicationCompletedEventArgs e)
 {
     OnExecutingStateChanged(new WorkflowExecutingStateEventArgs(false));
 }
Example #21
0
 private void WorkflowCompleted(WorkflowApplicationCompletedEventArgs e)
 {
     this.running = false;
     StatusViewModel.SetStatusText(string.Format(Resources.CompletedInDebugStatus, e.CompletionState.ToString()), this.workflowName);
 }
Example #22
0
 public virtual void Completed(WorkflowApplicationCompletedEventArgs e)
 {
     Console.WriteLine("工作流 {0} 完成.", e.InstanceId);
     new DAL.FlowService().EndFlowByFlowID(int.Parse(e.Outputs["FlowID"].ToString()));
 }