Package org.activiti.bpmn.model

Examples of org.activiti.bpmn.model.SignalEventDefinition


    assertTrue(flowElement instanceof IntermediateCatchEvent);
    assertEquals("catchsignal", flowElement.getId());
    IntermediateCatchEvent catchEvent = (IntermediateCatchEvent) flowElement;
    assertEquals(1, catchEvent.getEventDefinitions().size());
    assertTrue(catchEvent.getEventDefinitions().get(0) instanceof SignalEventDefinition);
    SignalEventDefinition signalEvent = (SignalEventDefinition) catchEvent.getEventDefinitions().get(0);
    assertEquals("testSignal", signalEvent.getSignalRef());
   
    flowElement = model.getMainProcess().getFlowElement("subprocess");
    assertNotNull(flowElement);
    assertTrue(flowElement instanceof SubProcess);
    assertEquals("subprocess", flowElement.getId());
View Full Code Here


      for (FlowElement flowElement : process.findFlowElementsOfType(Event.class)) {
        Event event = (Event) flowElement;
        if (!event.getEventDefinitions().isEmpty()) {
          EventDefinition eventDefinition = event.getEventDefinitions().get(0);
          if (eventDefinition instanceof SignalEventDefinition) {
            SignalEventDefinition signalEvent = (SignalEventDefinition) eventDefinition;
            if (model.containsSignalId(signalEvent.getSignalRef()) == false) {
              Signal signal = new Signal(signalEvent.getSignalRef(), signalEvent.getSignalRef());
              model.addSignal(signal);
            }

          } else if (eventDefinition instanceof MessageEventDefinition) {
            MessageEventDefinition messageEvent = (MessageEventDefinition) eventDefinition;
View Full Code Here

          "Invalid 'messageRef': no message with that id can be found in the model");
    }
  }
 
  protected void handleSignalEventDefinition(BpmnModel bpmnModel, Process process, Event event, EventDefinition eventDefinition, List<ValidationError> errors) {
    SignalEventDefinition signalEventDefinition = (SignalEventDefinition) eventDefinition;
   
    if (StringUtils.isEmpty(signalEventDefinition.getSignalRef())) {
      addError(errors, Problems.SIGNAL_EVENT_MISSING_SIGNAL_REF, process, event,
          "signalEventDefinition does not have mandatory property 'signalRef'");
    } else if (!bpmnModel.containsSignalId(signalEventDefinition.getSignalRef())) {
      addError(errors, Problems.SIGNAL_EVENT_INVALID_SIGNAL_REF, process,event,
          "Invalid 'signalRef': no signal with that id can be found in the model");
    }
  }
View Full Code Here

    super(fp, "SignalThrowingEvent", "Add signal intermediate throwing event");
  }

  public Object[] create(ICreateContext context) {
    ThrowEvent throwEvent = new ThrowEvent();
    SignalEventDefinition eventDef = new SignalEventDefinition();
    throwEvent.getEventDefinitions().add(eventDef);
    addObjectToContainer(context, throwEvent, "SignalThrowEvent");

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

     
      String signalRef = null;
      if(bo instanceof BoundaryEvent) {
        BoundaryEvent boundaryEvent = (BoundaryEvent) bo;
        if(boundaryEvent.getEventDefinitions().get(0) != null) {
          SignalEventDefinition signalDefinition = (SignalEventDefinition) boundaryEvent.getEventDefinitions().get(0);
          if(StringUtils.isNotEmpty(signalDefinition.getSignalRef())) {
            signalRef = signalDefinition.getSignalRef();
          }
        }
      }
     
      String[] items = new String[model.getBpmnModel().getSignals().size() + 1];
View Full Code Here

    assertTrue(flowElement instanceof IntermediateCatchEvent);
    assertEquals("catchsignal", flowElement.getId());
    IntermediateCatchEvent catchEvent = (IntermediateCatchEvent) flowElement;
    assertEquals(1, catchEvent.getEventDefinitions().size());
    assertTrue(catchEvent.getEventDefinitions().get(0) instanceof SignalEventDefinition);
    SignalEventDefinition signalEvent = (SignalEventDefinition) catchEvent.getEventDefinitions().get(0);
    assertEquals("testSignal", signalEvent.getSignalRef());
   
    flowElement = model.getMainProcess().getFlowElement("subprocess");
    assertNotNull(flowElement);
    assertTrue(flowElement instanceof SubProcess);
    assertEquals("subprocess", flowElement.getId());
View Full Code Here

     
      String signalRef = null;
      if(bo instanceof ThrowEvent) {
        ThrowEvent throwEvent = (ThrowEvent) bo;
        if(throwEvent.getEventDefinitions().get(0) != null) {
          SignalEventDefinition signalDefinition = (SignalEventDefinition) throwEvent.getEventDefinitions().get(0);
          if(StringUtils.isNotEmpty(signalDefinition.getSignalRef())) {
            signalRef = signalDefinition.getSignalRef();
          }
        }
      }
     
      String[] items = new String[model.getBpmnModel().getSignals().size() + 1];
View Full Code Here

     
      String signalRef = null;
      if(bo instanceof IntermediateCatchEvent) {
        IntermediateCatchEvent catchEvent = (IntermediateCatchEvent) bo;
        if(catchEvent.getEventDefinitions().get(0) != null) {
          SignalEventDefinition signalDefinition = (SignalEventDefinition) catchEvent.getEventDefinitions().get(0);
          if(StringUtils.isNotEmpty(signalDefinition.getSignalRef())) {
            signalRef = signalDefinition.getSignalRef();
          }
        }
      }
     
      String[] items = new String[model.getBpmnModel().getSignals().size() + 1];
View Full Code Here

    return false;
  }

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

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

        if (flowElement instanceof Event) {
          Event event = (Event) flowElement;
          if (event.getEventDefinitions().size() > 0) {
            EventDefinition eventDefinition = event.getEventDefinitions().get(0);
            if (eventDefinition instanceof SignalEventDefinition) {
              SignalEventDefinition signalEvent = (SignalEventDefinition) eventDefinition;
              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) {
View Full Code Here

TOP

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

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.