Package org.activiti.bpmn.model

Examples of org.activiti.bpmn.model.SubProcess


   
    flowElement = model.getMainProcess().getFlowElement("subprocess");
    assertNotNull(flowElement);
    assertTrue(flowElement instanceof SubProcess);
    assertEquals("subprocess", flowElement.getId());
    SubProcess subProcess = (SubProcess) flowElement;
   
    flowElement = subProcess.getFlowElement("receiveTask");
    assertNotNull(flowElement);
    assertTrue(flowElement instanceof ReceiveTask);
    assertEquals("receiveTask", flowElement.getId());
  }
View Full Code Here


   
    flowElement = model.getMainProcess().getFlowElement("subprocess1");
    assertNotNull(flowElement);
    assertTrue(flowElement instanceof SubProcess);
    assertEquals("subprocess1", flowElement.getId());
    SubProcess subProcess = (SubProcess) flowElement;
    assertEquals(11, subProcess.getFlowElements().size());

    // verify subprocess data objects
    dataObjects = ((SubProcess)flowElement).getDataObjects();
    assertEquals(6, dataObjects.size());
    for (ValuedDataObject dObj : dataObjects) {
View Full Code Here

   
    flowElement = model.getMainProcess().getFlowElement("subprocess1");
    assertNotNull(flowElement);
    assertTrue(flowElement instanceof SubProcess);
    assertEquals("subprocess1", flowElement.getId());
    SubProcess subProcess = (SubProcess) flowElement;
    assertTrue(subProcess.getFlowElements().size() == 5);
   
    flowElement = model.getMainProcess().getFlowElement("boundaryEvent1");
    assertNotNull(flowElement);
    assertTrue(flowElement instanceof BoundaryEvent);
    assertEquals("boundaryEvent1", flowElement.getId());
View Full Code Here

  private void validateModel(BpmnModel model) {
    FlowElement flowElement = model.getMainProcess().getFlowElement("outerSubProcess");
    assertNotNull(flowElement);
    assertTrue(flowElement instanceof SubProcess);
    assertEquals("outerSubProcess", flowElement.getId());
    SubProcess outerSubProcess = (SubProcess) flowElement;
    List<BoundaryEvent> eventList = outerSubProcess.getBoundaryEvents();
    assertEquals(1, eventList.size());
    BoundaryEvent boundaryEvent = eventList.get(0);
    assertEquals("outerBoundaryEvent", boundaryEvent.getId());
   
    FlowElement subElement = outerSubProcess.getFlowElement("innerSubProcess");
    assertNotNull(subElement);
    assertTrue(subElement instanceof SubProcess);
    assertEquals("innerSubProcess", subElement.getId());
    SubProcess innerSubProcess = (SubProcess) subElement;
    eventList = innerSubProcess.getBoundaryEvents();
    assertEquals(1, eventList.size());
    boundaryEvent = eventList.get(0);
    assertEquals("innerBoundaryEvent", boundaryEvent.getId());
   
    FlowElement taskElement = innerSubProcess.getFlowElement("usertask");
    assertNotNull(taskElement);
    assertTrue(taskElement instanceof UserTask);
    UserTask userTask = (UserTask) taskElement;
    assertEquals("usertask", userTask.getId());
    eventList = userTask.getBoundaryEvents();
View Full Code Here

 
  private void validateModel(BpmnModel model) {
  FlowElement flowElement = model.getMainProcess().getFlowElement("subprocess1");
  assertNotNull(flowElement);
  assertTrue(flowElement instanceof SubProcess);
  SubProcess subProcess = (SubProcess) flowElement;
  ParallelGateway gateway = (ParallelGateway) subProcess.getFlowElement("sid-A0E0B174-36DF-4C4F-A952-311CC3C031FC");
  assertNotNull(gateway);
  List<SequenceFlow> sequenceFlows = gateway.getOutgoingFlows();
  assertTrue(sequenceFlows.size() == 2);
  assertTrue(sequenceFlows.get(0).getId().equals("sid-9C669980-C274-4A48-BF7F-B9C5CA577DD2") ||
      sequenceFlows.get(0).getId().equals("sid-A299B987-396F-46CA-8D63-85991FBFCE6E"));
View Full Code Here

   
    flowElement = model.getMainProcess().getFlowElement("subprocess1");
    assertNotNull(flowElement);
    assertTrue(flowElement instanceof SubProcess);
    assertEquals("subprocess1", flowElement.getId());
    SubProcess subProcess = (SubProcess) flowElement;
    assertTrue(subProcess.getLoopCharacteristics().isSequential());
    assertEquals("10", subProcess.getLoopCharacteristics().getLoopCardinality());
    assertEquals("${assignee == \"\"}", subProcess.getLoopCharacteristics().getCompletionCondition());
    assertTrue(subProcess.getFlowElements().size() == 5);
   
    assertEquals(1, subProcess.getExecutionListeners().size());
    ActivitiListener listenerSubProcess = subProcess.getExecutionListeners().get(0);
    assertEquals("SubProcessTestClass", listenerSubProcess.getImplementation());
    assertEquals(ImplementationType.IMPLEMENTATION_TYPE_CLASS, listenerSubProcess.getImplementationType());
    assertEquals("start", listenerSubProcess.getEvent());   
   
    flowElement = model.getMainProcess().getFlowElement("boundaryEvent1");
View Full Code Here

  private void validateModel(BpmnModel model) {
    FlowElement flowElement = model.getMainProcess().getFlowElement("outerSubProcess");
    assertNotNull(flowElement);
    assertTrue(flowElement instanceof SubProcess);
    assertEquals("outerSubProcess", flowElement.getId());
    SubProcess outerSubProcess = (SubProcess) flowElement;
    List<BoundaryEvent> eventList = outerSubProcess.getBoundaryEvents();
    assertEquals(1, eventList.size());
    BoundaryEvent boundaryEvent = eventList.get(0);
    assertEquals("outerBoundaryEvent", boundaryEvent.getId());
   
    FlowElement subElement = outerSubProcess.getFlowElement("innerSubProcess");
    assertNotNull(subElement);
    assertTrue(subElement instanceof SubProcess);
    assertEquals("innerSubProcess", subElement.getId());
    SubProcess innerSubProcess = (SubProcess) subElement;
    eventList = innerSubProcess.getBoundaryEvents();
    assertEquals(1, eventList.size());
    boundaryEvent = eventList.get(0);
    assertEquals("innerBoundaryEvent", boundaryEvent.getId());
   
    FlowElement taskElement = innerSubProcess.getFlowElement("usertask");
    assertNotNull(taskElement);
    assertTrue(taskElement instanceof UserTask);
    UserTask userTask = (UserTask) taskElement;
    assertEquals("usertask", userTask.getId());
    eventList = userTask.getBoundaryEvents();
View Full Code Here

   
    flowElement = model.getMainProcess().getFlowElement("subprocess1");
    assertNotNull(flowElement);
    assertTrue(flowElement instanceof SubProcess);
    assertEquals("subprocess1", flowElement.getId());
    SubProcess subProcess = (SubProcess) flowElement;
    assertEquals(11, subProcess.getFlowElements().size());

    // verify the sub process data objects
    dataObjects = subProcess.getDataObjects();
    assertEquals(6, dataObjects.size());
   
    objectMap = new HashMap<String, ValuedDataObject>();
    for (ValuedDataObject valueObj : dataObjects) {
      objectMap.put(valueObj.getId(), valueObj);
View Full Code Here

    flowElement = model.getMainProcess().getFlowElement("subprocess1");
    assertNotNull(flowElement);
    assertTrue(flowElement instanceof SubProcess);
    assertEquals("subprocess1", flowElement.getId());
    SubProcess subProcess = (SubProcess) flowElement;
    assertEquals(6, subProcess.getFlowElements().size());

    // verify the sub process data objects
    dataObjects = subProcess.getDataObjects();
    assertEquals(1, dataObjects.size());

    objectMap = new HashMap<String, ValuedDataObject>();
    for (ValuedDataObject valueObj : dataObjects) {
      objectMap.put(valueObj.getId(), valueObj);
View Full Code Here

   
    flowElement = model.getMainProcess().getFlowElement("subprocess1");
    assertNotNull(flowElement);
    assertTrue(flowElement instanceof SubProcess);
    assertEquals("subprocess1", flowElement.getId());
    SubProcess subProcess = (SubProcess) flowElement;
    assertTrue(subProcess.getLoopCharacteristics().isSequential());
    assertEquals("10", subProcess.getLoopCharacteristics().getLoopCardinality());
    assertEquals("${assignee == \"\"}", subProcess.getLoopCharacteristics().getCompletionCondition());
    assertTrue(subProcess.getFlowElements().size() == 5);
   
    /*
     * Verify Subprocess attributes extension
     */
    Map<String, String> attributes = getSubprocessAttributes(flowElement);
View Full Code Here

TOP

Related Classes of org.activiti.bpmn.model.SubProcess

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.