Package org.activiti.bpmn.model

Examples of org.activiti.bpmn.model.StartEvent


      return false;
    return super.canCreate(context);
  }

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

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


      return false;
    return super.canCreate(context);
  }

  public Object[] create(ICreateContext context) {
    StartEvent startEvent = new StartEvent();
    addObjectToContainer(context, startEvent, "Start");

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

  protected boolean accept(PictogramElement pe) {
    Object bo = getBusinessObject(pe);
    if (bo instanceof UserTask) {
      return true;
    } else if (bo instanceof StartEvent) {
      StartEvent startEvent = (StartEvent) bo;
      for (EventDefinition event : startEvent.getEventDefinitions()) {
        if (event instanceof TimerEventDefinition == false) {
          return false;
        }
      }
      return true;
View Full Code Here

      Object bo = getBusinessObject(pe);
      // the filter assured, that it is a EClass
      if (bo == null)
        return;
     
      StartEvent startEvent = (StartEvent) bo;
      if(startEvent.getEventDefinitions().get(0) != null) {
        TimerEventDefinition timerDefinition = (TimerEventDefinition) startEvent.getEventDefinitions().get(0);
        if(StringUtils.isNotEmpty(timerDefinition.getTimeDuration())) {
          String timeDuration = timerDefinition.getTimeDuration();
          timeDurationText.setText(timeDuration == null ? "" : timeDuration);
         
        } else if(StringUtils.isNotEmpty(timerDefinition.getTimeDate())) {
View Full Code Here

      if (bo == null)
        return;
     
      String errorCode = null;
      if(bo instanceof StartEvent) {
        StartEvent startEvent = (StartEvent) bo;
        if(startEvent.getEventDefinitions().get(0) != null) {
          ErrorEventDefinition errorDefinition = (ErrorEventDefinition) startEvent.getEventDefinitions().get(0);
          if(errorDefinition.getErrorCode() != null) {
            errorCode = errorDefinition.getErrorCode();
          }
        }
      }
View Full Code Here

      if (model == null) {
        return;
      }
     
      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();
         
        }
      }
View Full Code Here

      Object bo = getBusinessObject(pe);
      // the filter assured, that it is a EClass
      if (bo == null)
        return;

      StartEvent startEvent = ((StartEvent) bo);
     
      if(startEvent.getInitiator() != null) {
        initiatorText.setText(startEvent.getInitiator());
      } else {
        initiatorText.setText("");
      }
     
      if(startEvent.getFormKey() != null) {
       
        String condition = startEvent.getFormKey();
        formKeyText.setText(condition);
      } else {
        formKeyText.setText("");
      }
    }
View Full Code Here

  @Test
  public void connvertModelToXML() throws Exception {
    BpmnModel bpmnModel = new BpmnModel();
    Process process = bpmnModel.getMainProcess();
    StartEvent startEvent = new StartEvent();
    startEvent.setId("startEvent1");
    process.addFlowElement(startEvent);
    UserTask task = new UserTask();
    task.setId("reviewTask");
    task.setAssignee("kermit");
    process.addFlowElement(task);
View Full Code Here

      Object bo = getBusinessObject(pe);
      // the filter assured, that it is a EClass
      if (bo == null)
        return;

      StartEvent startEvent = ((StartEvent) bo);
      if(startEvent.getFormKey() != null) {
       
        formTypeCombo.removeFocusListener(listener);
        String condition = startEvent.getFormKey();
        formTypeCombo.setText(condition);
        formTypeCombo.addFocusListener(listener);
      } else {
        formTypeCombo.setText("");
      }
View Full Code Here

  public IAddFeature getAddFeature(IAddContext context) {
    if (context.getNewObject() instanceof StartEvent) {
      if (context.getNewObject() instanceof AlfrescoStartEvent) {
        return new AddAlfrescoStartEventFeature(this);
      } else {
        StartEvent startEvent = (StartEvent) context.getNewObject();
        if (startEvent.getEventDefinitions().size() > 0) {
          if (startEvent.getEventDefinitions().get(0) instanceof TimerEventDefinition) {
            return new AddTimerStartEventFeature(this);
          } if (startEvent.getEventDefinitions().get(0) instanceof MessageEventDefinition) {
            return new AddMessageStartEventFeature(this);
          } else {
            return new AddErrorStartEventFeature(this);
          }
        } else {
View Full Code Here

TOP

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

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.