brainslug.flow.execution.impl.StrictEventNode Maven / Gradle / Ivy
package brainslug.flow.execution.impl;
import brainslug.flow.execution.ExecutionContext;
import brainslug.flow.model.EventDefinition;
import brainslug.flow.model.FlowNodeDefinition;
import brainslug.flow.model.marker.EndEvent;
import brainslug.flow.model.marker.IntermediateEvent;
import brainslug.flow.model.marker.StartEvent;
import java.util.List;
public class StrictEventNode extends DefaultNodeExecutor {
@Override
public List execute(EventDefinition event, ExecutionContext execution) {
if (event.hasMixin(StartEvent.class) || event.hasMixin(EndEvent.class)) {
return super.execute(event, execution);
} else if (event.hasMixin(IntermediateEvent.class)) {
return executeIntermediateEvent(event, execution);
}
throw new IllegalArgumentException(String.format("dont know how to execute %s", event));
}
private List executeIntermediateEvent(EventDefinition event, ExecutionContext execution) {
// TODO: check for token here
throw new UnsupportedOperationException("execution of intermediate events not supported yet");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy