use of org.jbpm.process.core.event.EventTransformer in project jbpm by kiegroup.
the class StartNodeInstance method signalEvent.
public void signalEvent(String type, Object event) {
String variableName = (String) getStartNode().getMetaData("TriggerMapping");
if (variableName != null) {
VariableScopeInstance variableScopeInstance = (VariableScopeInstance) resolveContextInstance(VariableScope.VARIABLE_SCOPE, variableName);
if (variableScopeInstance == null) {
throw new IllegalArgumentException("Could not find variable for start node: " + variableName);
}
EventTransformer transformer = getStartNode().getEventTransformer();
if (transformer != null) {
event = transformer.transformEvent(event);
}
variableScopeInstance.setVariable(variableName, event);
}
triggerCompleted();
}
use of org.jbpm.process.core.event.EventTransformer in project jbpm by kiegroup.
the class EventNodeInstance method signalEvent.
public void signalEvent(String type, Object event) {
String variableName = getEventNode().getVariableName();
if (variableName != null) {
VariableScopeInstance variableScopeInstance = (VariableScopeInstance) resolveContextInstance(VariableScope.VARIABLE_SCOPE, variableName);
if (variableScopeInstance == null) {
throw new IllegalArgumentException("Could not find variable for event node: " + variableName);
}
EventTransformer transformer = getEventNode().getEventTransformer();
if (transformer != null) {
event = transformer.transformEvent(event);
}
variableScopeInstance.setVariable(variableName, event);
}
triggerCompleted();
}
Aggregations