congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
org.jbpm.workflow.instance
Code IndexAdd Tabnine to your IDE (free)

How to use org.jbpm.workflow.instance

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

origin: kiegroup/jbpm

public NodeInstance getNodeInstance(long nodeInstanceId) {
  for (NodeInstance nodeInstance: nodeInstances) {
    if (nodeInstance.getId() == nodeInstanceId) {
      return nodeInstance;
    }
  }
  return null;
}
origin: kiegroup/jbpm

  private void throwWorkflowRuntimeException(NodeInstanceContainer nodeInstanceContainer, ProcessInstance processInstance, String msg, Exception e) { 
    if( nodeInstanceContainer instanceof NodeInstance ) { 
      throw new WorkflowRuntimeException((org.kie.api.runtime.process.NodeInstance) nodeInstanceContainer, processInstance, msg, e );
    } else {
      throw new WorkflowRuntimeException(null, processInstance, msg, e );
    }
  }
}
origin: kiegroup/jbpm

  @Override
  public void cancel() {
    getProcessInstance().removeEventListener(getEventType(), getEventListener(), true);
    ((NodeInstanceContainer) getNodeInstanceContainer()).removeNodeInstance(this);
  }
}
origin: kiegroup/jbpm

@Override
public void triggerCompleted() {
  getProcessInstance().removeEventListener(getEventType(), getEventListener(), true);
  ((org.jbpm.workflow.instance.NodeInstanceContainer)getNodeInstanceContainer()).setCurrentLevel(getLevel());
  ((org.jbpm.workflow.instance.NodeInstanceContainer) getNodeInstanceContainer()).removeNodeInstance(this);
  
  NodeInstance instance = ((org.jbpm.workflow.instance.NodeInstanceContainer) getNodeInstanceContainer()).getNodeInstance(getNode());
  
  triggerNodeInstance((org.jbpm.workflow.instance.NodeInstance) instance, NodeImpl.CONNECTION_DEFAULT_TYPE);
}
origin: kiegroup/jbpm

public NodeInstance getNodeInstance(long nodeInstanceId, boolean recursive) {
  for (NodeInstance nodeInstance: getNodeInstances(recursive)) {
    if (nodeInstance.getId() == nodeInstanceId) {
      return nodeInstance;
    }
  }
  return null;
}
origin: kiegroup/jbpm

public NodeInstance getNodeInstance(long nodeInstanceId, boolean recursive) {
  for (NodeInstance nodeInstance: getNodeInstances(recursive)) {
    if (nodeInstance.getId() == nodeInstanceId) {
      return nodeInstance;
    }
  }
  return null;
}
origin: kiegroup/jbpm

public void triggerCompleted(String outType) {
  boolean cancelRemainingInstances = getCompositeNode().isCancelRemainingInstances();
  ((org.jbpm.workflow.instance.NodeInstanceContainer)getNodeInstanceContainer()).setCurrentLevel(getLevel());
  triggerCompleted(outType, cancelRemainingInstances);
  if (cancelRemainingInstances) {
    while (!nodeInstances.isEmpty()) {
      NodeInstance nodeInstance = (NodeInstance) nodeInstances.get(0);
      ((org.jbpm.workflow.instance.NodeInstance) nodeInstance).cancel();
    }
  }
}
origin: kiegroup/jbpm

  public void triggerCompleted() {
    ((org.jbpm.workflow.instance.NodeInstanceContainer)getNodeInstanceContainer()).setCurrentLevel(getLevel());
    triggerCompleted(org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE, true);
  }
}
origin: kiegroup/jbpm

protected void addTimerListener() {
  ((WorkflowProcessInstance) getProcessInstance()).addEventListener("timerTriggered", this, false);
  ((WorkflowProcessInstance) getProcessInstance()).addEventListener("timer", this, true);
  ((WorkflowProcessInstance) getProcessInstance()).addEventListener("slaViolation:" + getId(), this, true);
}
origin: kiegroup/jbpm

public void removeEventListeners() {
  ((WorkflowProcessInstance) getProcessInstance()).removeEventListener("timerTriggered", this, false);
  ((WorkflowProcessInstance) getProcessInstance()).removeEventListener("timer", this, true);
  ((WorkflowProcessInstance) getProcessInstance()).removeEventListener("slaViolation:" + getId(), this, true);
}
origin: kiegroup/jbpm

private void addActivationListener() {
  getProcessInstance().addEventListener(getActivationType(), this, true);
}
origin: kiegroup/jbpm

public void addExceptionProcessListener() {
  if (exceptionHandlingProcessInstanceId > -1) {
    getProcessInstance().addEventListener("processInstanceCompleted:" + exceptionHandlingProcessInstanceId, this, true);
  }
}
origin: kiegroup/jbpm

protected String getActivationType() {
  return "RuleFlowStateEvent-" + this.getProcessInstance().getProcessId();
}
origin: kiegroup/jbpm

public boolean isResolveable(String name) {
  boolean found = nodeInstance.resolveContextInstance(VariableScope.VARIABLE_SCOPE, name) != null;
  if (!found) {
    return extraParameters.containsKey(name);
  }
  
  return found;
}

origin: kiegroup/jbpm

public WorkflowRuntimeException(NodeInstance nodeInstance, ProcessInstance processInstance, String message, Throwable e) {
  super(message, e);
  initialize(nodeInstance, processInstance);
}
origin: kiegroup/jbpm

public void setNodeInstanceContainer(NodeInstanceContainer nodeInstanceContainer) {
  this.nodeInstanceContainer = (org.jbpm.workflow.instance.NodeInstanceContainer) nodeInstanceContainer;
  if (nodeInstanceContainer != null) {
    this.nodeInstanceContainer.addNodeInstance(this);
  }
}
origin: kiegroup/jbpm

public NodeInstance getNodeInstance(long nodeInstanceId) {
  for (NodeInstance nodeInstance: nodeInstances) {
    if (nodeInstance.getId() == nodeInstanceId) {
      return nodeInstance;
    }
  }
  return null;
}
origin: kiegroup/jbpm

private void addWorkItemListener() {
  getProcessInstance().addEventListener("workItemCompleted", this, false);
  getProcessInstance().addEventListener("workItemAborted", this, false);
}
origin: kiegroup/jbpm

public WorkflowRuntimeException(NodeInstance nodeInstance, ProcessInstance processInstance, String message) {
  super(message);
  initialize(nodeInstance, processInstance);
}
origin: kiegroup/jbpm

public WorkflowRuntimeException(NodeInstance nodeInstance, ProcessInstance processInstance, Exception e) {
  super(e);
  initialize(nodeInstance, processInstance);
}
org.jbpm.workflow.instance

Most used classes

  • WorkflowProcessInstanceImpl
    Default implementation of a RuleFlow process instance.
  • WorkflowProcessInstance
  • NodeInstance
    Represents a node instance in a RuleFlow. This is the runtime counterpart of a node, containing all
  • SubProcessNodeInstance
    Runtime counterpart of a SubFlow node.
  • WorkItemNodeInstance
    Runtime counterpart of a work item node.
  • NodeInstanceFactoryRegistry,
  • NodeInstanceImpl,
  • WorkflowRuntimeException,
  • CreateNewNodeFactory,
  • ReuseNodeFactory,
  • DynamicUtils,
  • CompositeNodeInstance,
  • EventNodeInstance,
  • StateBasedNodeInstance,
  • TimerNodeInstance,
  • WorkflowProcessInstanceUpgrader,
  • NodeInstanceFactory,
  • CompositeContextNodeInstance,
  • DynamicNodeInstance
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now