Java Code Examples for org.camunda.bpm.engine.delegate.DelegateCaseExecution#setVariable()
The following examples show how to use
org.camunda.bpm.engine.delegate.DelegateCaseExecution#setVariable() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MyCaseExecutionListener.java From camunda-bpm-platform with Apache License 2.0 | 6 votes |
public void notify(DelegateCaseExecution caseExecution, String event) { String eventCounterName = event + "EventCounter"; Integer eventCounter = (Integer) caseExecution.getVariable(eventCounterName); if (eventCounter == null) { eventCounter = 0; } Integer counter = (Integer) caseExecution.getVariable("eventCounter"); if (counter == null) { counter = 0; } caseExecution.setVariable(event, true); caseExecution.setVariable(eventCounterName, eventCounter + 1); caseExecution.setVariable("eventCounter", counter + 1); caseExecution.setVariable(event+"OnCaseExecutionId", caseExecution.getId()); }
Example 2
Source File: FieldInjectionCaseExecutionListener.java From camunda-bpm-platform with Apache License 2.0 | 5 votes |
public void notify(DelegateCaseExecution caseExecution) { caseExecution.setVariable("greeting", "Hello from " + greeter.getValue(caseExecution)); caseExecution.setVariable("helloWorld", helloWorld.getValue(caseExecution)); caseExecution.setVariable("prefix", prefix.getValue(caseExecution)); caseExecution.setVariable("suffix", suffix.getValue(caseExecution)); // kind of workaround to pass through the test greeter = null; helloWorld = null; prefix = null; suffix = null; }
Example 3
Source File: SetVariableListener.java From camunda-bpm-platform with Apache License 2.0 | 4 votes |
@Override public void notify(DelegateCaseExecution caseExecution) throws Exception { caseExecution.setVariable("var", "test"); }
Example 4
Source File: MilestoneListener.java From camunda-bpm-platform with Apache License 2.0 | 4 votes |
public void notify(DelegateCaseExecution caseExecution) throws Exception { String eventName = caseExecution.getEventName(); caseExecution.setVariable(eventName, true); }
Example 5
Source File: CheckBusinessKeyCaseExecutionListener.java From camunda-bpm-platform with Apache License 2.0 | 4 votes |
@Override public void notify(DelegateCaseExecution caseExecution) throws Exception { caseExecution.setVariable("businessKey", caseExecution.getBusinessKey()); caseExecution.setVariable("caseBusinessKey", caseExecution.getCaseBusinessKey()); }
Example 6
Source File: SentryTriggerListener.java From camunda-bpm-platform with Apache License 2.0 | 4 votes |
public void notify(DelegateCaseExecution caseExecution) throws Exception { String eventName = caseExecution.getEventName(); caseExecution.setVariable(eventName, true); }
Example 7
Source File: ExampleCaseExecutionListener.java From camunda-bpm-platform with Apache License 2.0 | 4 votes |
public void notify(DelegateCaseExecution caseExecution) throws Exception { caseExecution.setVariable("listener", "listener-notified"); }