Package org.enhydra.shark.xpdl

Examples of org.enhydra.shark.xpdl.XMLCollectionElement


            act.getActivityTypes().getImplementation().getImplementationTypes().setNo();

            // CUSTOM: grab every available workflow variable from the workflow process that it belongs to and add as extended attribute (view only)
            WorkflowProcess process = (WorkflowProcess) act.getParent().getParent();
            Map m = XMLUtil.getPossibleVariables(process);
            XMLCollectionElement dataFields[] = (XMLCollectionElement[]) m.values().toArray(new XMLCollectionElement[0]);
            for (int i = 0; i < dataFields.length; i++) {
                ExtendedAttribute attribute = this.createXPDLObject(act.getExtendedAttributes(), null, true);
                attribute.setName("VariableToProcess_UPDATE");
                attribute.setVValue(dataFields[i].getId());
            }
View Full Code Here


                    Map allExtPkgPars = getAllPackageParticipants(changedElements);
                    List allGraphElements = getAllWorkflowProcessesAndActivitySetsForAdjustment(allPkgs);

                    Iterator it = allGraphElements.iterator();
                    while (it.hasNext()) {
                        XMLCollectionElement wpOrAs = (XMLCollectionElement) it.next();
                        GraphUtilities.adjustWorkflowProcessOrActivitySetOnUndoableChangeEvent(new ArrayList(), wpOrAs, allExtPkgPars, action == XMLElementChangeInfo.INSERTED);
                    }
                }
            } else {
                if (action == XMLElementChangeInfo.INSERTED || action == XMLElementChangeInfo.REMOVED || action == XMLElementChangeInfo.UPDATED) {
View Full Code Here

        adjustActions();
    }

    public void displayPreviousGraph() {
        if (hm != null && hm.canGoBack()) {
            XMLCollectionElement el = (XMLCollectionElement) hm.getPrevious((selectedGraph != null) ? selectedGraph.getXPDLObject() : null);
            Graph g = getGraph(el);
            if (g != selectedGraph) {
                selectedGraph = g;
                panel.graphSelected(selectedGraph);
                if (selectedGraph != null) {
View Full Code Here

        adjustActions();
    }

    public void displayNextGraph() {
        if (hm != null && hm.canGoForward()) {
            XMLCollectionElement el = (XMLCollectionElement) hm.getNext((selectedGraph != null) ? selectedGraph.getXPDLObject() : null);
            Graph g = getGraph(el);
            if (g != selectedGraph) {
                selectedGraph = g;
                panel.graphSelected(selectedGraph);
                if (selectedGraph != null) {
View Full Code Here

         }
      } else if (cel instanceof WorkflowProcesses) {
          prefix = "process";
      }

      XMLCollectionElement cl = (XMLCollectionElement)cel.generateNewElement();
      do {
         id=prefix+new Long(++nextId).toString();
      } while (skipIds.contains(id) || !isIdUnique(cl,id));
      return id;
      // END CUSTOM
View Full Code Here

   public String generateSimilarOrIdenticalUniqueId (XMLCollection cel,Set skipIds,String origId) {
      String id=origId;
      long nextId=0;

      XMLCollectionElement cl = (XMLCollectionElement)cel.generateNewElement();
      while (id.equals("") || skipIds.contains(id) || !isIdUnique(cl,id)) {
         id=origId+new Long(++nextId).toString();
      }
      return id;
   }
View Full Code Here

   public List getElementsForId (XMLCollection col,String id) {
      List elsWithId=new ArrayList();
      Iterator it=col.toElements().iterator();
      if (col.generateNewElement() instanceof XMLCollectionElement) {
         while (it.hasNext()) {
            XMLCollectionElement ce=(XMLCollectionElement)it.next();
            if (ce.getId().equals(id)) {
               elsWithId.add(ce);
            }
         }
      }
View Full Code Here

        } else if (action == XMLElementChangeInfo.UPDATED) {
            XMLElement parent = changedElement.getParent();
            if ((changedElement.toName().equals("Id") && (parent instanceof WorkflowProcess || parent instanceof ActivitySet || parent instanceof Application || parent instanceof Participant || parent instanceof DataField || parent instanceof FormalParameter || parent instanceof Activity || parent instanceof Transition || parent instanceof TypeDeclaration)) || ((changedElement.toName().equals("From") || changedElement.toName().equals("To")) && parent instanceof Transition) || ((parent instanceof Split || parent instanceof Join) && changedElement instanceof XMLAttribute)) {

                if (parent instanceof Activity || parent instanceof Transition || parent instanceof Split || parent instanceof Join) {
                    XMLCollectionElement wpOrAs = XMLUtil.getActivitySet(parent);
                    if (wpOrAs == null) {
                        wpOrAs = XMLUtil.getWorkflowProcess(parent);
                    }
                    if (parent instanceof Activity) {
                        updateSpecialInProgress = true;
                        JaWEManager.getInstance().getXPDLUtils().updateTransitionsOnActivityIdChange((Transitions) wpOrAs.get("Transitions"),
                                (String) info.getOldValue(),
                                (String) info.getNewValue());
                        updateSpecialInProgress = false;
                    } else if (parent instanceof Transition) {
                        if (changedElement.toName().equals("Id")) {
                            updateSpecialInProgress = true;
                            JaWEManager.getInstance().getXPDLUtils().updateActivityOnTransitionIdChange((Activities) wpOrAs.get("Activities"),
                                    ((Transition) parent).getFrom(),
                                    (String) info.getOldValue(),
                                    (String) info.getNewValue());
                            updateSpecialInProgress = false;
                        } else if (changedElement.toName().equals("From")) {
                            updateSpecialInProgress = true;
                            JaWEManager.getInstance().getXPDLUtils().updateActivitiesOnTransitionFromChange((Activities) wpOrAs.get("Activities"),
                                    ((Transition) parent).getId(),
                                    (String) info.getOldValue(),
                                    (String) info.getNewValue());
                            updateSpecialInProgress = false;
                        } else {
                            updateSpecialInProgress = true;
                            JaWEManager.getInstance().getXPDLUtils().updateActivitiesOnTransitionToChange((Activities) wpOrAs.get("Activities"),
                                    ((Transition) parent).getId(),
                                    (String) info.getOldValue(),
                                    (String) info.getNewValue());
                            updateSpecialInProgress = false;
                        }
View Full Code Here

         public Component prepareRenderer(TableCellRenderer renderer, int rowIndex, int vColIndex) {
            Component c = super.prepareRenderer(renderer, rowIndex, vColIndex);
            if (!isCellSelected(rowIndex, vColIndex) && colors) {
               XMLElement el = (XMLElement) getValueAt(rowIndex, 0);
               if (el instanceof XMLCollectionElement) {
                  XMLCollectionElement cel = (XMLCollectionElement) el;
                  XMLCollection celOwner = (XMLCollection) cel.getParent();
                  if (celOwner == null) {
                     c.setBackground(SPEC_EL_COLOR_BKG);
                  } else if (celOwner!=getOwner()) {
                     c.setBackground(FOREIGN_EL_COLOR_BKG);
                  } else {
View Full Code Here

TOP

Related Classes of org.enhydra.shark.xpdl.XMLCollectionElement

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.