//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void execute(org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution execution) throws Exception public virtual void execute(ActivityExecution execution) { PvmTransition more = execution.Activity.findOutgoingTransition("more"); PvmTransition done = execution.Activity.findOutgoingTransition("done"); int?value = (int?)execution.getVariable(variableName); if (value == null) { execution.setVariable(variableName, from); execution.leaveActivityViaTransition(more); } else { value = value + 1; if (value.Value < to) { execution.setVariable(variableName, value); execution.leaveActivityViaTransition(more); } else { execution.leaveActivityViaTransition(done); } } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void execute(org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution execution) throws Exception public virtual void execute(ActivityExecution 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); } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void execute(org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution execution) throws Exception public virtual void execute(ActivityExecution execution) { PvmTransition transition = null; string creditRating = (string)execution.getVariable("creditRating"); if (creditRating.Equals("AAA+")) { transition = execution.Activity.findOutgoingTransition("wow"); } else if (creditRating.Equals("Aaa-")) { transition = execution.Activity.findOutgoingTransition("nice"); } else { transition = execution.Activity.findOutgoingTransition("default"); } execution.leaveActivityViaTransition(transition); }