Examples of StateNode


Examples of io.fathom.cloud.state.StateStore.StateNode

        return new NumberedItemCollection<GroupData>(domain, GroupData.newBuilder(), ProjectData.getDescriptor()
                .findFieldByNumber(GroupData.ID_FIELD_NUMBER));
    }

    public NumberedItemCollection<UserData> getUsers() {
        StateNode node = stateStore.getRoot("users");

        return new NumberedItemCollection<UserData>(node, UserData.newBuilder(), UserData.getDescriptor()
                .findFieldByNumber(UserData.ID_FIELD_NUMBER));
    }
View Full Code Here

Examples of org.apache.twill.internal.state.StateNode

                               JsonDeserializationContext context) throws JsonParseException {
    JsonObject jsonObj = json.getAsJsonObject();
    ServiceController.State state = ServiceController.State.valueOf(jsonObj.get("state").getAsString());
    String errorMessage = jsonObj.has("errorMessage") ? jsonObj.get("errorMessage").getAsString() : null;

    return new StateNode(state, errorMessage,
                         context.<StackTraceElement[]>deserialize(jsonObj.get("stackTraces"),
                                                                  StackTraceElement[].class));
  }
View Full Code Here

Examples of org.aperteworkflow.bpm.graph.StateNode

                        if (firstTransition != null) {
                            res.add(firstTransition);
                        }
                    }
                  
                    StateNode sn = (StateNode) processGraphElements.get(activityName);
                   
                  
                   
                    ArrayList<StateNode> arrayList = new ArrayList<StateNode>();
                    Collection<GraphElement> values = processGraphElements.values();
                    for (GraphElement graphElement : values) {
            if(graphElement instanceof StateNode){
              arrayList.add((StateNode) graphElement);
            }
                     
                     
          }
                    if (sn == null) continue;
                    sn = sn.cloneNode();
                    sn.setUnfinished(activity.getEndTime() == null);
                    sn.setLabel(activityName + ": " + hpi.getDuration() + "ms");
                    res.add(sn);
                    //look for transition
                    TransitionArc ta = (TransitionArc) processGraphElements.get(activityName + "_" + activity.getTransitionName());
                    if (ta == null) { //look for default!
                        ta = (TransitionArc) processGraphElements.get("__AWF__default_transition_" + activityName);
                    }
                    if (ta == null) {
                        continue;
                    }
                   
           
                   
                 
                   
                    res.add(ta.cloneNode());
                } else {
                    loger.severe("Unsupported entry: " + hpi);
                }
            }
           
           addJoinAndForkElements(res,processGraphElements);
           
           
            HistoryProcessInstanceQuery historyProcessInstanceQuery = processEngine.getHistoryService()
                    .createHistoryProcessInstanceQuery().processInstanceId(pi.getInternalId());
            HistoryProcessInstance historyProcessInstance = historyProcessInstanceQuery.uniqueResult();
            if (historyProcessInstance != null && historyProcessInstance.getEndActivityName() != null) {
                StateNode sn = (StateNode) processGraphElements.get(historyProcessInstance.getEndActivityName());
                if (sn != null) {
                    StateNode e = sn.cloneNode();
                    e.setUnfinished(true);
                    res.add(e);
                }
            }
           
           
View Full Code Here

Examples of org.drools.workflow.core.node.StateNode

import org.xml.sax.SAXException;

public class StateNodeHandler extends AbstractNodeHandler {

    protected Node createNode() {
        return new StateNode();
    }
View Full Code Here

Examples of org.drools.workflow.core.node.StateNode

    public void handleNode(final Node node, final Element element, final String uri,
            final String localName, final ExtensibleXmlParser parser)
            throws SAXException {
        super.handleNode(node, element, uri, localName, parser);
        StateNode stateNode = (StateNode) node;
        for (String eventType: stateNode.getActionTypes()) {
          handleAction(stateNode, element, eventType);
        }
    }
View Full Code Here

Examples of org.drools.workflow.core.node.StateNode

