Codota Logo
Node.getMetaData
Code IndexAdd Codota to your IDE (free)

How to use
getMetaData
method
in
org.jbpm.workflow.core.Node

Best Java code snippets using org.jbpm.workflow.core.Node.getMetaData (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: kiegroup/jbpm

public Object getValue() {
  return node.getMetaData().get(name);
}
public void setValue(Object value) {
origin: kiegroup/jbpm

protected Map<String, Object> getMetaData(Node node) {
  return XmlBPMNProcessDumper.getMetaData(node.getMetaData());
}
origin: kiegroup/jbpm

protected void writeNode(final String name, final Node node, final StringBuilder xmlDump, final boolean includeMeta) {
  xmlDump.append("    <" + name + " id=\"" + node.getId() + "\" "); 
  if (node.getName() != null) {
    xmlDump.append("name=\"" + XmlDumper.replaceIllegalChars(node.getName()) + "\" ");
  }
  if (includeMeta) {
    Integer x = (Integer) node.getMetaData().get("x");
    Integer y = (Integer) node.getMetaData().get("y");
    Integer width = (Integer) node.getMetaData().get("width");
    Integer height = (Integer) node.getMetaData().get("height");
    Integer color = (Integer) node.getMetaData().get("color");
    if (x != null && x != 0) {
      xmlDump.append("x=\"" + x + "\" ");
    }
    if (y != null && y != 0) {
      xmlDump.append("y=\"" + y + "\" ");
    }
    if (width != null && width != -1) {
      xmlDump.append("width=\"" + width + "\" ");
    }
    if (height != null && height != -1) {
      xmlDump.append("height=\"" + height + "\" ");
    }
    if (color != null && color != 0) {
      xmlDump.append("color=\"" + color + "\" ");
    }
  }
}

origin: kiegroup/jbpm

protected void writeNode(final String name, final Node node,
             final StringBuilder xmlDump, int metaDataType) {
  xmlDump.append("    <" + name + " ");
  xmlDump.append("id=\"" + XmlBPMNProcessDumper.getUniqueNodeId(node) + "\" ");
  if (node.getName() != null) {
    xmlDump.append("name=\"" + XmlBPMNProcessDumper.replaceIllegalCharsAttribute(node.getName()) + "\" ");
  }
  if (metaDataType == XmlBPMNProcessDumper.META_DATA_AS_NODE_PROPERTY) {
    Integer x = (Integer) node.getMetaData().get("x");
    Integer y = (Integer) node.getMetaData().get("y");
    Integer width = (Integer) node.getMetaData().get("width");
    Integer height = (Integer) node.getMetaData().get("height");
    if (x != null && x != 0) {
      xmlDump.append("g:x=\"" + x + "\" ");
    }
    if (y != null && y != 0) {
      xmlDump.append("g:y=\"" + y + "\" ");
    }
    if (width != null && width != -1) {
      xmlDump.append("g:width=\"" + width + "\" ");
    }
    if (height != null && height != -1) {
      xmlDump.append("g:height=\"" + height + "\" ");
    }
  }
}
origin: kiegroup/jbpm

@Override
public void writeNode(Node node, StringBuilder xmlDump, int metaDataType) {
  CatchLinkNode linkNode = (CatchLinkNode) node;
  writeNode("intermediateCatchEvent", linkNode, xmlDump, metaDataType);
  xmlDump.append(">" + EOL);
  writeExtensionElements(linkNode, xmlDump);
  String name = (String) node.getMetaData().get(
      IntermediateCatchEventHandler.LINK_NAME);
  xmlDump.append("<linkEventDefinition name=\"" + name + "\" >" + EOL);
  Object target = linkNode.getMetaData("target");
  if (null != target) {
    xmlDump.append(String.format("<target>%s</target>", target) + EOL);
  }
  xmlDump.append("</linkEventDefinition>" + EOL);
  endNode("intermediateCatchEvent", xmlDump);
}
origin: kiegroup/jbpm

String nodeId = (String) node.getMetaData().get("UniqueId");
String waitForCompletionString = ((Element) xmlNode).getAttribute("waitForCompletion");
boolean waitForCompletion = true;
origin: kiegroup/jbpm

protected void visitConnectionsAndAssociations(Node node, StringBuilder xmlDump, int metaDataType) {
  // add associations
  List<Connection> connections = getSubConnections((CompositeNode) node);
  xmlDump.append("    <!-- connections -->" + EOL);
  for (Connection connection: connections) {
    XmlBPMNProcessDumper.INSTANCE.visitConnection(connection, xmlDump, metaDataType);
  }
  // add associations
  List<Association> associations = (List<Association>) node.getMetaData().get(ProcessHandler.ASSOCIATIONS);
  if( associations != null ) {   
    for (Association association : associations ) {
      XmlBPMNProcessDumper.INSTANCE.visitAssociation(association, xmlDump);
    }
  }
}

origin: kiegroup/jbpm

  @Override
  public void writeNode(Node node, StringBuilder xmlDump, int metaDataType) {

    ThrowLinkNode linkNode = (ThrowLinkNode) node;

    writeNode("intermediateThrowEvent", linkNode, xmlDump, metaDataType);
    xmlDump.append(">" + EOL);
    writeExtensionElements(node, xmlDump);
    
    String name = (String) node.getMetaData().get(
        IntermediateThrowEventHandler.LINK_NAME);

    xmlDump.append("<linkEventDefinition name=\"" + name + "\" >" + EOL);

    List<String> sources = (List<String>) linkNode
        .getMetaData(IntermediateThrowEventHandler.LINK_SOURCE);

    if (null != sources) {
      for (String s : sources) {
        xmlDump.append(String.format("<source>%s</source>", s) + EOL);
      }
    }
    xmlDump.append("</linkEventDefinition>" + EOL);

    endNode("intermediateThrowEvent", xmlDump);

  }
}
origin: kiegroup/jbpm

public Map<String, Object> getMetaData() {
  if (parent instanceof Node) {
    return ((Node) parent).getMetaData();
  } else if (parent instanceof RuleFlowProcess) {
    return ((RuleFlowProcess) parent).getMetaData();
  } else if (parent instanceof Variable) {
    return ((Variable) parent).getMetaData();
  } else if (parent instanceof SequenceFlow) {
    return ((SequenceFlow) parent).getMetaData();
  } else if(parent instanceof Lane) {
    return ((Lane) parent).getMetaData();
  } else {
    throw new IllegalArgumentException("Unknown parent " + parent);
  }
}
public DataType getType() {
origin: kiegroup/jbpm

public void writeNode(Node node, StringBuilder xmlDump, int metaDataType) {
  CompositeContextNode compositeNode = (CompositeContextNode) node;
  String nodeType = "subProcess";
  if (node.getMetaData().get("Transaction") != null) {
    nodeType = "transaction";
origin: kiegroup/jbpm

@Test
public void testNestedCompensationBoundaryEventSpecific() throws Exception {
  String processId = "org.jbpm.process.compensation.boundary.nested";
  String[] workItemNames = { "Don-Quixote", "Sancho", "Ricote" };
  List<String> eventList = new ArrayList<String>();
  RuleFlowProcess process = createNestedCompensationBoundaryEventProcess(processId, workItemNames, eventList);
  // run process
  ksession = createKieSession(process);
  Node compensatedNode = findNode(process, "work-comp-1");
  String compensationEvent = (String) compensatedNode.getMetaData().get("UniqueId");
  
  runCompensationBoundaryEventSpecificTest(ksession, process, processId, workItemNames, eventList, compensationEvent);
}

origin: kiegroup/jbpm

@Test
public void testCompensationBoundaryEventSpecific() throws Exception {
  String processId = "org.jbpm.process.compensation.boundary";
  String[] workItemNames = { "Don-Quixote", "Sancho", "Ricote" };
  List<String> eventList = new ArrayList<String>();
  RuleFlowProcess process = createCompensationBoundaryEventProcess(processId, workItemNames, eventList);
  // run process
  ksession = createKieSession(process);
  Node compensatedNode = findNode(process, "work1");
  String compensationEvent = (String) compensatedNode.getMetaData().get("UniqueId");
  
  runCompensationBoundaryEventSpecificTest(ksession, process, processId, workItemNames, eventList, compensationEvent);
}
origin: kiegroup/jbpm

String uniqueId = (String) node.getMetaData().get("UniqueId");
forEachNode.setMetaData("UniqueId", uniqueId);
node.setMetaData("UniqueId", uniqueId + ":" + uniqueIdGen++);
Map<String, String> dataInputs = (Map<String, String>) orignalNode.getMetaData().remove("DataInputs");
Map<String, String> dataOutputs = (Map<String, String>) orignalNode.getMetaData().remove("DataOutputs");
origin: kiegroup/jbpm

@Test
public void testNestedCompensationEventSubProcessGeneral() throws Exception {
  String processId = "org.jbpm.process.compensation.event.subprocess.general";
  String[] workItemNames = { "apple", "banana", "orange" };
  List<String> eventList = new ArrayList<String>();
  RuleFlowProcess process = createNestedCompensationEventSubProcessProcess(processId, workItemNames, eventList);
  Node toCompensateNode = findNode(process, "sub0");
  String compensationEvent = CompensationScope.IMPLICIT_COMPENSATION_PREFIX + toCompensateNode.getMetaData().get("UniqueId");
  ksession = createKieSession(process);
  
  runCompensationEventSubProcessGeneralTest(ksession, process, processId, workItemNames, eventList, compensationEvent);
}
origin: kiegroup/jbpm

@Test
public void testNestedCompensationEventSubProcessSpecific() throws Exception {
  String processId = "org.jbpm.process.compensation.event.nested.subprocess";
  String[] workItemNames = { "kwik", "kwek", "kwak" };
  List<String> eventList = new ArrayList<String>();
  RuleFlowProcess process = createNestedCompensationEventSubProcessProcess(processId, workItemNames, eventList);
  
  Node toCompensateNode = findNode(process, "sub1");
  String compensationEvent = (String) toCompensateNode.getMetaData().get("UniqueId");
  
  ksession = createKieSession(process);
  
  runCompensationEventSubProcessSpecificTest(ksession, process, processId, workItemNames, eventList, compensationEvent);
}

origin: kiegroup/jbpm

@Test
public void testCompensationEventSubProcessSpecific() throws Exception {
  String processId = "org.jbpm.process.compensation.event.subprocess";
  String[] workItemNames = { "kwik", "kwek", "kwak" };
  List<String> eventList = new ArrayList<String>();
  RuleFlowProcess process = createCompensationEventSubProcessProcess(processId, workItemNames, eventList);
  Node toCompensateNode = findNode(process, "sub0");
  String compensationEvent = (String) toCompensateNode.getMetaData().get("UniqueId");
  
  // run process
  ksession = createKieSession(process);
  runCompensationEventSubProcessSpecificTest(ksession, process, processId, workItemNames, eventList, compensationEvent); 
}
origin: kiegroup/jbpm

@Test
public void testNestedCompensationBoundaryEventGeneral() throws Exception {
  String processId = "org.jbpm.process.compensation.boundary.general.nested";
  String[] workItemNames = { "Jip", "Janneke", "Takkie" };
  List<String> eventList = new ArrayList<String>();
  RuleFlowProcess process = createNestedCompensationBoundaryEventProcess(processId, workItemNames, eventList);
  // run process
  ksession = createKieSession(process);
  
  Node toCompensateNode = findNode(process, "sub2");
  String compensationEvent = CompensationScope.IMPLICIT_COMPENSATION_PREFIX 
      + (String) toCompensateNode.getMetaData().get("UniqueId");
  runCompensationBoundaryEventGeneralTest(ksession, process, processId, workItemNames, eventList, compensationEvent);
}

origin: kiegroup/jbpm

public Object end(final String uri,
         final String localName,
         final ExtensibleXmlParser parser) throws SAXException {
  final Element element = parser.endElementBuilder();
  Node node = (Node) parser.getCurrent();
  ProcessBuildData buildData = (ProcessBuildData) parser.getData();
  Map<String, PlanItem> planItems = (Map<String, PlanItem>) buildData.getMetaData("PlanItems");
  PlanItem planItem = planItems.get(node.getMetaData().get("UniqueId"));
  if (planItem != null && planItem.getEntryCriterion() != null) {
    if ("autostart".equalsIgnoreCase(planItem.getEntryCriterion().getExpression())) {
      node.setMetaData("customAutoStart", "true");
    } else {
      node.setMetaData("customActivationExpression", planItem.getEntryCriterion().getExpression());
      node.setMetaData("customActivationFragmentName", node.getName());
    }
  }
  handleNode(node, element, uri, localName, parser);
  NodeContainer nodeContainer = (NodeContainer) parser.getParent();
  nodeContainer.addNode(node);
  ((ProcessBuildData) parser.getData()).addNode(node);
  return node;
}
origin: kiegroup/jbpm

String nodeName = xmlNode.getNodeName();
 if ("multiInstanceLoopCharacteristics".equals(nodeName)) {
  Boolean isAsync = Boolean.parseBoolean((String)node.getMetaData().get("customAsync"));
origin: kiegroup/jbpm

String attachedTo = (String) attachedToNode.getMetaData().get("UniqueId");
boundaryNode.setMetaData("AttachedTo", attachedTo);
boundaryNode.setAttachedToNodeId(attachedTo);
org.jbpm.workflow.coreNodegetMetaData

Popular methods of Node

  • setId
    Method for setting the id of the node
  • setName
    Method for setting the name of the node
  • getName
  • setMetaData
  • getId
  • getUniqueId
  • addIncomingConnection
  • addOutgoingConnection
  • getNodeContainer
  • removeIncomingConnection
  • removeOutgoingConnection
  • setNodeContainer
  • removeOutgoingConnection,
  • setNodeContainer

Popular in Java

  • Finding current android device location
  • findViewById (Activity)
  • getApplicationContext (Context)
  • putExtra (Intent)
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • IsNull (org.hamcrest.core)
    Is the value null?
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now