use of desmoj.core.simulator.ExternalEventStop in project scylla by bptlab.
the class SimulationUtils method abort.
/**
* Aborts the simulation of the given process instance.
*
* @param model
* the simulation model
* @param processModel
* the process model
* @param processInstanceId
* the identifier of the process instance
* @param nodeId
* identifier of node at which the simulation is aborted (for logging purposes)
* @param showInTrace
* true if DesmoJ trace logging is enabled
*/
public static void abort(Model model, ProcessInstance processInstance, int nodeId, boolean showInTrace) {
ProcessModel processModel = processInstance.getProcessModel();
int processInstanceId = processInstance.getId();
String name = ScyllaEvent.buildEventName(processModel, processInstanceId, nodeId);
name += "_Exception";
ExternalEventStop abortEvent = new ExternalEventStop(model, name, showInTrace);
abortEvent.schedule();
}
Aggregations