当前位置: 首页>>代码示例>>C#>>正文


C# CodeActivityContext.SetValue方法代码示例

本文整理汇总了C#中CodeActivityContext.SetValue方法的典型用法代码示例。如果您正苦于以下问题:C# CodeActivityContext.SetValue方法的具体用法?C# CodeActivityContext.SetValue怎么用?C# CodeActivityContext.SetValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CodeActivityContext的用法示例。


在下文中一共展示了CodeActivityContext.SetValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Execute

        protected override void Execute(CodeActivityContext context)
        {
            DynamicValue taskdata = context.GetValue(this.Data);

            DynamicValue MessageId = new DynamicValue();
            taskdata.TryGetValue("MessageId", out MessageId);

            IMessageStore messageStore = strICT.InFlow.Db.StoreHandler.getMessageStore(context.GetValue(cfgSQLConnectionString));
            M_Message message = messageStore.getMessageBymsgId(Convert.ToInt32(MessageId.ToString()));

            //store message-type in GlobalTransition
            context.SetValue(GlobalTransition, message.Sender_SubjectName + "|" + message.Message_Type);


            DynamicValue data = DynamicValue.Parse(message.Data);
            DynamicValue variables = context.GetValue(GlobalVariables);

            //write message data to GlobalVariables
            foreach (string i in data.Keys)
            {
                DynamicValue value = new DynamicValue();
                data.TryGetValue(i, out value);
                if (variables.ContainsKey(i))
                {
                    variables.Remove(i);
                }
                variables.Add(i, value);
            }
            context.SetValue(GlobalVariables, variables);

            //mark message in message-store as received
            messageStore.markMessageAsReceived(message.Id);      
        }
开发者ID:InFlowBPM,项目名称:InFlow-BPMS,代码行数:33,代码来源:GetMessage.cs

示例2: ReadAppConfig

        /// <summary>
        /// 读取配置文件中以上配置节的值
        /// </summary>
        private void ReadAppConfig(CodeActivityContext context)
        {
            //为三个输出变量赋值
            context.SetValue(SleepTime, int.Parse(ConfigHelper.GetSettingValue("sleepTime")));
            var key = ConfigHelper.GetSettingValue("list_id");
            context.SetValue(Id_list, key);
            context.SetValue(Seconds_Interval, double.Parse(ConfigHelper.GetSettingValue("seconds_add")));

            //context.SetValue<string>(temp, "123");
        }
开发者ID:evaseemefly,项目名称:PMS,代码行数:13,代码来源:ReadAppConfig_Code.cs

示例3: Execute

        // 如果活动返回值,则从 CodeActivity<TResult>
        // 并从 Execute 方法返回该值。
        //qu
        protected override void Execute(CodeActivityContext context)
        {
            // 获取 Text 输入参数的运行时值
            string text = context.GetValue(this.Text);
            var state = context.GetValue(this.Match_Enum);
            List<SMSModel_QueryReceive> list = context.GetValue(List_QueryReceive);
            SMSModel_QueryReceive item = context.GetValue(Item);
               // int state = -1;
            //将拥有符合条件的msgid的item存入list
            InsertListModel(item, ref list, ref state);

            context.SetValue(Match_Enum, state);
            context.SetValue(List_QueryReceive, list);
        }
开发者ID:evaseemefly,项目名称:PMS,代码行数:17,代码来源:InsertReciveModel2List_Code.cs

示例4: Execute

        // If your activity returns a value, derive from CodeActivity<TResult>
        // and return the value from the Execute method.
        protected override void Execute(CodeActivityContext context)
        {
            // Obtain the runtime value of the Text input argument
            string text = context.GetValue(Text);

            context.SetValue(Output, $"{text} workflow");
        }
开发者ID:riezebosch,项目名称:wfdev,代码行数:9,代码来源:CodeActivity1.cs

示例5: Execute

 // If your activity returns a value, derive from CodeActivity<TResult>
 // and return the value from the Execute method.
 protected override void Execute(CodeActivityContext context)
 {
     // Obtain the runtime value of the Text input argument
     string text = context.GetValue(this.Text);
     context.SetValue(UserClickedButton, System.Windows.MessageBox.Show(
         text, "FIB->FIS Handover", System.Windows.MessageBoxButton.YesNo));
 }
开发者ID:blel,项目名称:WpfWithWf,代码行数:9,代码来源:InputBoxActivity.cs

示例6: Execute

 protected override void Execute(CodeActivityContext context)
 {
     CoreFunctions core = new CoreFunctions(context.GetValue(cfgWFMBaseAddress), context.GetValue(cfgWFMUsername), context.GetValue(cfgWFMPassword), context.GetValue(cfgSQLConnectionString));
     
     string id = core.startNewSubjectProcess(context.GetValue(ProcessInstanceId),   context.GetValue(ProcessSubjectId), context.GetValue(Owner));
     context.SetValue(NewProcessId, id);
 }
开发者ID:InFlowBPM,项目名称:InFlow-BPMS,代码行数:7,代码来源:StartWorkflowInstance.cs

示例7: Execute

        protected override void Execute(CodeActivityContext context)
        {
            var isValid = new bool?();

            var loan = context.GetValue(this.Loan);

            if (!(loan.CreditRating > 0))
            {
                isValid = false;
            }

            if (!(loan.DownPaymentAmount > 0))
            {
                isValid = false;
            }

            if (!(loan.LoanAmount > 0))
            {
                isValid = false;
            }

            //If we didn't get set to false then we're valid.
            if(!isValid.HasValue)
            {
                isValid = true;
            }

            context.SetValue(Valid, isValid);

        }
