Package org.activiti.bpmn.model

Examples of org.activiti.bpmn.model.CompensateEventDefinition


  }
 
  public void parseChildElement(XMLStreamReader xtr, BaseElement parentElement, BpmnModel model) throws Exception {
    if (parentElement instanceof Event == false) return;
   
    CompensateEventDefinition eventDefinition = new CompensateEventDefinition();
    BpmnXMLUtil.addXMLLocation(eventDefinition, xtr);
    eventDefinition.setActivityRef(xtr.getAttributeValue(null, ATTRIBUTE_COMPENSATE_ACTIVITYREF));
    if (StringUtils.isNotEmpty(xtr.getAttributeValue(null, ATTRIBUTE_COMPENSATE_WAITFORCOMPLETION))) {
      eventDefinition.setWaitForCompletion(Boolean.parseBoolean(xtr.getAttributeValue(null, ATTRIBUTE_COMPENSATE_WAITFORCOMPLETION)));
    }
   
    BpmnXMLUtil.parseChildElements(ELEMENT_EVENT_COMPENSATEDEFINITION, eventDefinition, xtr, model);
   
    ((Event) parentElement).getEventDefinitions().add(eventDefinition);
View Full Code Here


           "Timer needs configuration (either timeDate, timeCycle or timeDuration is needed)");
     }
  }
 
  protected void handleCompensationEventDefinition(BpmnModel bpmnModel, Process process, Event event, EventDefinition eventDefinition, List<ValidationError> errors) {
    CompensateEventDefinition compensateEventDefinition = (CompensateEventDefinition) eventDefinition;
   
    // Check activityRef
     if((StringUtils.isNotEmpty(compensateEventDefinition.getActivityRef())
         && process.getFlowElementRecursive(compensateEventDefinition.getActivityRef()) == null)) {
       addError(errors, Problems.COMPENSATE_EVENT_INVALID_ACTIVITY_REF, process, event,
           "Invalid attribute value for 'activityRef': no activity with the given id");
      }
  }
View Full Code Here

TOP

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

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.