Examples of Swimlane


Examples of org.drools.process.core.context.swimlane.Swimlane

      getRuleFlowProcess().getVariableScope().getVariables().add(variable);
        return this;
    }
   
    public RuleFlowProcessFactory swimlane(String name) {
      Swimlane swimlane = new Swimlane();
      swimlane.setName(name);
      getRuleFlowProcess().getSwimlaneContext().addSwimlane(swimlane);
      return this;
    }
View Full Code Here

Examples of org.drools.process.core.context.swimlane.Swimlane

      Map<String, String> laneMapping = new HashMap<String, String>();
      if (lanes != null) {
          for (Lane lane: lanes) {
              String name = lane.getName();
              if (name != null) {
                  Swimlane swimlane = new Swimlane();
                  swimlane.setName(name);
                  process.getSwimlaneContext().addSwimlane(swimlane);
                  laneNames.add(name);
                  for (String flowElementRef: lane.getFlowElements()) {
                      laneMapping.put(flowElementRef, name);
                  }
View Full Code Here

Examples of org.drools.process.core.context.swimlane.Swimlane

        list.add(20);
        variable.setValue(list);
        variables.add(variable);
        process.getVariableScope().setVariables(variables);
       
        Swimlane swimlane = new Swimlane();
        swimlane.setName("actor1");
        process.getSwimlaneContext().addSwimlane(swimlane);
        swimlane = new Swimlane();
        swimlane.setName("actor2");
        process.getSwimlaneContext().addSwimlane(swimlane);
       
        ActionExceptionHandler exceptionHandler = new ActionExceptionHandler();
        exceptionHandler.setFaultVariable("faultVariable");
        DroolsConsequenceAction action = new DroolsConsequenceAction("dialect", "consequence");
View Full Code Here

Examples of org.drools.process.core.context.swimlane.Swimlane

      getRuleFlowProcess().getVariableScope().getVariables().add(variable);
        return this;
    }
   
    public RuleFlowProcessFactory swimlane(String name) {
      Swimlane swimlane = new Swimlane();
      swimlane.setName(name);
      getRuleFlowProcess().getSwimlaneContext().addSwimlane(swimlane);
      return this;
    }
View Full Code Here

Examples of org.drools.process.core.context.swimlane.Swimlane

      Map<String, String> laneMapping = new HashMap<String, String>();
      if (lanes != null) {
          for (Lane lane: lanes) {
              String name = lane.getName();
              if (name != null) {
                  Swimlane swimlane = new Swimlane();
                  swimlane.setName(name);
                  process.getSwimlaneContext().addSwimlane(swimlane);
                  laneNames.add(name);
                  for (String flowElementRef: lane.getFlowElements()) {
                      laneMapping.put(flowElementRef, name);
                  }
View Full Code Here

Examples of org.drools.process.core.context.swimlane.Swimlane

                newNode.setTask(task);
                org.jbpm.taskmgmt.def.Swimlane jPDLswimlane = task.getSwimlane();
                if (jPDLswimlane != null) {
                    String swimlaneName = jPDLswimlane.getName();
                    if (swimlaneContext.getSwimlane(swimlaneName) == null) {
                        Swimlane swimlane = new Swimlane();
                        swimlane.setName(swimlaneName);
                        swimlane.setActorId(jPDLswimlane.getActorIdExpression());
                        // TODO support other types of actor expressions as well
                        swimlaneContext.addSwimlane(swimlane);
                    }
                }
            }
            node = newNode;
        } else if (jPDLnode instanceof org.jbpm.graph.node.EndState) {
            node = new EndState();
        } else if (org.jbpm.graph.def.Node.class.equals(jPDLnode.getClass())) {
            JpdlNode newNode = new JpdlNode();
            setDefaultNodeProperties(jPDLnode, newNode);
            node = newNode;
        } else if (jPDLnode instanceof org.jbpm.graph.node.Fork) {
            org.jbpm.graph.node.Fork jPDLfork =
                    (org.jbpm.graph.node.Fork) jPDLnode;
            Fork newNode = new Fork();
            newNode.setScript(jPDLfork.getScript());
            node = newNode;
        } else if (jPDLnode instanceof org.jbpm.graph.node.Join) {
            org.jbpm.graph.node.Join jPDLjoin =
                    (org.jbpm.graph.node.Join) jPDLnode;
            Join newNode = new Join();
            newNode.setDiscriminator(jPDLjoin.isDiscriminator());
            newNode.setTokenNames(jPDLjoin.getTokenNames());
            newNode.setScript(jPDLjoin.getScript());
            newNode.setNOutOfM(jPDLjoin.getNOutOfM());
            node = newNode;
        } else if (jPDLnode instanceof org.jbpm.graph.node.MailNode) {
            String config = jPDLnode.getAction().getActionDelegation().getConfiguration();

            MailNode newNode = new MailNode();
            Matcher matcher = MAIL_TEMPLATE_PATTERN.matcher(config);
            if (matcher.find()) {
                newNode.setTemplate(matcher.group(1));
            }
            matcher = MAIL_ACTORS_PATTERN.matcher(config);
            if (matcher.find()) {
                newNode.setActors(matcher.group(1));
            }
            matcher = MAIL_TO_PATTERN.matcher(config);
            if (matcher.find()) {
                newNode.setToEmail(matcher.group(1));
            }
            matcher = MAIL_SUBJECT_PATTERN.matcher(config);
            if (matcher.find()) {
                newNode.setSubject(matcher.group(1));
            }
            matcher = MAIL_TEXT_PATTERN.matcher(config);
            if (matcher.find()) {
                newNode.setText(matcher.group(1));
            }
            node = newNode;
        } else if (jPDLnode instanceof org.jbpm.graph.node.Decision) {
            org.jbpm.graph.node.Decision jPDLdecision =
                    (org.jbpm.graph.node.Decision) jPDLnode;
            Decision newNode = new Decision();
            newNode.setDecisionConditions(jPDLdecision.getDecisionConditions());
            // TODO: unable to access decisionDelegation
            // TODO: unable to access decisionExpression
            node = newNode;
        } else if (jPDLnode instanceof org.jbpm.graph.node.ProcessState) {
            org.jbpm.graph.node.ProcessState jPDLprocessState =
                    (org.jbpm.graph.node.ProcessState) jPDLnode;
            ProcessState newNode = new ProcessState();
            ProcessDefinition subProcessDefinition =
                    jPDLprocessState.getSubProcessDefinition();
            if (subProcessDefinition != null) {
                newNode.setSubProcessName(subProcessDefinition.getName());
                // TODO: parse sub process definition as well
            }
            // TODO: unable to access subProcessName
            // TODO: unable to access variableAccesses
            node = newNode;
        } else if (jPDLnode instanceof org.jbpm.graph.def.SuperState) {
            org.jbpm.graph.def.SuperState jPDLsuperState =
                    (org.jbpm.graph.def.SuperState) jPDLnode;
            SuperState newNode = new SuperState();
            List<org.jbpm.graph.def.Node> nodes = jPDLsuperState.getNodes();
            Map<org.jbpm.graph.def.Node, Node> mapping = new HashMap<org.jbpm.graph.def.Node, Node>();
            for (org.jbpm.graph.def.Node nodeInsideSuperState : nodes) {
                JpdlNode nodeToAdd = classifyNode(processDefinition, nodeInsideSuperState, swimlaneContext);
                if (nodeToAdd == null) {
                    throw new IllegalArgumentException(
                            "Unknown node type: " + jPDLnode.getClass().getName() + " " + jPDLnode);
                }
                setDefaultNodeProperties(nodeInsideSuperState, (JpdlNode) nodeToAdd);
                nodeToAdd.setId(++nodeId);
                mapping.put(nodeInsideSuperState, nodeToAdd);
                newNode.addNode(nodeToAdd);
            }
            generateConnections(mapping);
            node = newNode;
        } else if (jPDLnode instanceof org.jbpm.graph.node.TaskNode) {
            org.jbpm.graph.node.TaskNode jPDLtaskNode =
                    (org.jbpm.graph.node.TaskNode) jPDLnode;
            TaskNode newNode = new TaskNode();
            Set<Task> tasks = jPDLtaskNode.getTasks();
            newNode.setTasks(tasks);
            newNode.setSignal(jPDLtaskNode.getSignal());
            newNode.setCreateTasks(jPDLtaskNode.getCreateTasks());
            newNode.setEndTasks(jPDLtaskNode.isEndTasks());
            for (Task task : tasks) {
                org.jbpm.taskmgmt.def.Swimlane jPDLswimlane = task.getSwimlane();
                if (jPDLswimlane != null) {
                    String swimlaneName = jPDLswimlane.getName();
                    if (swimlaneContext.getSwimlane(swimlaneName) == null) {
                        Swimlane swimlane = new Swimlane();
                        swimlane.setName(swimlaneName);
                        swimlane.setActorId(jPDLswimlane.getActorIdExpression());
                        // TODO support other types of actor expressions as well
                        swimlaneContext.addSwimlane(swimlane);
                    }
                }
            }
View Full Code Here

Examples of org.drools.process.core.context.swimlane.Swimlane

        list.add(20);
        variable.setValue(list);
        variables.add(variable);
        process.getVariableScope().setVariables(variables);
       
        Swimlane swimlane = new Swimlane();
        swimlane.setName("actor1");
        process.getSwimlaneContext().addSwimlane(swimlane);
        swimlane = new Swimlane();
        swimlane.setName("actor2");
        process.getSwimlaneContext().addSwimlane(swimlane);
       
        ActionExceptionHandler exceptionHandler = new ActionExceptionHandler();
        exceptionHandler.setFaultVariable("faultVariable");
        DroolsConsequenceAction action = new DroolsConsequenceAction("dialect", "consequence");
View Full Code Here

Examples of org.drools.process.core.context.swimlane.Swimlane

        emptyAttributeCheck(localName, "name", name, parser);
       
        SwimlaneContext swimlaneContext = (SwimlaneContext)
            process.getDefaultContext(SwimlaneContext.SWIMLANE_SCOPE);
        if (swimlaneContext != null) {
            Swimlane swimlane = new Swimlane();
            swimlane.setName(name);
            swimlaneContext.addSwimlane(swimlane);
        } else {
            throw new SAXParseException(
                "Could not find default swimlane context.", parser.getLocator());
        }
View Full Code Here

Examples of org.jbpm.process.core.context.swimlane.Swimlane

        list.add(20);
        variable.setValue(list);
        variables.add(variable);
        process.getVariableScope().setVariables(variables);
       
        Swimlane swimlane = new Swimlane();
        swimlane.setName("actor1");
        process.getSwimlaneContext().addSwimlane(swimlane);
        swimlane = new Swimlane();
        swimlane.setName("actor2");
        process.getSwimlaneContext().addSwimlane(swimlane);
       
        ActionExceptionHandler exceptionHandler = new ActionExceptionHandler();
        exceptionHandler.setFaultVariable("faultVariable");
        DroolsConsequenceAction action = new DroolsConsequenceAction("dialect", "consequence");
View Full Code Here

Examples of org.jbpm.process.core.context.swimlane.Swimlane

        emptyAttributeCheck(localName, "name", name, parser);
       
        SwimlaneContext swimlaneContext = (SwimlaneContext)
            process.getDefaultContext(SwimlaneContext.SWIMLANE_SCOPE);
        if (swimlaneContext != null) {
            Swimlane swimlane = new Swimlane();
            swimlane.setName(name);
            swimlaneContext.addSwimlane(swimlane);
        } else {
            throw new SAXParseException(
                "Could not find default swimlane context.", parser.getLocator());
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.