Package org.activiti.bpmn.model

Examples of org.activiti.bpmn.model.MessageEventDefinition


     
      String messageRef = null;
      if(bo instanceof IntermediateCatchEvent) {
        IntermediateCatchEvent catchEvent = (IntermediateCatchEvent) bo;
        if(catchEvent.getEventDefinitions().get(0) != null) {
          MessageEventDefinition messageDefinition = (MessageEventDefinition) catchEvent.getEventDefinitions().get(0);
          if(StringUtils.isNotEmpty(messageDefinition.getMessageRef())) {
            messageRef = messageDefinition.getMessageRef();
          }
        }
      }
     
      String[] items = new String[model.getBpmnModel().getMessages().size() + 1];
View Full Code Here


    return super.canCreate(context);
  }

  public Object[] create(ICreateContext context) {
    StartEvent startEvent = new StartEvent();
    MessageEventDefinition  timerEvent = new MessageEventDefinition();
    startEvent.getEventDefinitions().add(timerEvent);
    addObjectToContainer(context, startEvent, "Message start");

    // return newly created business object(s)
    return new Object[] { startEvent };
View Full Code Here

              if (model.containsSignalId(signalEvent.getSignalRef()) == false) {
                model.addSignal(signalEvent.getSignalRef(), signalEvent.getSignalRef());
              }
             
            } else if (eventDefinition instanceof MessageEventDefinition) {
              MessageEventDefinition messageEvent = (MessageEventDefinition) eventDefinition;
              if (model.containsMessageId(messageEvent.getMessageRef()) == false) {
                model.addMessage(messageEvent.getMessageRef(), messageEvent.getMessageRef());
              }
            }
          }
        }
      }
View Full Code Here

    return false;
  }

  public Object[] create(ICreateContext context) {
    BoundaryEvent boundaryEvent = new BoundaryEvent();
    MessageEventDefinition messageEvent = new MessageEventDefinition();
    boundaryEvent.getEventDefinitions().add(messageEvent);

    Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
    ((Activity) parentObject).getBoundaryEvents().add(boundaryEvent);
    boundaryEvent.setAttachedToRef((Activity) parentObject);
View Full Code Here

      }
     
      String messageRef = null;
      StartEvent startEvent = (StartEvent) bo;
      if(startEvent.getEventDefinitions().get(0) != null) {
        MessageEventDefinition messageDefinition = (MessageEventDefinition) startEvent.getEventDefinitions().get(0);
        if(StringUtils.isNotEmpty(messageDefinition.getMessageRef())) {
          messageRef = messageDefinition.getMessageRef();
         
        }
      }
     
      String[] items = new String[model.getBpmnModel().getMessages().size() + 1];
View Full Code Here

      String messageRef = null;
      if (bo instanceof BoundaryEvent) {
        BoundaryEvent boundaryEvent = (BoundaryEvent) bo;
        if (boundaryEvent.getEventDefinitions().get(0) != null) {
          MessageEventDefinition messageDefinition = (MessageEventDefinition) boundaryEvent.getEventDefinitions().get(0);
          if (StringUtils.isNotEmpty(messageDefinition.getMessageRef())) {
            messageRef = messageDefinition.getMessageRef();
          }
        }
      }

      String[] items = new String[model.getBpmnModel().getMessages().size() + 1];
View Full Code Here

 
  protected void convertJsonToMessageDefinition(JsonNode objectNode, Event event) {
    String messageRef = getPropertyValueAsString(PROPERTY_MESSAGEREF, objectNode);
   
    if (StringUtils.isNotEmpty(messageRef)) {
      MessageEventDefinition eventDefinition = new MessageEventDefinition();
      eventDefinition.setMessageRef(messageRef);
      event.getEventDefinitions().add(eventDefinition);
    }
  }
View Full Code Here

  }
 
  public void parseChildElement(XMLStreamReader xtr, BaseElement parentElement) throws Exception {
    if (parentElement instanceof Event == false) return;
   
    MessageEventDefinition eventDefinition = new MessageEventDefinition();
    eventDefinition.setMessageRef(xtr.getAttributeValue(null, "messageRef"));
   
    ((Event) parentElement).getEventDefinitions().add(eventDefinition);
  }
View Full Code Here

TOP

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

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.