當前位置: 首頁>>代碼示例>>C#>>正文


C# Activities.ExternalDataEventArgs類代碼示例

本文整理匯總了C#中System.Workflow.Activities.ExternalDataEventArgs的典型用法代碼示例。如果您正苦於以下問題:C# ExternalDataEventArgs類的具體用法?C# ExternalDataEventArgs怎麽用?C# ExternalDataEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ExternalDataEventArgs類屬於System.Workflow.Activities命名空間,在下文中一共展示了ExternalDataEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: DeliverMessage

        public void DeliverMessage(ExternalDataEventArgs eventArgs, IComparable queueName, object message, object workItem, IPendingWork workHandler)
        {
            if (eventArgs == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("eventArgs");
            }
            if (queueName == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("queueName");
            }

            using (ExternalDataExchangeClient desClient = new ExternalDataExchangeClient(WorkflowRuntimeEndpoint.netNamedPipeContextBinding,
                new EndpointAddress(this.baseUri)))
            {
                using (OperationContextScope scope = new OperationContextScope((IContextChannel)desClient.InnerChannel))
                {
                    IContextManager contextManager = desClient.InnerChannel.GetProperty<IContextManager>();
                    Fx.Assert(contextManager != null, "IContextManager must not be null.");
                    if (contextManager != null)
                    {
                        IDictionary<string, string> context = new Dictionary<string, string>();
                        context["instanceId"] = eventArgs.InstanceId.ToString();
                        contextManager.SetContext(context);
                    }

                    desClient.RaiseEvent(eventArgs, queueName, message);
                }
            }
  
        }
開發者ID:krytht,項目名稱:DotNetReferenceSource,代碼行數:30,代碼來源:WorkflowClientDeliverMessageWrapper.cs

示例2: onWorkflowActivated1_Invoked

        private void onWorkflowActivated1_Invoked(object sender, ExternalDataEventArgs e)
        {
            Debug.WriteLine("admProcessRequestsWF:{" + workflowProperties.WorkflowId + "} initiated");
            item = workflowProperties.Item;

            startTime = DateTime.Now;
        }
開發者ID:fraczo,項目名稱:Biuromagda,代碼行數:7,代碼來源:admProcessRequestsWF.cs

示例3: onWorkflowActivated1_Invoked

        private void onWorkflowActivated1_Invoked(object sender, ExternalDataEventArgs e)
        {
            intZgloszenieID = Convert.ToInt32(workflowProperties.Item["Zgłoszenie.ID"]);

            Load_cNagrody();

            Clear_ContentEntries();
        }
開發者ID:RAWcom,項目名稱:pvspa.CustomWorkflows,代碼行數:8,代碼來源:Workflow1.cs

示例4: OnValuationRequest

 public void OnValuationRequest()
 {
     ExternalDataEventArgs e = new ExternalDataEventArgs(IgrssCommon.lastWf);
     if (RequestValuation != null)
     {
         RequestValuation(this, e);
     }
 }
開發者ID:UrviGandhi,項目名稱:IGRSS,代碼行數:8,代碼來源:ValuationProcessEvents.cs

示例5: onWorkflowActivated1_Invoked

        private void onWorkflowActivated1_Invoked(object sender, ExternalDataEventArgs e)
        {
            Debug.WriteLine("ZatwierdzenieZadaniaWF:{" + workflowProperties.WorkflowId + "} initiated");
            item = workflowProperties.Item;

            Debug.WriteLine("Workflow created:" + workflowProperties.Workflow.Created.ToString());
            startTime = DateTime.Now;
        }
開發者ID:fraczo,項目名稱:Biuromagda,代碼行數:8,代碼來源:ZatwierdzenieZadania.cs

示例6: SMTSubmitEvent_Invoked

        /// <summary>
        /// 接收事件後處理審批流程
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void SMTSubmitEvent_Invoked(object sender, ExternalDataEventArgs e)
        {
            SMTFlowArg input = e as SMTFlowArg;
            this.ApproveInfo = input.FlowData;
            Root().FlowData = input.FlowData;

            //Console.WriteLine("事件節點:" + this.Name + "工作流返回結果:" + ApproveInfo.Flow_FlowRecord_T.Content);
               //以下為處理代碼
        }
開發者ID:SaintLoong,項目名稱:TMFlow,代碼行數:14,代碼來源:SMTSubmitEvent.cs

示例7: onTaskChanged1_Invoked

 private void onTaskChanged1_Invoked(object sender, ExternalDataEventArgs e)
 {
     //更改後檢查任務屬性。
     //查找 1.0 以反映已完成的任務。
     if (afterProperties.PercentComplete == 1.0)
     {
         taskCompleted = true;
     }
 }