          handleAction(stateNode, element, eventType);
        }
    }
   
    public void writeNode(Node node, StringBuilder xmlDump, boolean includeMeta) {
    StateNode stateNode = (StateNode) node;
    writeNode("state", stateNode, xmlDump, includeMeta);
        xmlDump.append(">\n");
      for (String eventType: stateNode.getActionTypes()) {
          writeActions(eventType, stateNode.getActions(eventType), xmlDump);
        }
        writeTimers(stateNode.getTimers(), xmlDump);
        if (!stateNode.getConstraints().isEmpty()) {
          xmlDump.append("      <constraints>" + EOL);
          for (Map.Entry<ConnectionRef, Constraint> entry: stateNode.getConstraints().entrySet()) {
              ConnectionRef connection = entry.getKey();
              Constraint constraint = entry.getValue();
              xmlDump.append("        <constraint "
                  + "toNodeId=\"" + connection.getNodeId() + "\" ");
              String name = constraint.getName();
View Full Code Here

Examples of org.drools.workflow.core.node.StateNode

  public Class generateNodeFor() {
        return StateNode.class;
    }

  public void writeNode(Node node, StringBuilder xmlDump, boolean includeMeta) {
      StateNode stateNode = (StateNode) node;
    String condition = (String) stateNode.getMetaData("Condition");
    writeNode("intermediateCatchEvent", stateNode, xmlDump, includeMeta);
    xmlDump.append(">" + EOL);
        xmlDump.append("      <conditionalEventDefinition>" + EOL);
        xmlDump.append("        <condition xs:type=\"tFormalExpression\" language=\"" + XmlBPMNProcessDumper.RULE_LANGUAGE + "\">" + XmlDumper.replaceIllegalChars(condition) + "</condition>" + EOL);
        xmlDump.append("      </conditionalEventDefinition>" + EOL);
View Full Code Here

Examples of org.drools.workflow.core.node.StateNode

  }
 
    private void postProcessNodes(NodeContainer container) {
        for (Node node: container.getNodes()) {
            if (node instanceof StateNode) {
                StateNode stateNode = (StateNode) node;
                String condition = (String) stateNode.getMetaData().get("Condition");
                Constraint constraint = new ConstraintImpl();
                constraint.setConstraint(condition);
                constraint.setType("rule");
                for (org.drools.definition.process.Connection connection: stateNode.getDefaultOutgoingConnections()) {
                    stateNode.setConstraint(connection, constraint);
                }
            } else if (node instanceof NodeContainer) {
                postProcessNodes((NodeContainer) node);
            }
        }
View Full Code Here

Examples of org.drools.workflow.core.node.StateNode

                node = timerNode;
                handleTimerNode(node, element, uri, localName, parser);
                break;
            } else if ("conditionalEventDefinition".equals(nodeName)) {
                // create new stateNode
                StateNode stateNode = new StateNode();
                stateNode.setId(node.getId());
                stateNode.setName(node.getName());
                stateNode.setMetaData("UniqueId", node.getMetaData().get("UniqueId"));
                node = stateNode;
                handleStateNode(node, element, uri, localName, parser);
                break;
            }
            xmlNode = xmlNode.getNextSibling();
View Full Code Here

Examples of org.drools.workflow.core.node.StateNode

    }
   
    protected void handleStateNode(final Node node, final Element element, final String uri,
            final String localName, final ExtensibleXmlParser parser) throws SAXException {
        super.handleNode(node, element, uri, localName, parser);
        StateNode stateNode = (StateNode) node;
        org.w3c.dom.Node xmlNode = element.getFirstChild();
        while (xmlNode != null) {
            String nodeName = xmlNode.getNodeName();
            if ("conditionalEventDefinition".equals(nodeName)) {
                org.w3c.dom.Node subNode = xmlNode.getFirstChild();
                while (subNode != null) {
                    String subnodeName = subNode.getNodeName();
                    if ("condition".equals(subnodeName)) {
                        stateNode.setMetaData("Condition", xmlNode.getTextContent());
                        break;
                    }
                    subNode = subNode.getNextSibling();
                }
            }
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.