@Test
public void testExclusiveGatewayProcessSimulation() {
PathFinder finder = PathFinderFactory.getInstance(this.getClass().getResourceAsStream("/BPMN2-ExclusiveSplit.bpmn2"));
List<SimulationPath> paths = finder.findPaths(new SimulationFilterPathFormatConverter());
JBPMBAMSimulationDataProvider provider = new JBPMBAMSimulationDataProvider("jdbc/jbpm-ds", "com.sample.test");
SimulationContext context = SimulationContextFactory.newContext(provider);
context.setStartTime(System.currentTimeMillis());
for (SimulationPath path : paths) {
context.setCurrentPath(path);
StatefulKnowledgeSession session = TestUtils.createSession("BPMN2-ExclusiveSplit.bpmn2");
session.startProcess("com.sample.test");
double probability = provider.calculatePathProbability(path);
System.out.println("Path probability is " + probability);
System.out.println("#####################################");
}
}