開發者ID:jetlive,項目名稱:skiaming,代碼行數:9,代碼來源:Workflow1.cs

示例8: onWorkflowActivated

        private void onWorkflowActivated(object sender, ExternalDataEventArgs e)
        {
            // desiriarize xml to the instance
            workflowId = workflowProperties.WorkflowId;

            // set value
            assignee = System.Threading.Thread.CurrentPrincipal.Identity.Name;
            instructions = "";
        }
開發者ID:tsmatsuz,項目名稱:20080609_IntegratedSiteDefinition,代碼行數:9,代碼來源:Workflow1.cs

示例9: Paied

 private void Paied(object sender, ExternalDataEventArgs e)
 {
     CRySTALDataConnections.CRySTALDataSetTableAdapters.CustomerTransactionsTableAdapter cta = new CRySTALDataConnections.CRySTALDataSetTableAdapters.CustomerTransactionsTableAdapter();
     cta.SetStatus(false, false, e.InstanceId);
     CRySTALDataConnections.CRySTALDataSetTableAdapters.TablesTblTableAdapter tta = new CRySTALDataConnections.CRySTALDataSetTableAdapters.TablesTblTableAdapter();
     CRySTALDataConnections.CRySTALDataSet.CustomerTransactionsDataTable ctd;
     ctd = cta.GetDataByWorkflowInstID(e.InstanceId);
     if (ctd.Rows.Count == 0) return;
     tta.SetStatus(2, ctd.First().TableNumber);
 }
開發者ID:ethiele,項目名稱:rutgersse2009group8,代碼行數:10,代碼來源:CustomerWorkflow.cs

示例10: OnEventInvoked

        private void OnEventInvoked(object sender, ExternalDataEventArgs e)
        {
            FormEventArgs args = (FormEventArgs)e;

            FormsWorkflow formsWorkflow = this.GetRoot<FormsWorkflow>();

            formsWorkflow.ChildWorkflowResult = args.WorkflowResult;

            base.OnInvoked(e);
        }
開發者ID:DBailey635,項目名稱:C1-CMS,代碼行數:10,代碼來源:ChildWorkflowDoneHandleExternalEventActivity.cs

示例11: AddFoodOrderToBill

        private void AddFoodOrderToBill(object sender, ExternalDataEventArgs e)
        {
            CRySTAL.FoodOrder order = (e as WorkflowLocalService.FoodOrderEventArgs).Order;
            CRySTALDataConnections.CRySTALDataSetTableAdapters.BillItemsTableAdapter bia = new CRySTALDataConnections.CRySTALDataSetTableAdapters.BillItemsTableAdapter();
            CRySTAL.CrystalMenuDataContext db = new CRySTAL.CrystalMenuDataContext();

            foreach (CRySTAL.ItemOrder item in order.FoodOrders)
            {
                var product = from p in db.MenuItems
                              where p.ID == item.productID
                              select p;
                if (product.Count() > 0)
                {
                    bia.InsertBillItem(e.InstanceId, product.First().Name, (decimal)product.First().Price, item.DeleverToPerson);
                }
            }
        }
開發者ID:ethiele,項目名稱:rutgersse2009group8,代碼行數:17,代碼來源:CustomerWorkflow.cs

