Package org.fireflow.model.net

Examples of org.fireflow.model.net.Synchronizer


            wfElementInstanceMap.put(activity.getId(), activityInstance);
        }
        //同步器节点
        List<Synchronizer> synchronizers = workflowProcess.getSynchronizers();
        for (int i = 0; i < synchronizers.size(); i++) {
            Synchronizer synchronizer = synchronizers.get(i);
            SynchronizerInstance synchronizerInstance = new SynchronizerInstance(synchronizer);
            extensionList = kenelExtensions.get(synchronizerInstance.getExtensionTargetName());
            for (int j = 0; extensionList != null && j < extensionList.size(); j++) {
                IKernelExtension extension = extensionList.get(j);
                synchronizerInstance.registExtension(extension);
            }
            wfElementInstanceMap.put(synchronizer.getId(), synchronizerInstance);
        }
        //结束节点
        List<EndNode> endNodes = workflowProcess.getEndNodes();

        for (int i = 0; i < endNodes.size(); i++) {
View Full Code Here


        }
        List<Element> synchronizerElms = Util4Parser.children(element, SYNCHRONIZER);
        Iterator<Element> iter = synchronizerElms.iterator();
        while (iter.hasNext()) {
            Element elm = iter.next();
            Synchronizer synchronizer = new Synchronizer(wp, elm.attributeValue(NAME));
            synchronizer.setSn(UUID.randomUUID().toString());
            synchronizer.setDescription(Util4Parser.elementAsString(element,
                    DESCRIPTION));
            synchronizer.setDisplayName(element.attributeValue(DISPLAY_NAME));

            loadExtendedAttributes(synchronizer.getExtendedAttributes(),
                    Util4Parser.child(elm, EXTENDED_ATTRIBUTES));

            synchronizers.add(synchronizer);
        }
    }
View Full Code Here

     */
    protected Loop createLoop(WorkflowProcess wp, Element loopElement)
            throws FPDLParserException {
        String fromNodeId = loopElement.attributeValue(FROM);
        String toNodeId = loopElement.attributeValue(TO);
        Synchronizer fromNode = (Synchronizer) wp.findWFElementById(fromNodeId);
        Synchronizer toNode = (Synchronizer) wp.findWFElementById(toNodeId);

        Loop loop = new Loop(wp,
                loopElement.attributeValue(NAME), fromNode,
                toNode);
        loop.setSn(UUID.randomUUID().toString());
View Full Code Here

            Loop loop = createLoop(wp, loopElement);
            loops.add(loop);



            Synchronizer fromNode = (Synchronizer)loop.getFromNode();
            Synchronizer toNode = (Synchronizer)loop.getToNode();

            fromNode.getLeavingLoops().add(loop);
            toNode.getEnteringLoops().add(loop);
        }
     }
View Full Code Here

      return this.getStartNode();
    }
   
    List<Synchronizer> synchronizerList = this.getSynchronizers();
    for (int i = 0; i < synchronizerList.size(); i++) {
      Synchronizer synchronizer = synchronizerList.get(i);
      if (synchronizer.getId().equals(id)) {
        return synchronizer;
      }
    }

    List<EndNode> endNodeList = this.getEndNodes();
View Full Code Here

      }
    }

    List<Synchronizer> synchronizers = this.getSynchronizers();
    for (int i = 0; i < synchronizers.size(); i++) {
      Synchronizer synchronizer = synchronizers.get(i);
      String theName = (synchronizer.getDisplayName() == null || synchronizer
          .getDisplayName().equals("")) ? synchronizer.getName()
          : synchronizer.getDisplayName();
      if (synchronizer.getEnteringTransitions().size() == 0) {
        return errHead + "synchronizer[" + theName
            + "] must have entering transition.";
      }
      if (synchronizer.getLeavingTransitions().size() == 0) {
        return errHead + "synchronizer[" + theName
            + "] must have leaving transition.";
      }
    }
View Full Code Here

          reachableNodesList.add(toNode);
          reachableNodesList.addAll(getReachableNodes(toNode.getId()));
        }
      }
    } else if (node instanceof Synchronizer) {
      Synchronizer synchronizer = (Synchronizer) node;
      List<Transition> leavingTransitions = synchronizer.getLeavingTransitions();
      for (int i = 0; leavingTransitions != null
          && i < leavingTransitions.size(); i++) {
        Transition leavingTransition =  leavingTransitions.get(i);
        if (leavingTransition != null) {
          Node toNode = (Node) leavingTransition.getToNode();
View Full Code Here

          enterableNodesList.add(fromNode);
          enterableNodesList.addAll(getEnterableNodes(fromNode.getId()));
        }
      }
    } else if (node instanceof Synchronizer) {
      Synchronizer synchronizer = (Synchronizer) node;
      List<Transition> enteringTransitions = synchronizer.getEnteringTransitions();
      for (int i = 0; enteringTransitions != null
          && i < enteringTransitions.size(); i++) {
        Transition enteringTransition =  enteringTransitions.get(i);
        if (enteringTransition != null) {
          Node fromNode = enteringTransition.getFromNode();
View Full Code Here

        }
        List<Element> synchronizerElms = Util4JAXPParser.children(element, SYNCHRONIZER);
        Iterator<Element> iter = synchronizerElms.iterator();
        while (iter.hasNext()) {
            Element elm = iter.next();
            Synchronizer synchronizer = new Synchronizer(wp, elm.getAttribute(NAME));
            synchronizer.setSn(UUID.randomUUID().toString());
            synchronizer.setDescription(Util4JAXPParser.elementAsString(element,
                    DESCRIPTION));
            synchronizer.setDisplayName(element.getAttribute(DISPLAY_NAME));

            loadExtendedAttributes(synchronizer.getExtendedAttributes(),
                    Util4JAXPParser.child(elm, EXTENDED_ATTRIBUTES));

            synchronizers.add(synchronizer);
        }
    }
View Full Code Here

     */
    protected Loop createLoop(WorkflowProcess wp, Element loopElement)
            throws FPDLParserException {
        String fromNodeId = loopElement.getAttribute(FROM);
        String toNodeId = loopElement.getAttribute(TO);
        Synchronizer fromNode = (Synchronizer) wp.findWFElementById(fromNodeId);
        Synchronizer toNode = (Synchronizer) wp.findWFElementById(toNodeId);

        Loop loop = new Loop(wp,
                loopElement.getAttribute(NAME), fromNode,
                toNode);
        loop.setSn(UUID.randomUUID().toString());
View Full Code Here

TOP

Related Classes of org.fireflow.model.net.Synchronizer

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.