Package org.activiti.bpmn.model

Examples of org.activiti.bpmn.model.MessageFlow


    assertNotNull(dataStore);
    assertEquals("DATASTORE_1", dataStore.getId());
    assertEquals("test", dataStore.getName());
    assertEquals("ITEM_1", dataStore.getItemSubjectRef());
   
    MessageFlow messageFlow = model.getMessageFlow("MESSAGEFLOW_1");
    assertNotNull(messageFlow);
    assertEquals("test 1", messageFlow.getName());
    assertEquals("task1", messageFlow.getSourceRef());
    assertEquals("task2", messageFlow.getTargetRef());
   
    messageFlow = model.getMessageFlow("MESSAGEFLOW_2");
    assertNotNull(messageFlow);
    assertEquals("test 2", messageFlow.getName());
    assertEquals("task2", messageFlow.getSourceRef());
    assertEquals("task3", messageFlow.getTargetRef());
   
    assertEquals(2, model.getPools().size());
    Pool pool = model.getPools().get(0);
    assertEquals("participant1", pool.getId());
    assertEquals("Participant 1", pool.getName());
View Full Code Here


  protected static final Logger LOGGER = LoggerFactory.getLogger(MessageFlowParser.class.getName());
 
  public void parse(XMLStreamReader xtr, BpmnModel model) throws Exception {
    String id = xtr.getAttributeValue(null, ATTRIBUTE_ID);
    if (StringUtils.isNotEmpty(id)) {
      MessageFlow messageFlow = new MessageFlow();
      messageFlow.setId(id);
     
      String name = xtr.getAttributeValue(null, ATTRIBUTE_NAME);
      if (StringUtils.isNotEmpty(name)) {
        messageFlow.setName(name);
      }
     
      String sourceRef = xtr.getAttributeValue(null, ATTRIBUTE_FLOW_SOURCE_REF);
      if (StringUtils.isNotEmpty(sourceRef)) {
        messageFlow.setSourceRef(sourceRef);
      }
     
      String targetRef = xtr.getAttributeValue(null, ATTRIBUTE_FLOW_TARGET_REF);
      if (StringUtils.isNotEmpty(targetRef)) {
        messageFlow.setTargetRef(targetRef);
      }
     
      String messageRef = xtr.getAttributeValue(null, ATTRIBUTE_MESSAGE_REF);
      if (StringUtils.isNotEmpty(messageRef)) {
        messageFlow.setMessageRef(messageRef);
      }
     
      model.addMessageFlow(messageFlow);
    }
  }
View Full Code Here

          xtw.writeEndElement();
        }
       
        GraphicInfo labelGraphicInfo = model.getLabelGraphicInfo(elementId);
        FlowElement flowElement = model.getFlowElement(elementId);
        MessageFlow messageFlow = null;
        if (flowElement == null) {
          messageFlow = model.getMessageFlow(elementId);
        }
       
        boolean hasName = false;
        if (flowElement != null && StringUtils.isNotEmpty(flowElement.getName())) {
          hasName = true;
       
        } else if (messageFlow != null && StringUtils.isNotEmpty(messageFlow.getName())) {
          hasName = true;
        }
       
        if (labelGraphicInfo != null && hasName) {
          xtw.writeStartElement(BPMNDI_PREFIX, ELEMENT_DI_LABEL, BPMNDI_NAMESPACE);
View Full Code Here

TOP

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

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.