Package org.jbpm.simulation.impl

Examples of org.jbpm.simulation.impl.JBPMBAMSimulationDataProvider


        System.clearProperty("java.naming.factory.initial");
    }
   
    @Test
    public void testLoadData() {
        SimulationDataProvider provider = new JBPMBAMSimulationDataProvider("jdbc/jbpm-ds", "com.sample.test");
        Node node = new NodeImpl() {

            @Override
            public long getId() {
                return 4;
            }
           
        };
        Map<String, Object> data = provider.getSimulationDataForNode(node);
        assertNotNull(data);
    }
View Full Code Here


    @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("#####################################");
        }
    }
View Full Code Here

TOP

Related Classes of org.jbpm.simulation.impl.JBPMBAMSimulationDataProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.