示例12: EventHandler

 public void EventHandler(object sender, ExternalDataEventArgs eventArgs)
 {
     if (eventArgs == null)
     {
         throw new ArgumentNullException("eventArgs");
     }
     try
     {
         object obj2;
         IPendingWork work;
         object[] objArray = this.enqueueWrapper.PrepareEventArgsArray(sender, eventArgs, out obj2, out work);
         EventQueueName key = this.GetKey(objArray);
         string name = null;
         if (eventArgs.Identity == null)
         {
             IIdentity identity = Thread.CurrentPrincipal.Identity;
             WindowsIdentity identity2 = identity as WindowsIdentity;
             if ((identity2 != null) && (identity2.User != null))
             {
                 name = identity2.User.Translate(typeof(NTAccount)).ToString();
             }
             else if (identity != null)
             {
                 name = identity.Name;
             }
             eventArgs.Identity = name;
         }
         else
         {
             name = eventArgs.Identity;
         }
         MethodMessage message = new MethodMessage(this.proxiedType, this.eventName, objArray, name);
         WorkflowActivityTrace.Activity.TraceEvent(TraceEventType.Information, 0, "Firing event {0} for instance {1}", new object[] { this.eventName, eventArgs.InstanceId });
         this.enqueueWrapper.DeliverMessage(eventArgs, key, message, obj2, work);
     }
     catch (Exception exception)
     {
         if (ExternalDataExchangeService.IsIrrecoverableException(exception))
         {
             throw;
         }
         throw new EventDeliveryFailedException(SR.GetString("Error_EventDeliveryFailedException", new object[] { this.proxiedType, this.eventName, eventArgs.InstanceId }), exception);
     }
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:44,代碼來源:WorkflowMessageEventHandler.cs

示例13: EventHandler

        public void EventHandler(object sender, ExternalDataEventArgs eventArgs)
        {
            if (eventArgs == null)
            {
                throw new ArgumentNullException("eventArgs");
            }

            try
            {
                object workItem;
                IPendingWork workHandler;
                object[] args = this.enqueueWrapper.PrepareEventArgsArray(sender, eventArgs, out workItem, out workHandler);
                EventQueueName key = GetKey(args);

                String securityIdentifier = null;
                if (eventArgs.Identity == null)
                {
                    IIdentity identity = System.Threading.Thread.CurrentPrincipal.Identity;
                    WindowsIdentity windowsIdentity = identity as WindowsIdentity;
                    if (windowsIdentity != null && windowsIdentity.User != null)
                        securityIdentifier = windowsIdentity.User.Translate(typeof(NTAccount)).ToString();
                    else if (identity != null)
                        securityIdentifier = identity.Name;

                    eventArgs.Identity = securityIdentifier;
                }
                else
                {
                    securityIdentifier = eventArgs.Identity;
                }

                MethodMessage message = new MethodMessage(this.proxiedType, this.eventName, args, securityIdentifier);

                WorkflowActivityTrace.Activity.TraceEvent(TraceEventType.Information, 0, "Firing event {0} for instance {1}", this.eventName, eventArgs.InstanceId);

                this.enqueueWrapper.DeliverMessage(eventArgs, key, message, workItem, workHandler);
            }
            catch (Exception e)
            {
                if (ExternalDataExchangeService.IsIrrecoverableException(e))
                {
                    throw;
                }
                else
                {
                    throw new EventDeliveryFailedException(SR.GetString(SR.Error_EventDeliveryFailedException, this.proxiedType, this.eventName, eventArgs.InstanceId), e);
                }
            }
        }
開發者ID:iskiselev,項目名稱:JSIL.NetFramework,代碼行數:49,代碼來源:WorkflowMessageEventHandler.cs

示例14: onAGMReviewTaskChanged_Invoked

        private void onAGMReviewTaskChanged_Invoked(object sender, ExternalDataEventArgs e)
        {
            if (onAGMReviewTaskChanged.AfterProperties.ExtendedProperties[statusFieldID] != null)
            {
                string taskStatus = onAGMReviewTaskChanged.AfterProperties.ExtendedProperties[statusFieldID].ToString();

                if (taskStatus != null)
                {
                    if ((taskStatus == "Completed") || (taskStatus == "Expired"))
                    {
                        this._isAGMReviewTaskComplete = true;
                    }
                }
            }
        }
開發者ID:kawalgrover,項目名稱:MARTA-Projects,代碼行數:15,代碼來源:ReviewAgendaWorkflow.cs

示例15: onWorkflowActivated1_Invoked

        private void onWorkflowActivated1_Invoked(object sender, ExternalDataEventArgs e)
        {
            using (StringReader stringReader = new StringReader(workflowProperties.InitiationData))
            {
                using (XmlReader reader = XmlReader.Create(stringReader))
                {
                    XmlSerializer serializer = new XmlSerializer(typeof(ReviewWFData));
                    WorkflowData = (ReviewWFData)serializer.Deserialize(reader);
                }
            }

            SetReviewers();
            SetAgendaTitle();

            notifyAgendaOwner.Action = "Complete";
            notifyAgendaOwner.Source = "Paperless Board";
            notifyAgendaOwner.TaskTitle = string.Format("Edit documents for '{0}', and then start the Board Agenda Workflow.", AgendaTitle);
            notifyAgendaOwner.TaskDescription = string.Format("All the reviewers have finished reviewing content for this agenda. The Review Agenda workflow has been completed for Agenda {0}. The owner/sponsor of this agenda item now needs to start the Board Agenda workflow for this agenda.", AgendaTitle);
            notifyAgendaOwner.TaskDueDate = DateTime.Today.AddDays(1);

            SPUser originator = GetSPUser(this.workflowProperties.Item, "Sponsor");
            notifyAgendaOwner.TaskAssignedTo = originator.LoginName;
        }
開發者ID:kawalgrover,項目名稱:MARTA-Projects,代碼行數:23,代碼來源:ReviewAgendaWorkflow.cs


注:本文中的System.Workflow.Activities.ExternalDataEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。