Package org.jbpm.simulation.impl

Examples of org.jbpm.simulation.impl.BPMN2SimulationDataProvider


        PathFinder finder = PathFinderFactory.getInstance(this.getClass().getResourceAsStream("/BPMN-SimpleExclusiveGatewayProcess.bpmn2"));
       
        List<SimulationPath> paths = finder.findPaths(new SimulationFilterPathFormatConverter());
        assertEquals(2, paths.size());
       
        SimulationContext context = SimulationContextFactory.newContext(new BPMN2SimulationDataProvider(this.getClass().getResourceAsStream("/BPMN-SimpleExclusiveGatewayProcess.bpmn2")));
       
        ReleaseId releaseId = TestUtils.createKJarWithMultipleResources("TestKbase",
                new String[]{"BPMN-SimpleExclusiveGatewayProcess.bpmn2"}, new ResourceType[]{ResourceType.BPMN2});
       
        SimulationDataProvider provider = context.getDataProvider();
View Full Code Here


        return runSimulation(processId, bpmn2Container, numberOfAllInstances, interval, runRules, resources);
    }
   
    public static SimulationRepository runSimulation(String processId, String bpmn2Container, int numberOfAllInstances, long interval, boolean runRules, Resource... rules) {
       
        SimulationContext context = SimulationContextFactory.newContext(new BPMN2SimulationDataProvider(bpmn2Container), new WorkingMemorySimulationRepository(runRules, rules));
        SimulationDataProvider provider = context.getDataProvider();
       
        PathFinder finder = PathFinderFactory.getInstance(bpmn2Container);
       
        List<SimulationPath> paths = finder.findPaths(new SimulationFilterPathFormatConverter(provider));
View Full Code Here

        return runSimulation(processId, bpmn2Container, numberOfAllInstances, interval, runRules, resources);
    }
   
    public static SimulationRepository runSimulation(String processId, String bpmn2Container, int numberOfAllInstances, long interval, boolean runRules, Resource... rules) {
       
        SimulationContext context = SimulationContextFactory.newContext(new BPMN2SimulationDataProvider(bpmn2Container), new WorkingMemorySimulationRepository(runRules, rules));
        SimulationDataProvider provider = context.getDataProvider();
       
        PathFinder finder = PathFinderFactory.getInstance(bpmn2Container);
       
        List<SimulationPath> paths = finder.findPaths(new SimulationFilterPathFormatConverter(provider));
View Full Code Here

        return runSimulation(processId, bpmn2Container, numberOfAllInstances, interval, runRules, resources);
    }
   
    public static SimulationRepository runSimulation(String processId, String bpmn2Container, int numberOfAllInstances, long interval, boolean runRules, Resource... rules) {
       
        SimulationContext context = SimulationContextFactory.newContext(new BPMN2SimulationDataProvider(bpmn2Container), new WorkingMemorySimulationRepository(runRules, rules));
        SimulationDataProvider provider = context.getDataProvider();
       
        PathFinder finder = PathFinderFactory.getInstance(bpmn2Container);
       
        List<SimulationPath> paths = finder.findPaths(new SimulationFilterPathFormatConverter(provider));
View Full Code Here

        return runSimulation(processId, bpmn2Container, numberOfAllInstances, interval, runRules, resources);
    }
   
    public static SimulationRepository runSimulation(String processId, String bpmn2Container, int numberOfAllInstances, long interval, boolean runRules, Resource... rules) {
       
        SimulationContext context = SimulationContextFactory.newContext(new BPMN2SimulationDataProvider(bpmn2Container), new WorkingMemorySimulationRepository(runRules, rules));
        SimulationDataProvider provider = context.getDataProvider();
       
        PathFinder finder = PathFinderFactory.getInstance(bpmn2Container);
       
        List<SimulationPath> paths = finder.findPaths(new SimulationFilterPathFormatConverter(provider));
View Full Code Here

        PathFinder finder = PathFinderFactory.getInstance(this.getClass().getResourceAsStream("/BPMN-SimpleExclusiveGatewayProcess.bpmn2"));
       
        List<SimulationPath> paths = finder.findPaths(new SimulationFilterPathFormatConverter());
        assertEquals(2, paths.size());
       
        SimulationContext context = SimulationContextFactory.newContext(new BPMN2SimulationDataProvider(this.getClass().getResourceAsStream("/BPMN-SimpleExclusiveGatewayProcess.bpmn2")));
       
        ReleaseId releaseId = TestUtils.createKJarWithMultipleResources("TestKbase",
                new String[]{"BPMN-SimpleExclusiveGatewayProcess.bpmn2"}, new ResourceType[]{ResourceType.BPMN2});
       
        SimulationDataProvider provider = context.getDataProvider();
View Full Code Here

public class BPMN2SimulationDataProviderTest {

    @Test
    public void testReadAllSimulationProperties() {
        SimulationDataProvider provider = new BPMN2SimulationDataProvider(this.getClass().getResourceAsStream("/BPMN2-UserTaskWithSimulationMetaData.bpmn2"));
       
        Map<String, Object> data = provider.getSimulationDataForNode(new Node() {
           
            public List<Connection> getOutgoingConnections(String type) {
                return null;
            }
           
View Full Code Here

        assertTrue(data.containsKey(SimulationConstants.WORKING_HOURS));
    }
   
    @Test
    public void testReadProbabilitySimulationProperties() {
        SimulationDataProvider provider = new BPMN2SimulationDataProvider(this.getClass().getResourceAsStream("/BPMN2-ExclusiveSplitWithSimulationProps.bpmn2"));
       
        Map<String, Object> data = provider.getSimulationDataForNode(new Node() {
           
            public List<Connection> getOutgoingConnections(String type) {
                return null;
            }
           
View Full Code Here

        List<SimulationPath> paths = finder.findPaths(new SimulationFilterPathFormatConverter());
       
        assertNotNull(paths);
        assertEquals(2, paths.size());

        BPMN2SimulationDataProvider provider = new BPMN2SimulationDataProvider(this.getClass().getResourceAsStream("/BPMN2-ExclusiveSplitWithSimulationProps.bpmn2"));
       
        double probabilityOfPathOne = provider.calculatePathProbability(paths.get(0));
        double probabilityOfPathTwo = provider.calculatePathProbability(paths.get(1));
       
        assertTrue(0.7 == probabilityOfPathOne);
        assertTrue(0.3 == probabilityOfPathTwo);
        System.out.println("Probability 1: " + probabilityOfPathOne + " probabilit 2: " + probabilityOfPathTwo);
    }
View Full Code Here

        PathFinder finder = PathFinderFactory.getInstance(this.getClass().getResourceAsStream("/BPMN-SimpleExclusiveGatewayProcess.bpmn2"));
       
        List<SimulationPath> paths = finder.findPaths(new SimulationFilterPathFormatConverter());
        assertEquals(2, paths.size());
       
        SimulationContext context = SimulationContextFactory.newContext(new BPMN2SimulationDataProvider(this.getClass().getResourceAsStream("/BPMN-SimpleExclusiveGatewayProcess.bpmn2")));
       
        ReleaseId releaseId = TestUtils.createKJarWithMultipleResources("TestKbase",
                new String[]{"BPMN-SimpleExclusiveGatewayProcess.bpmn2"}, new ResourceType[]{ResourceType.BPMN2});
       
        SimulationDataProvider provider = context.getDataProvider();
View Full Code Here

TOP

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

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.