Package org.enhydra.shark.xpdl.elements

Examples of org.enhydra.shark.xpdl.elements.ActivitySet


    }

    public ActivitySet createXPDLObject(ActivitySets ass,
            String type,
            boolean addToCollection) {
        ActivitySet as = (ActivitySet) ass.generateNewElement();
        JaWETypes jts = JaWEManager.getInstance().getJaWEController().getJaWETypes();
        boolean hasTemplate = jts.hasTemplateId(type);
        adjustType(as, type);
        if (hasTemplate) {
            jts.fillFromTemplate(as, type);
        }
        String id = as.getId();
        if (!hasTemplate || id.equals("") || ass.getActivitySet(id) != null) {
            if (id.equals("")) {
                id = JaWEManager.getInstance().getIdFactory().generateUniqueId(ass);
            } else {
                id = JaWEManager.getInstance().getIdFactory().generateSimilarOrIdenticalUniqueId(ass, new HashSet(), id);
            }
            int i = 0;
            while (ass.getActivitySet(id) != null) {
                id = id + String.valueOf(++i);
            }
            as.setId(id);
        }

        adjustXPDLObject(as, type);

        if (addToCollection) {
View Full Code Here


    }

    protected void checkBlockId(XMLAttribute bId, List existingErrors)
    {
        String blockId = bId.toValue();
        ActivitySet as = XMLUtil.getWorkflowProcess(bId).getActivitySet(blockId);
        if(as == null)
        {
            XMLValidationError verr = new XMLValidationError("ERROR", "LOGIC", "ERROR_NON_EXISTING_ACTIVITY_SET_REFERENCE", blockId, bId);
            existingErrors.add(verr);
        }
View Full Code Here

        Activities acts = proc.getActivities();
        idCnt += XMLUtil.cntIds(acts, newId);
        ActivitySets actSets = proc.getActivitySets();
        for(int y = 0; y < actSets.size(); y++)
        {
            ActivitySet actSet = (ActivitySet)actSets.get(y);
            acts = actSet.getActivities();
            idCnt += XMLUtil.cntIds(acts, newId);
        }

        return idCnt <= 1;
    }
View Full Code Here

        Transitions trans = proc.getTransitions();
        idCnt += XMLUtil.cntIds(trans, newId);
        ActivitySets actSets = proc.getActivitySets();
        for(int y = 0; y < actSets.size(); y++)
        {
            ActivitySet actSet = (ActivitySet)actSets.get(y);
            trans = actSet.getTransitions();
            idCnt += XMLUtil.cntIds(trans, newId);
        }

        return idCnt <= 1;
    }
View Full Code Here

                graphsToValidate.add(g);
            }
            if (el instanceof WorkflowProcess) {
                Iterator ass = ((WorkflowProcess) el).getActivitySets().toElements().iterator();
                while (ass.hasNext()) {
                    ActivitySet as = (ActivitySet) ass.next();
                    g = (Graph) graphMap.get(as);
                    if (g != null) {
                        graphsToValidate.add(g);
                    }
                }
View Full Code Here

            setUpdateInProgress(false);

            adjustActions();

        } else if (cbutton.getChoiceType() == ActivitySet.class) {
            ActivitySet aset = (ActivitySet) change;
            setSelectedGraph(getGraph(aset));

            JaWEManager.getInstance().getJaWEController().getSelectionManager().setSelection(aset, true);
        }
    }
View Full Code Here

                    wp.setReadOnly(true);
                }
            }
            Iterator asi = wp.getActivitySets().toElements().iterator();
            while (asi.hasNext()) {
                ActivitySet as = (ActivitySet) asi.next();
                createGraph(as);
                if (settings.performAutomaticLayoutOnInsertion()) {
                    if (isRO) {
                        wp.setReadOnly(false);
                    }
View Full Code Here

        while (it.hasNext()) {
            WorkflowProcess wp = (WorkflowProcess) it.next();
            removeGraph(wp);
            Iterator asi = wp.getActivitySets().toElements().iterator();
            while (asi.hasNext()) {
                ActivitySet as = (ActivitySet) asi.next();
                removeGraph(as);
            }
        }
    }
View Full Code Here

       WorkflowProcess proc = XMLUtil.getWorkflowProcess(newEl);
       Activities acts = proc.getActivities();
       List elsWithId=getElementsForId(acts, newId);
       ActivitySets actSets = proc.getActivitySets();
       for(int y = 0; y < actSets.size(); y++) {
           ActivitySet actSet = (ActivitySet)actSets.get(y);
           acts = actSet.getActivities();
           elsWithId.addAll(getElementsForId(acts, newId));
       }
       if (elsWithId.size()==0 || (elsWithId.size()==1 && elsWithId.contains(newEl))) {
          return true;
       }return false;
View Full Code Here

      Transitions trans = proc.getTransitions();
      List elsWithId=getElementsForId(trans, newId);
      ActivitySets actSets = proc.getActivitySets();
      for(int y = 0; y < actSets.size(); y++) {
         ActivitySet actSet = (ActivitySet)actSets.get(y);
         trans = actSet.getTransitions();
         elsWithId.addAll(getElementsForId(trans, newId));
      }
      if (elsWithId.size()==0 || (elsWithId.size()==1 && elsWithId.contains(newEl))) {
         return true;
      }
View Full Code Here

TOP

Related Classes of org.enhydra.shark.xpdl.elements.ActivitySet

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.