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

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

Best Java code snippets using org.jbpm.workflow.core.Node.setMetaData (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 void setValue(Object value) {
  node.setMetaData(name, value);
}
public DataType getType() {
origin: kiegroup/jbpm

protected 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);
  node.setMetaData("Transaction", true);
}

origin: kiegroup/jbpm

private void postProcessNodeOffset(Node[] nodes, int xOffset, int yOffset) {
  for (Node node: nodes) {
    Integer x = (Integer) node.getMetaData().get("x");
    if (x != null) {
      ((org.jbpm.workflow.core.Node) node).setMetaData("x", x - xOffset);
    }
    Integer y = (Integer) node.getMetaData().get("y");
    if (y != null) {
      ((org.jbpm.workflow.core.Node) node).setMetaData("y", y - yOffset);
    }
    if (node instanceof NodeContainer) {
      postProcessNodeOffset(((NodeContainer) node).getNodes(), xOffset + (x == null ? 0 : x), yOffset + (y == null ? 0 : y));
    }
  }
}

origin: kiegroup/jbpm

if (x != null && x.length() != 0) {
  try {
    node.setMetaData("x", Integer.parseInt(x));
  } catch (NumberFormatException exc) {
    throw new SAXParseException("<" + localName + "> requires an Integer 'x' attribute", parser.getLocator());
if (y != null && y.length() != 0) {
  try {
    node.setMetaData("y", new Integer(y));
  } catch (NumberFormatException exc) {
    throw new SAXParseException("<" + localName + "> requires an Integer 'y' attribute", parser.getLocator());
if (width != null && width.length() != 0) {
  try {
    node.setMetaData("width", new Integer(width));
  } catch (NumberFormatException exc) {
    throw new SAXParseException("<" + localName + "> requires an Integer 'width' attribute", parser.getLocator());
if (height != null && height.length() != 0) {
  try {
    node.setMetaData("height", new Integer(height));
  } catch (NumberFormatException exc) {
    throw new SAXParseException("<" + localName + "> requires an Integer 'height' attribute", parser.getLocator());
origin: kiegroup/jbpm

  activityRef = "";
node.setMetaData("compensation-activityRef", activityRef);
origin: kiegroup/jbpm

if (x != null && x.length() != 0) {
  try {
    node.setMetaData("x", new Integer(x));
  } catch (NumberFormatException exc) {
    throw new SAXParseException("<" + localName + "> requires an Integer 'x' attribute", parser.getLocator());
if (y != null && y.length() != 0) {
  try {
    node.setMetaData("y", new Integer(y));
  } catch (NumberFormatException exc) {
    throw new SAXParseException("<" + localName + "> requires an Integer 'y' attribute", parser.getLocator());
if (width != null && width.length() != 0) {
  try {
    node.setMetaData("width", new Integer(width));
  } catch (NumberFormatException exc) {
    throw new SAXParseException("<" + localName + "> requires an Integer 'width' attribute", parser.getLocator());
if (height != null && height.length() != 0) {
  try {
    node.setMetaData("height", new Integer(height));
  } catch (NumberFormatException exc) {
    throw new SAXParseException("<" + localName + "> requires an Integer 'height' attribute", parser.getLocator());
if (color != null && color.length() != 0) {
  try {
    node.setMetaData("color", new Integer(color));
  } catch (NumberFormatException exc) {
    throw new SAXParseException("<" + localName + "> requires an Integer 'color' attribute", parser.getLocator());
origin: kiegroup/jbpm

public Object start(final String uri,
          final String localName,
          final Attributes attrs,
          final ExtensibleXmlParser parser) throws SAXException {
  parser.startElementBuilder(localName, attrs);
  final Node node = createNode(attrs);
  String id = attrs.getValue("id");
  node.setMetaData("UniqueId", id);
  final String name = attrs.getValue("name");
  node.setName(name);
  AtomicInteger idGen = (AtomicInteger) parser.getMetaData().get("idGen");
  node.setId(idGen.getAndIncrement());
  return node;
}
origin: kiegroup/jbpm

protected void applyAsync(Node node, boolean isAsync) {
  for (org.kie.api.definition.process.Node subNode: ((CompositeContextNode) node).getNodes()) {
    if (isAsync) {
      List<Connection> incoming = subNode.getIncomingConnections(NodeImpl.CONNECTION_DEFAULT_TYPE);
      if (incoming != null) {
        for (Connection con : incoming) {
          if (con.getFrom() instanceof StartNode) {
            ((Node)subNode).setMetaData("customAsync", Boolean.toString(isAsync));
            return;
          }
        }
      }
      
    }            
  }
}
origin: kiegroup/jbpm

private boolean processNodeInfo(NodeInfo nodeInfo, Node[] nodes) {
  if (nodeInfo == null || nodeInfo.getNodeRef() == null) {
    return false;
  }
  for (Node node: nodes) {
    String id = (String) node.getMetaData().get("UniqueId");
    if (nodeInfo.getNodeRef().equals(id)) {
      ((org.jbpm.workflow.core.Node) node).setMetaData("x", nodeInfo.getX());
      ((org.jbpm.workflow.core.Node) node).setMetaData("y", nodeInfo.getY());
      ((org.jbpm.workflow.core.Node) node).setMetaData("width", nodeInfo.getWidth());
      ((org.jbpm.workflow.core.Node) node).setMetaData("height", nodeInfo.getHeight());
      return true;
    }
    if (node instanceof NodeContainer) {
      boolean found = processNodeInfo(nodeInfo, ((NodeContainer) node).getNodes());
      if (found) {
        return true;
      }
    }
  }
  return false;
}

origin: kiegroup/jbpm

String id = element.getAttribute("id");
node.setMetaData("UniqueId", id);
node.setMetaData(LINK_NAME, name);
  if ("target".equals(nodeName)) {
    String target = xmlNode.getTextContent();
    node.setMetaData("target", target);
    aLink.setTarget(target);
    node.setMetaData("source", source);
    aLink.addSource(source);
origin: kiegroup/jbpm

node.setMetaData("UniqueId", id);
node.setMetaData(LINK_NAME, name);
    node.setMetaData(LINK_TARGET, target);
    node.setMetaData(LINK_SOURCE, sources);
origin: kiegroup/jbpm

super.handleNode(node, element, uri, localName, parser);
ActionNode actionNode = (ActionNode) node;
node.setMetaData("NodeType", "ScriptTask");
DroolsConsequenceAction action = (DroolsConsequenceAction) actionNode.getAction();
if (action == null) {
origin: kiegroup/jbpm

final Node node = createNode(attrs);
String id = attrs.getValue("id");
node.setMetaData("UniqueId", id);
final String name = attrs.getValue("name");
node.setName(name);
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 uniqueId = (String) node.getMetaData().get("UniqueId");
forEachNode.setMetaData("UniqueId", uniqueId);
node.setMetaData("UniqueId", uniqueId + ":" + uniqueIdGen++);
node.setMetaData("hidden", true);
forEachNode.addNode(node);
forEachNode.linkIncomingConnections(NodeImpl.CONNECTION_DEFAULT_TYPE, node.getId(), NodeImpl.CONNECTION_DEFAULT_TYPE);
Map<String, String> dataOutputs = (Map<String, String>) orignalNode.getMetaData().remove("DataOutputs");
orignalNode.setMetaData("MICollectionOutput", dataOutputs.get(((ForEachNode)node).getMetaData("MICollectionOutput")));
orignalNode.setMetaData("MICollectionInput", dataInputs.get(((ForEachNode)node).getMetaData("MICollectionInput")));
origin: kiegroup/jbpm

String uniqueId = (String) node.getMetaData().get("UniqueId");
forEachNode.setMetaData("UniqueId", uniqueId);
node.setMetaData("UniqueId", uniqueId + ":" + uniqueIdGen++);
forEachNode.addNode(node);
forEachNode.linkIncomingConnections(NodeImpl.CONNECTION_DEFAULT_TYPE, node.getId(), NodeImpl.CONNECTION_DEFAULT_TYPE);
origin: kiegroup/jbpm

private void addCompensationScope(final Node node, final org.kie.api.definition.process.NodeContainer parentContainer,
    final String compensationHandlerId) {
  ContextContainer contextContainer = (ContextContainer) parentContainer;
  CompensationScope scope = null;
  boolean addScope = false;
  if (contextContainer.getContexts(CompensationScope.COMPENSATION_SCOPE) == null) {
    addScope = true;
  } else {
    scope = (CompensationScope) contextContainer.getContexts(CompensationScope.COMPENSATION_SCOPE).get(0);
    if (scope == null) {
      addScope = true;
    }
  }
  if (addScope) {
    scope = new CompensationScope();
    contextContainer.addContext(scope);
    contextContainer.setDefaultContext(scope);
    scope.setContextContainer(contextContainer);
  }
  CompensationHandler handler = new CompensationHandler();
  handler.setNode(node);
  scope.setExceptionHandler(compensationHandlerId, handler);
  
  node.setMetaData("isForCompensation", Boolean.TRUE);
}
origin: org.jbpm/jbpm-flow-builder

public void setValue(Object value) {
  node.setMetaData(name, value);
}
public DataType getType() {
origin: org.jbpm/jbpm-bpmn2

protected 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);
  node.setMetaData("Transaction", true);
}

origin: org.jbpm/jbpm-case-mgmt-cmmn

public Object start(final String uri,
          final String localName,
          final Attributes attrs,
          final ExtensibleXmlParser parser) throws SAXException {
  parser.startElementBuilder(localName, attrs);
  final Node node = createNode(attrs);
  String id = attrs.getValue("id");
  node.setMetaData("UniqueId", id);
  final String name = attrs.getValue("name");
  node.setName(name);
  AtomicInteger idGen = (AtomicInteger) parser.getMetaData().get("idGen");
  node.setId(idGen.getAndIncrement());
  return node;
}
org.jbpm.workflow.coreNodesetMetaData

Popular methods of Node

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

Popular in Java

  • Creating JSON documents from java classes using gson
  • compareTo (BigDecimal)
  • getSystemService (Context)
  • findViewById (Activity)
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • BoxLayout (javax.swing)
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
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