Package org.activiti.bpmn.model.alfresco

Examples of org.activiti.bpmn.model.alfresco.AlfrescoStartEvent


  protected BaseElement convertXMLToElement(XMLStreamReader xtr, BpmnModel model) throws Exception {
    String formKey = xtr.getAttributeValue(ACTIVITI_EXTENSIONS_NAMESPACE, ATTRIBUTE_FORM_FORMKEY);
    StartEvent startEvent = null;
    if (StringUtils.isNotEmpty(formKey)) {
      if (model.getStartEventFormTypes() != null && model.getStartEventFormTypes().contains(formKey)) {
        startEvent = new AlfrescoStartEvent();
      }
    }
    if (startEvent == null) {
      startEvent = new StartEvent();
    }
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

TOP

Related Classes of org.activiti.bpmn.model.alfresco.AlfrescoStartEvent

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.