Package org.activiti.bpmn.model

Examples of org.activiti.bpmn.model.IOSpecification


 
  public void parseChildElement(XMLStreamReader xtr, BaseElement parentElement, BpmnModel model) throws Exception {
   
    if (parentElement instanceof Activity == false && parentElement instanceof Process == false) return;
   
    IOSpecification ioSpecification = new IOSpecification();
    BpmnXMLUtil.addXMLLocation(ioSpecification, xtr);
    boolean readyWithIOSpecification = false;
    try {
      while (readyWithIOSpecification == false && xtr.hasNext()) {
        xtr.next();
        if (xtr.isStartElement() && ELEMENT_DATA_INPUT.equalsIgnoreCase(xtr.getLocalName())) {
          DataSpec dataSpec = new DataSpec();
          BpmnXMLUtil.addXMLLocation(dataSpec, xtr);
          dataSpec.setId(xtr.getAttributeValue(null, ATTRIBUTE_ID));
          dataSpec.setName(xtr.getAttributeValue(null, ATTRIBUTE_NAME));
          dataSpec.setItemSubjectRef(parseItemSubjectRef(xtr.getAttributeValue(null, ATTRIBUTE_ITEM_SUBJECT_REF), model));
          ioSpecification.getDataInputs().add(dataSpec);

        } else if (xtr.isStartElement() && ELEMENT_DATA_OUTPUT.equalsIgnoreCase(xtr.getLocalName())) {
          DataSpec dataSpec = new DataSpec();
          BpmnXMLUtil.addXMLLocation(dataSpec, xtr);
          dataSpec.setId(xtr.getAttributeValue(null, ATTRIBUTE_ID));
          dataSpec.setName(xtr.getAttributeValue(null, ATTRIBUTE_NAME));
          dataSpec.setItemSubjectRef(parseItemSubjectRef(xtr.getAttributeValue(null, ATTRIBUTE_ITEM_SUBJECT_REF), model));
          ioSpecification.getDataOutputs().add(dataSpec);
         
        } else if (xtr.isStartElement() && ELEMENT_DATA_INPUT_REFS.equalsIgnoreCase(xtr.getLocalName())) {
          String dataInputRefs = xtr.getElementText();
          if (StringUtils.isNotEmpty(dataInputRefs)) {
            ioSpecification.getDataInputRefs().add(dataInputRefs.trim());
          }
         
        } else if (xtr.isStartElement() && ELEMENT_DATA_OUTPUT_REFS.equalsIgnoreCase(xtr.getLocalName())) {
          String dataOutputRefs = xtr.getElementText();
          if (StringUtils.isNotEmpty(dataOutputRefs)) {
            ioSpecification.getDataOutputRefs().add(dataOutputRefs.trim());
          }
         
        } else if (xtr.isEndElement() && getElementName().equalsIgnoreCase(xtr.getLocalName())) {
          readyWithIOSpecification = true;
        }
View Full Code Here

TOP

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

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.