Package com.asakusafw.compiler.flow.jobflow

Examples of com.asakusafw.compiler.flow.jobflow.JobflowModel$Process


    public void updateIDs(Definitions def) {
      // data object id update
      List<RootElement> rootElements =  def.getRootElements();
        for(RootElement root : rootElements) {
          if(root instanceof Process) {
            Process process = (Process) root;
            List<FlowElement> flowElements = process.getFlowElements();
              for(FlowElement fe : flowElements) {
                if(fe instanceof DataObject) {
                  DataObject da = (DataObject) fe;
                  if(da.getName() != null) {
                    String daId = da.getName().trim();
View Full Code Here


      List<RootElement> rootElements =  def.getRootElements();
      List<ItemDefinition> itemDefinitionsToAddUnfiltered = new ArrayList<ItemDefinition>();
        List<ItemDefinition> itemDefinitionsToAddFiltered = new ArrayList<ItemDefinition>();
        for(RootElement root : rootElements) {
          if(root instanceof Process) {
            Process process = (Process) root;
            List<FlowElement> flowElements = process.getFlowElements();
              for(FlowElement fe : flowElements) {
                if(fe instanceof DataObject) {
                  DataObject da = (DataObject) fe;
                  ItemDefinition itemdef =  Bpmn2Factory.eINSTANCE.createItemDefinition();
                  itemdef.setId("_" + da.getId() + "Item");
                  Iterator<FeatureMap.Entry> iter = da.getAnyAttribute().iterator();
                      while(iter.hasNext()) {
                          FeatureMap.Entry entry = iter.next();
                          if(entry.getEStructuralFeature().getName().equals("datype")) {
                            String typeValue = (String) entry.getValue();
                            if(typeValue != null && !typeValue.equals("None")) {
                              itemdef.setStructureRef((String) entry.getValue());
                            }
                          }
                      }
                      da.setItemSubjectRef(itemdef);
                        itemDefinitionsToAddUnfiltered.add(itemdef);
                }
              }
          }
        }
        for(ItemDefinition itemDef : itemDefinitionsToAddUnfiltered) {
            boolean foundItemDef = false;
            for(RootElement ele : rootElements) {
                if(ele instanceof ItemDefinition) {
                    ItemDefinition idef = (ItemDefinition) ele;
                    if(idef.getId().equals(itemDef.getId())) {
                        foundItemDef = true;
                        break;
                    }
                }
            }
            if(!foundItemDef) {
                itemDefinitionsToAddFiltered.add(itemDef);
            }
        }

        for(ItemDefinition itemDefFil : itemDefinitionsToAddFiltered) {
            def.getRootElements().add(itemDefFil);
        }
       
        for(RootElement root : rootElements) {
          if(root instanceof Process) {
            Process process = (Process) root;
              List<Artifact> artifactElements = process.getArtifacts();
              for(Artifact af : artifactElements) {
                if(af instanceof Association) {
                  Association as = (Association) af;
                  if(as.getSourceRef() != null && as.getSourceRef() instanceof DataObject
                      && as.getTargetRef() != null && (as.getTargetRef() instanceof Task || as.getTargetRef() instanceof ThrowEvent)) {
View Full Code Here

   
    public void revisitTaskAssociations(Definitions def) {
      List<RootElement> rootElements =  def.getRootElements();
        for(RootElement root : rootElements) {
            if(root instanceof Process) {
                Process process = (Process) root;
                List<FlowElement> flowElements = process.getFlowElements();
                for(FlowElement fe : flowElements) {
                  if(fe instanceof Task) {
                    Task t = (Task) fe;
                    if(t.getDataInputAssociations() != null) {
                      List<DataInputAssociation> inputList = t.getDataInputAssociations();
View Full Code Here

   
    public void revisitLanes(Definitions def) {
        List<RootElement> rootElements =  def.getRootElements();
        for(RootElement root : rootElements) {
            if(root instanceof Process) {
                Process process = (Process) root;
                if((process.getLaneSets() == null || process.getLaneSets().size() < 1) && _lanes.size() > 0) {
                  LaneSet ls = Bpmn2Factory.eINSTANCE.createLaneSet();
                  for(Lane lane : _lanes) {
                    ls.getLanes().add(lane);
                    List<FlowNode> laneFlowNodes = lane.getFlowNodeRefs();
                    for(FlowNode fl : laneFlowNodes) {
                      process.getFlowElements().add(fl);
                    }
                  }
                  process.getLaneSets().add(ls);
                }
            }
        }
    }
View Full Code Here

   
    public void revisitArtifacts(Definitions def) {
      List<RootElement> rootElements =  def.getRootElements();
        for(RootElement root : rootElements) {
            if(root instanceof Process) {
                Process process = (Process) root;
                for(Artifact a : _artifacts) {
                  process.getArtifacts().add(a);
                }
            }
        }
    }
View Full Code Here

      List<RootElement> rootElements =  def.getRootElements();
      Category defaultCat = Bpmn2Factory.eINSTANCE.createCategory();
      defaultCat.setName("default");
        for(RootElement root : rootElements) {
           if(root instanceof Process) {
             Process process = (Process) root;
             List<Artifact> processArtifacts = process.getArtifacts();
             if(processArtifacts != null) {
               for(Artifact ar : processArtifacts) {
                 if(ar instanceof Group) {
                   Group group = (Group) ar;
                   Iterator<FeatureMap.Entry> iter = group.getAnyAttribute().iterator();
View Full Code Here

                // elements
                // in order to find our activity name
                List<RootElement> re = def.getRootElements();
                for (RootElement r : re) {
                  if (r instanceof Process) {
                    Process p = (Process) r;
                    List<FlowElement> fes = p
                        .getFlowElements();
                    for (FlowElement f : fes) {
                      if (f instanceof Activity
                          && ((Activity) f)
                              .getName()
View Full Code Here

                                // elements
                                // in order to find our activity name
                                List<RootElement> re = def.getRootElements();
                                for (RootElement r : re) {
                                    if (r instanceof Process) {
                                        Process p = (Process) r;
                                        List<FlowElement> fes = p
                                                .getFlowElements();
                                        for (FlowElement f : fes) {
                                            if (f instanceof Activity
                                                    && ((Activity) f)
                                                    .getName()
View Full Code Here

      List<CatchEvent> catchEventsToRemove = new ArrayList<CatchEvent>();
      Map<BoundaryEvent, List<String>> boundaryEventsToAdd = new HashMap<BoundaryEvent, List<String>>();
      List<RootElement> rootElements =  def.getRootElements();
      for(RootElement root : rootElements) {
        if(root instanceof Process) {
                Process process = (Process) root;
                revisitCatchEVentsConvertToBoundaryExecute(process, catchEventsToRemove, boundaryEventsToAdd);
        }
      }
        reconnectFlows();
    }
View Full Code Here

                                        // we have to iterate again through all flow elements
                                        // in order to find our activity name
                                        List<RootElement> re =  def.getRootElements();
                                        for(RootElement r : re) {
                                            if(r instanceof Process) {
                                                Process p = (Process) r;
                                                List<FlowElement> fes =  p.getFlowElements();
                                                for(FlowElement f : fes) {
                                                    if(f instanceof Activity && ((Activity) f).getName().equals(activityNameRef)) {
                                                        ((CompensateEventDefinition) ed).setActivityRef((Activity)f);
                                                        ((Activity) f).setIsForCompensation(true);
                                                    }
View Full Code Here

TOP

Related Classes of com.asakusafw.compiler.flow.jobflow.JobflowModel$Process

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.