// set end time for processinstance end time
context.setMaxEndTime(context.getClock().getCurrentTime());
SimulationDataProvider provider = context.getDataProvider();
String type = (String) provider.getProcessDataForNode(node).get("node.type");
return new GatewaySimulationEvent(pi.getProcessId(), context.getProcessInstanceId(), startTime, endTime, bpmn2NodeId, node.getName(), type);
}