开发者ID:helmsb,项目名称:WorkflowWebApiExample,代码行数:30,代码来源:ValidateLoanIsComplete.cs

示例8: Execute

        // If your activity returns a value, derive from CodeActivity<TResult>
        // and return the value from the Execute method.
        protected override void Execute(CodeActivityContext context)
        {
            // Obtain the runtime value of the Text input argument
            ItemInfo i = new ItemInfo();
            i.ItemCode = context.GetValue<string>(this.ItemCode);

            switch (i.ItemCode)
            {
              case "12345":
                i.Description = "Widget";
                i.Price = (decimal)10.0;
                break;

                case "12346":
                i.Description = "Gadget";
                i.Price = (decimal)15.0;
                break;

                case "12347":
                i.Description = "Super Gadget";
                i.Price = (decimal)25.0;
                break;

                   
            }

            context.SetValue(this.Item, i);

        }
开发者ID:yinqunjun,项目名称:WorkflowFoundation.40.45.Development,代码行数:31,代码来源:lookupItems.cs

示例9: Execute

 // 如果活动返回值,则从 CodeActivity<TResult>
 // 派生并从 Execute 方法返回该值。
 protected override void Execute(CodeActivityContext context)
 {
     var sourceimage = 原图.Get(context);
     var sim = 相似度下限.Get(context);
     var width = 查找区域宽度.Get(context);
     var height = 查找区域高度.Get(context);
     var etm = new ExhaustiveTemplateMatching(sim==null?0.9f:sim.Value);
     var match = etm.ProcessImage(sourceimage, context.GetValue(匹配图), new Rectangle(查找区域左偏移量.Get(context), 查找区域上偏移量.Get(context), width == null ? sourceimage.Width : width.Value, height == null ? sourceimage.Height : height.Value));
     context.SetValue(匹配项, match);
     if (match != null && match.Length > 0)
     {
         var bestmatch = match.OrderByDescending(q => q.Similarity).First();
         context.SetValue(最佳匹配项, bestmatch);
         var bestmatchpos = bestmatch.Rectangle.Location;
         context.SetValue(最佳匹配项坐标位置, bestmatchpos);
     }
 }
开发者ID:manasheep,项目名称:Core3,代码行数:19,代码来源:从图像中查找匹配图像.cs

示例10: Execute

        protected override void Execute(CodeActivityContext context)
        {
            // Obtain the runtime value of the Text input argument
            Expense expense = context.GetValue(this.Expense);
            ExpenseReview review = context.GetValue(this.ExpenseReview);

            ExpenseComponent bc = new ExpenseComponent();

            if (review.IsApproved)
            {
                context.SetValue(this.Expense, bc.Disburse(expense, review));
            }
            else
            {
                context.SetValue(this.Expense, bc.Reject(expense, review));
            }
        }
开发者ID:netusers2014,项目名称:ExpenseSample,代码行数:17,代码来源:DisburseExpense.cs

示例11: Execute

        protected override void Execute(CodeActivityContext context)
        {
            var provider = ServiceLocator.Current.GetInstance<IFlowExtensionProvider>();

            var output = provider.NeedConfirmation();

            context.SetValue(IsSkip, !output);
        }
开发者ID:kanewanggit,项目名称:MbTcsClone,代码行数:8,代码来源:NeedConfirmation.cs

示例12: Execute

        // If your activity returns a value, derive from CodeActivity<TResult>
        // and return the value from the Execute method.
        protected override void Execute(CodeActivityContext context)
        {
            var wfcontext = context.GetValue(this.WFContext);
            wfcontext.ViewName = "CreditCard";

            wfcontext.ViewData.Model = new CreditCardInfo();
            context.SetValue(WFContext, wfcontext);
        }
开发者ID:jayasankaram1,项目名称:mvc4workflowCheckoutDemo,代码行数:10,代码来源:CreditCardActivity.cs

示例13: Execute

        protected override void Execute(CodeActivityContext context)
        {
            // Obtain the runtime value of the Text input argument
            Expense expense = context.GetValue(this.Expense);

            //expense.WorkflowID = Guid.NewGuid();
            ExpenseComponent bc = new ExpenseComponent();
            context.SetValue(this.Expense, bc.Submit(expense));
        }
开发者ID:netusers2014,项目名称:ExpenseSample,代码行数:9,代码来源:SubmitExpense.cs

示例14: Execute

        // If your activity returns a value, derive from CodeActivity<TResult>
        // and return the value from the Execute method.
        protected override void Execute(CodeActivityContext context)
        {

            var wfcontext = context.GetValue(this.WFContext);
            wfcontext.ViewName = "BillingAddress";
            
            wfcontext.ViewData.Model = new Order();
            context.SetValue(WFContext, wfcontext);
        }
开发者ID:jayasankaram1,项目名称:mvc4workflowCheckoutDemo,代码行数:11,代码来源:BillingAddressActivity.cs

示例15: Execute

        protected override void Execute(CodeActivityContext context)
        {
            // Obtain the runtime value of the Text input argument
            Expense expense = context.GetValue(this.Expense);

            //expense.WorkflowID = this.WorkflowInstanceId;
            ExpenseComponent bc = new ExpenseComponent();
            context.SetValue(this.Expense, bc.Escalate(expense));
        }
开发者ID:netusers2014,项目名称:ExpenseSample,代码行数:9,代码来源:EscalateExpense.cs


注:本文中的CodeActivityContext.SetValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。