Package org.jbpm.simulation

Examples of org.jbpm.simulation.SimulationDataProvider


  private Map<String, List<Long>> allocatedRanges = new HashMap<String, List<Long>>();
  private RangeChain rangeChain = new RangeChain();

  public StaffPoolImpl(String processId, Node element, double simulationDuration) {
     
      SimulationDataProvider provider = SimulationContext.getContext().getDataProvider();
     
      properties = provider.getSimulationDataForNode(element);
     
      timeGenerator=TimeGeneratorFactory.newTimeGenerator(properties);
   
    this.elementTimeUnit = SimulationUtils.getTimeUnit(properties);
    this.poolSize = (int)SimulationUtils.asDouble(properties.get(SimulationConstants.STAFF_AVAILABILITY));
View Full Code Here


        Map<String, Object> metadata = eventNodeInstance.getNode().getMetaData();
       
        ProcessInstance pi = eventNodeInstance.getProcessInstance();
        Node node = eventNodeInstance.getNode();
        String bpmn2NodeId = (String) metadata.get("UniqueId");
        SimulationDataProvider provider = context.getDataProvider();
       
        TimeGenerator timeGenerator=TimeGeneratorFactory.newTimeGenerator(provider.getSimulationDataForNode(node));
        long duration = timeGenerator.generateTime();
       
        context.getClock().advanceTime(duration, TimeUnit.MILLISECONDS);
        // set end time for processinstance end time
        context.setMaxEndTime(context.getClock().getCurrentTime());

        String type = (String) provider.getProcessDataForNode(node).get("node.type");

        return new ActivitySimulationEvent(pi.getProcessId(), context.getProcessInstanceId(), node.getName(), bpmn2NodeId, duration,
                startTime, context.getClock().getCurrentTime(), type);
    }
View Full Code Here

        long endTime = startTime + duration;

        context.getClock().advanceTime(duration, TimeUnit.MILLISECONDS);
        // 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);
    }
View Full Code Here

        Map<String, Object> metadata = stateNode.getNode().getMetaData();
       
        ProcessInstance pi = stateNode.getProcessInstance();
        Node node = stateNode.getNode();
        String bpmn2NodeId = (String) metadata.get("UniqueId");
        SimulationDataProvider provider = context.getDataProvider();
        Map<String, Object> properties = provider.getSimulationDataForNode(node);
       
        TimeGenerator timeGenerator=TimeGeneratorFactory.newTimeGenerator(properties);
        long duration = timeGenerator.generateTime();
       
        context.getStaffPoolManager().registerPool(pi.getProcessId(), node, 1);
View Full Code Here

       Map<String, Object> metadata = stateNode.getNode().getMetaData();
      
       ProcessInstance pi = stateNode.getProcessInstance();
       Node node = stateNode.getNode();
       String bpmn2NodeId = (String) metadata.get("UniqueId");
       SimulationDataProvider provider = context.getDataProvider();
      
       TimeGenerator timeGenerator=TimeGeneratorFactory.newTimeGenerator(provider.getSimulationDataForNode(node));
       long duration = timeGenerator.generateTime();
      
       context.getClock().advanceTime(duration, TimeUnit.MILLISECONDS);
       // set end time for processinstance end time
       context.setMaxEndTime(context.getClock().getCurrentTime());

       String type = (String) provider.getProcessDataForNode(node).get("node.type");

       return new ActivitySimulationEvent(pi.getProcessId(), context.getProcessInstanceId(), node.getName(), bpmn2NodeId, duration,
               startTime, context.getClock().getCurrentTime(), type);
    }
View Full Code Here

  private Map<String, List<Long>> allocatedRanges = new HashMap<String, List<Long>>();
  private RangeChain rangeChain = new RangeChain();

  public StaffPoolImpl(String processId, Node element, double simulationDuration) {
     
      SimulationDataProvider provider = SimulationContext.getContext().getDataProvider();
     
      properties = provider.getSimulationDataForNode(element);
     
      timeGenerator=TimeGeneratorFactory.newTimeGenerator(properties);
   
    this.elementTimeUnit = SimulationUtils.getTimeUnit(properties);
    this.poolSize = (int)SimulationUtils.asDouble(properties.get(SimulationConstants.STAFF_AVAILABILITY));
View Full Code Here

  private Map<String, List<Long>> allocatedRanges = new HashMap<String, List<Long>>();
  private RangeChain rangeChain = new RangeChain();

  public StaffPoolImpl(String processId, Node element, double simulationDuration) {
     
      SimulationDataProvider provider = SimulationContext.getContext().getDataProvider();
     
      properties = provider.getSimulationDataForNode(element);
     
      timeGenerator=TimeGeneratorFactory.newTimeGenerator(properties);
   
    this.elementTimeUnit = SimulationUtils.getTimeUnit(properties);
    this.poolSize = (int)SimulationUtils.asDouble(properties.get(SimulationConstants.STAFF_AVAILABILITY));
View Full Code Here

TOP

Related Classes of org.jbpm.simulation.SimulationDataProvider

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.