//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void execute(org.Camunda.bpm.Engine.Delegate.IDelegateExecution execution) throws Exception public virtual void Execute(IBaseDelegateExecution execution) { // first set variable to some string execution.SetVariable("VariableName", "test"); // now set to serializable execution.SetVariable("VariableName", new SerializableVariable("foo")); }
public void Execute(IBaseDelegateExecution execution) { if (instanceCount < 3) { execution.SetVariable(AbstractConditionalEventTestCase.VariableName, 1); } else { execution.SetVariable(AbstractConditionalEventTestCase.VariableName, instanceCount); } }
public void Execute(IBaseDelegateExecution execution) { string VariableName = (string)counterName.GetValue(execution); object variable = execution.GetVariable(VariableName); if (variable == null) { execution.SetVariable(VariableName, (int?)1); } else { execution.SetVariable(VariableName, ((int?)variable) + 1); } }
public void Execute(IBaseDelegateExecution execution) { var v = new Variable(); execution.SetVariable("variable", v); v.value = "delegate1"; }
public void Execute(IBaseDelegateExecution execution) { string value1 = (string)Text1.GetValue(execution); execution.SetVariable("var1", string.Join("", value1.Reverse())); string value2 = (string)Text2.GetValue(execution); execution.SetVariable("var2", string.Join("", value2.Reverse())); if (Text3 != null) { string value3 = (string)Text3.GetValue(execution); execution.SetVariable("var3", value3); } }
public void Execute(IBaseDelegateExecution execution) { int? executionsBeforeError = (int?)execution.GetVariable("executionsBeforeError"); int? executions = (int?)execution.GetVariable("executions"); bool?exceptionType = (bool?)execution.GetVariable("exceptionType"); if (executions == null) { executions = 0; } executions++; if (executionsBeforeError == null || executionsBeforeError < executions) { if (exceptionType.HasValue && exceptionType.Value) { throw new MyBusinessException("This is a business exception, which can be caught by a BPMN Error Event."); } else { throw new BpmnError("23", "This is a business fault, which can be caught by a BPMN Error Event."); } } else { execution.SetVariable("executions", executions); } }
public void Execute(IBaseDelegateExecution execution) { string @var = (string)execution.GetVariable(VariableName); @var = @var.ToUpper(); execution.SetVariable(VariableName, @var); }
public void Execute(IBaseDelegateExecution execution) { if (!setterInvoked) { throw new System.Exception("Setter was not invoked"); } execution.SetVariable("setterVar", ((string)_text.GetValue(execution)).ToUpper()); }
public void Execute(IBaseDelegateExecution execution) { int?Count = (int?)execution.GetVariable("Count"); Count = Count + 1; Console.WriteLine("Count = " + Count); execution.SetVariable("Count", Count); }
public void Execute(IBaseDelegateExecution execution) { DateTime currentTime = (DateTime)execution.GetVariable("currentTime"); //currentTime = DateUtils.AddSeconds(currentTime, 1); currentTime = currentTime.AddSeconds(1); ClockUtil.CurrentTime = currentTime; execution.SetVariable("currentTime", currentTime); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void Execute(org.Camunda.bpm.Engine.Delegate.IDelegateExecution execution) throws Exception public virtual void Execute(IBaseDelegateExecution execution) { IList <string> list = (IList <string>)execution.GetVariable("listVar"); // replace the list by another object execution.SetVariable("listVar", new List <string>()); // implicitly update the previous list, should update the variable value list.Add(NEW_ELEMENT); }
public void Execute(IBaseDelegateExecution execution) { //given no conditional event exist //when variable is set execution.SetVariable("v", 1); //then no variable events should be delayed IList <DelayedVariableEvent> delayedEvents = ((ExecutionEntity)execution).DelayedEvents; Assert.AreEqual(0, delayedEvents.Count); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void Execute(org.Camunda.bpm.Engine.Delegate.IDelegateExecution execution) throws Exception public virtual void Execute(IBaseDelegateExecution execution) { IList <string> list = (IList <string>)execution.GetVariable("listVar"); // implicitly update the previous list, should update the variable value list.Add(NEW_ELEMENT); // replace the list by another object execution.SetVariable("listVar", new List <string>()); // note that this is the condensed form of more realistic scenarios like // an implicit update in task 1 and an explicit update in the following task 2, // both in the same transaction. }
public virtual void Execute(IBaseDelegateExecution execution) { string aVariable = "aVariable"; int? newValue = 1; object value = execution.GetVariable(aVariable); if (value != null) { newValue = (int?)value; newValue++; } execution.SetVariable(aVariable, newValue); }
public virtual void Execute(IBaseDelegateExecution execution) { var result = (int?)execution.GetVariable("result"); var item = (int?)execution.GetVariable("item"); if (item != null) { result = result * item; } else { result = result * 2; } execution.SetVariable("result", result); }
public virtual void Execute(IBaseDelegateExecution execution) { //string sdf = new string("dd/MM/yyyy hh:mm:ss SSS"); // We set the time to check of the updated time is picked up in the history var updatedDate = DateTime.Parse("01/01/2001 01:23:46 000"); ClockUtil.CurrentTime = updatedDate; execution.SetVariable("aVariable", "updated value"); execution.SetVariable("bVariable", 123); execution.SetVariable("cVariable", 12345L); execution.SetVariable("dVariable", 1234.567); execution.SetVariable("eVariable", (short)12); var theDate = DateTime.Parse("01/01/2001 01:23:45 678"); execution.SetVariable("fVariable", theDate); //execution.SetVariable("gVariable", new SerializableVariable("hello hello")); execution.SetVariable("hVariable", ";-)".GetBytes()); }
public void Execute(IBaseDelegateExecution execution) { var result = _expression.GetValue(execution); execution.SetVariable("result", result); }
public void Execute(IBaseDelegateExecution execution) { execution.SetVariable("var", ((string)Text.GetValue(execution)).ToUpper()); }
public void Execute(IBaseDelegateExecution execution) { execution.SetVariable(AbstractConditionalEventTestCase.VariableName, 1); }
public void Execute(IBaseDelegateExecution execution) { execution.SetVariable("businessKeySetOnExecution", execution.BusinessKey); //IProcessBusinessKey }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: @Override public void Execute(org.Camunda.bpm.Engine.Delegate.IDelegateExecution execution) throws Exception public void Execute(IBaseDelegateExecution execution) { execution.SetVariable("testVar", "testValue"); }
public virtual void Execute(IBaseDelegateExecution execution) { execution.SetVariable("zzz", 123456789L); }
public void Execute(IBaseDelegateExecution execution) { execution.SetVariable("message", true); }
public void Execute(IBaseDelegateExecution execution) { execution.SetVariable("targetOrderId", execution.GetVariableLocal("targetOrderId")); //,"SubProcess_1"); }