Package org.activiti.bpmn.model

Examples of org.activiti.bpmn.model.StartEvent


    return ELEMENT_EVENT_START;
  }
 
  @Override
  protected BaseElement convertXMLToElement(XMLStreamReader xtr) {
    StartEvent startEvent = new StartEvent();
    startEvent.setInitiator(xtr.getAttributeValue(ACTIVITI_EXTENSIONS_NAMESPACE, ATTRIBUTE_EVENT_START_INITIATOR));
    startEvent.setFormKey(xtr.getAttributeValue(ACTIVITI_EXTENSIONS_NAMESPACE, ATTRIBUTE_FORM_FORMKEY));
   
    parseChildElements(getXMLElementName(), startEvent, xtr);
   
    return startEvent;
  }
View Full Code Here


    return startEvent;
  }
 
  @Override
  protected void writeAdditionalAttributes(BaseElement element, XMLStreamWriter xtw) throws Exception {
    StartEvent startEvent = (StartEvent) element;
    writeQualifiedAttribute(ATTRIBUTE_EVENT_START_INITIATOR, startEvent.getInitiator(), xtw);
    writeQualifiedAttribute(ATTRIBUTE_FORM_FORMKEY, startEvent.getInitiator(), xtw);
  }
View Full Code Here

    writeQualifiedAttribute(ATTRIBUTE_FORM_FORMKEY, startEvent.getInitiator(), xtw);
  }
 
  @Override
  protected void writeAdditionalChildElements(BaseElement element, XMLStreamWriter xtw) throws Exception {
    StartEvent startEvent = (StartEvent) element;
    writeEventDefinitions(startEvent.getEventDefinitions(), xtw);
    writeFormProperties(startEvent, xtw);
  }
View Full Code Here

   * @param original
   *          the object to clone
   * @return a clone of the original object
   */
  private static final StartEvent clone(final StartEvent original, final Diagram diagram) {
    StartEvent result = new StartEvent();
    result.setId(ActivitiUiUtil.getNextId(result.getClass(), CreateStartEventFeature.FEATURE_ID_KEY, diagram));
    return result;
  }
View Full Code Here

    return (context.getTargetContainer() instanceof Diagram ||
            parentObject instanceof SubProcess || parentObject instanceof Lane);
  }

  public Object[] create(ICreateContext context) {
    StartEvent startEvent = new AlfrescoStartEvent();

    startEvent.setId(getNextId(startEvent));
    startEvent.setName("Alfresco start");
   
    List<String> formTypes = PreferencesUtil.getStringArray(Preferences.ALFRESCO_FORMTYPES_STARTEVENT);
    if (formTypes.size() > 0) {
      startEvent.setFormKey(formTypes.get(0));
    }

    Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
    if (parentObject instanceof SubProcess) {
      ((SubProcess) parentObject).addFlowElement(startEvent);
     
    } else if (parentObject instanceof Lane) {
      final Lane lane = (Lane) parentObject;
      lane.getFlowReferences().add(startEvent.getId());
      lane.getParentProcess().addFlowElement(startEvent);
     
    } else {
      Bpmn2MemoryModel model = ModelHandler.getModel(EcoreUtil.getURI(getDiagram()));
      if (model.getBpmnModel().getMainProcess() == null) {
View Full Code Here

    }
    return STENCIL_EVENT_START_NONE;
  }
 
  protected void convertElementToJson(ObjectNode propertiesNode, FlowElement flowElement) {
    StartEvent startEvent = (StartEvent) flowElement;
    if (StringUtils.isNotEmpty(startEvent.getInitiator())) {
      propertiesNode.put(PROPERTY_NONE_STARTEVENT_INITIATOR, startEvent.getInitiator());
    }
    addFormProperties(startEvent.getFormProperties(), propertiesNode);
    addEventProperties(startEvent, propertiesNode);
  }
View Full Code Here

    addFormProperties(startEvent.getFormProperties(), propertiesNode);
    addEventProperties(startEvent, propertiesNode);
  }
 
  protected FlowElement convertJsonToElement(JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap) {
    StartEvent startEvent = new StartEvent();
    startEvent.setInitiator(getPropertyValueAsString(PROPERTY_NONE_STARTEVENT_INITIATOR, elementNode));
    String stencilId = BpmnJsonConverterUtil.getStencilId(elementNode);
    if (STENCIL_EVENT_START_NONE.equals(stencilId)) {
      convertJsonToFormProperties(elementNode, startEvent);
    } else if (STENCIL_EVENT_START_TIMER.equals(stencilId)) {
      convertJsonToTimerDefinition(elementNode, startEvent);
View Full Code Here

    Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
    return (parentObject instanceof EventSubProcess);
  }

  public Object[] create(ICreateContext context) {
    StartEvent startEvent = new StartEvent();
    ErrorEventDefinition errorEvent = new ErrorEventDefinition();
    startEvent.getEventDefinitions().add(errorEvent);
    addObjectToContainer(context, startEvent, "Error start");

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

      gaService.setLocationAndSize(ellipse, 0, 0, 0, 0);
    }

    if (addedEvent instanceof StartEvent && ((StartEvent) addedEvent).getEventDefinitions().size() > 0) {

      StartEvent startEvent = (StartEvent) addedEvent;
      final Shape shape = peCreateService.createShape(containerShape, false);
      Image image = null;
      if (startEvent.getEventDefinitions().get(0) instanceof TimerEventDefinition) {
        image = gaService.createImage(shape, PluginImage.IMG_BOUNDARY_TIMER.getImageKey());
      } else if (startEvent.getEventDefinitions().get(0) instanceof MessageEventDefinition){
        image = gaService.createImage(shape, PluginImage.IMG_STARTEVENT_MESSAGE.getImageKey());
      } else
        image = gaService.createImage(shape, PluginImage.IMG_BOUNDARY_ERROR.getImageKey());
     
      image.setWidth(IMAGE_SIZE);
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.