@Override public void notify(DelegateExecution execution) throws Exception { Integer counter = INVOCATIONS.get(execution.getEventName()); if (counter == null) { counter = 0; } INVOCATIONS.put(execution.getEventName(), ++counter); }
public void notify(DelegateExecution execution) throws Exception { PvmExecutionImpl executionImpl = (PvmExecutionImpl) execution; LOG.debug("collecting event: "+execution.getEventName()+" on "+executionImpl.getEventSource()); events.add(execution.getEventName()+" on "+executionImpl.getEventSource()); }
public void notify(DelegateExecution execution) throws Exception { String counterKey = execution.getCurrentActivityId() + "-" +execution.getEventName(); collectedEvents.add(counterKey); }
protected BusinessProcessEvent createEvent(DelegateExecution execution) { ProcessDefinition processDefinition = Context.getExecutionContext().getProcessDefinition(); // map type String eventName = execution.getEventName(); BusinessProcessEventType type = null; if(ExecutionListener.EVENTNAME_START.equals(eventName)) { type = BusinessProcessEventType.START_ACTIVITY; } else if(ExecutionListener.EVENTNAME_END.equals(eventName)) { type = BusinessProcessEventType.END_ACTIVITY; } else if(ExecutionListener.EVENTNAME_TAKE.equals(eventName)) { type = BusinessProcessEventType.TAKE; } return new CdiBusinessProcessEvent(execution.getCurrentActivityId(), execution.getCurrentTransitionId(), processDefinition, execution, type, ClockUtil.getCurrentTime()); }
public void notify(DelegateExecution execution) throws Exception { execution.setVariable("variableSetInExecutionListener", "secondValue"); execution.setVariable("eventNameReceived", execution.getEventName()); } }
public void notify(DelegateExecution execution) throws Exception { String variableName = (String) varName.getValue(execution); execution.setVariable(variableName, "Event: " + execution.getEventName()); }
@Override public void notify(DelegateExecution execution) throws Exception { if (!execution.hasVariableLocal(variableName)) { return; } Object value = execution.getVariableLocal(variableName); VariableEvent event = new VariableEvent(); event.variableName = variableName; event.variableValue = value; event.eventName = execution.getEventName(); event.activityInstanceId = execution.getActivityInstanceId(); variableEvents.add(event); }
public void notify(DelegateExecution execution) throws Exception { execution.setVariable("variableSetInExecutionListener", "firstValue"); execution.setVariable("eventNameReceived", execution.getEventName()); execution.setVariable("businessKeyInExecution", execution.getProcessBusinessKey()); } }
/** * Implementation of the event dispatching. * @param delegateExecution process execution */ public final void notify(final DelegateExecution delegateExecution) throws Exception { Guards.dispatch(this, delegateExecution.getEventName(), delegateExecution); } }
public void notify(DelegateExecution execution) throws Exception { ExecutionEntity executionCasted = ((ExecutionEntity)execution); String parameterValue = null; if (parameter != null) { parameterValue = (String)parameter.getValue(execution); } String activityName = null; if (executionCasted.getActivity() != null) { activityName = executionCasted.getActivity().getProperties().get(new PropertyKey<String>("name")); } recordedEvents.add( new RecordedEvent( executionCasted.getActivityId(), activityName, execution.getEventName(), parameterValue, execution.getActivityInstanceId(), execution.getCurrentTransitionId(), execution.isCanceled(), execution.getId())); }
@Override public void notify(DelegateExecution execution) throws Exception { Integer counter = INVOCATIONS.get(execution.getEventName()); if (counter == null) { counter = 0; } INVOCATIONS.put(execution.getEventName(), ++counter); }
@Override public void notify(DelegateExecution execution) throws Exception { final CoveredFlowNode coveredFlowNode = createCoveredFlowNode(execution); final String eventName = execution.getEventName(); if (eventName.equals(ExecutionListener.EVENTNAME_START)) { coverageTestRunState.addCoveredElement(coveredFlowNode); } else if (eventName.equals(ExecutionListener.EVENTNAME_END)) { coverageTestRunState.endCoveredElement(coveredFlowNode); } }
public static DelegateEvent fromExecution(DelegateExecution delegateExecution) { DelegateEvent event = new DelegateEvent(); event.activityInstanceId = delegateExecution.getActivityInstanceId(); event.businessKey = delegateExecution.getBusinessKey(); event.currentActivityId = delegateExecution.getCurrentActivityId(); event.currentActivityName = delegateExecution.getCurrentActivityName(); event.currentTransitionId = delegateExecution.getCurrentTransitionId(); event.eventName = delegateExecution.getEventName(); event.id = delegateExecution.getId(); event.parentActivityInstanceId = delegateExecution.getParentActivityInstanceId(); event.parentId = delegateExecution.getParentId(); event.processBusinessKey = delegateExecution.getProcessBusinessKey(); event.processDefinitionId = delegateExecution.getProcessDefinitionId(); event.processInstanceId = delegateExecution.getProcessInstanceId(); event.tenantId = delegateExecution.getTenantId(); event.variableScopeKey = delegateExecution.getVariableScopeKey(); return event; }
public void notify(DelegateExecution execution) throws Exception { PvmExecutionImpl executionImpl = (PvmExecutionImpl) execution; LOG.debug("collecting event: "+execution.getEventName()+" on "+executionImpl.getEventSource()); events.add(execution.getEventName()+" on "+executionImpl.getEventSource()); }
public void notify(DelegateExecution execution) throws Exception { String counterKey = execution.getCurrentActivityId() + "-" +execution.getEventName(); collectedEvents.add(counterKey); }
public void notify(DelegateExecution execution) throws Exception { execution.setVariable("variableSetInExecutionListener", "secondValue"); execution.setVariable("eventNameReceived", execution.getEventName()); } }
public void notify(DelegateExecution execution) throws Exception { String variableName = (String) varName.getValue(execution); execution.setVariable(variableName, "Event: " + execution.getEventName()); }
public static SelectorBuilder selector(final DelegateExecution delegateExecution) { String typeName = extractTypeName(delegateExecution); String element = ("sequenceFlow".equals(typeName)) ? delegateExecution.getCurrentTransitionId() : delegateExecution.getCurrentActivityId(); return selector() .context(Context.bpmn) .type(typeName) .process(GetProcessDefinitionKey.from(delegateExecution)) .element(element) .event(delegateExecution.getEventName()); }
@Override public void notify(DelegateExecution execution) throws Exception { if (!execution.hasVariableLocal(variableName)) { return; } Object value = execution.getVariableLocal(variableName); VariableEvent event = new VariableEvent(); event.variableName = variableName; event.variableValue = value; event.eventName = execution.getEventName(); event.activityInstanceId = execution.getActivityInstanceId(); variableEvents.add(event); }
public void notify(DelegateExecution execution) throws Exception { execution.setVariable("variableSetInExecutionListener", "firstValue"); execution.setVariable("eventNameReceived", execution.getEventName()); execution.setVariable("businessKeyInExecution", execution.getProcessBusinessKey()); } }