Tabnine Logo
NodeInstance.resolveContextInstance
Code IndexAdd Tabnine to your IDE (free)

How to use
resolveContextInstance
method
in
org.jbpm.workflow.instance.NodeInstance

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

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 VariableResolver getVariableResolver(String name) {
  if (extraParameters.containsKey(name)) {
    return new SimpleValueResolver(extraParameters.get(name));
  }
  
  Object value = ((VariableScopeInstance)
    nodeInstance.resolveContextInstance(
        VariableScope.VARIABLE_SCOPE, name)).getVariable(name);
  return new SimpleValueResolver(value);
}

origin: kiegroup/jbpm

if (replacements.get(paramName) == null) {
  VariableScopeInstance variableScopeInstance = (VariableScopeInstance)
      ((org.jbpm.workflow.instance.NodeInstance)nodeInstance).resolveContextInstance(VariableScope.VARIABLE_SCOPE, paramName);
  if (variableScopeInstance != null) {
    Object variableValue = variableScopeInstance.getVariable(paramName);
origin: kiegroup/jbpm

public void internalTrigger(org.kie.api.runtime.process.NodeInstance fromm, String type) {
  String collectionExpression = getForEachNode().getCollectionExpression();
  Collection<?> collection = evaluateCollectionExpression(collectionExpression);
  ((NodeInstanceContainer) getNodeInstanceContainer()).removeNodeInstance(this);
  if (collection.isEmpty()) {
    ForEachNodeInstance.this.triggerCompleted(org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE, true);
  } else {
    List<NodeInstance> nodeInstances = new ArrayList<NodeInstance>();
    for (Object o: collection) {
      String variableName = getForEachNode().getVariableName();
      NodeInstance nodeInstance = (NodeInstance)
      ((NodeInstanceContainer) getNodeInstanceContainer()).getNodeInstance(getForEachSplitNode().getTo().getTo());
      VariableScopeInstance variableScopeInstance = (VariableScopeInstance)
        nodeInstance.resolveContextInstance(VariableScope.VARIABLE_SCOPE, variableName);
      variableScopeInstance.setVariable(variableName, o);
      nodeInstances.add(nodeInstance);
    }
    for (NodeInstance nodeInstance: nodeInstances) {
      logger.debug( "Triggering [{}] in multi-instance loop.", ((NodeInstanceImpl) nodeInstance).getNodeId() );
      ((org.jbpm.workflow.instance.NodeInstance) nodeInstance).trigger(this, getForEachSplitNode().getTo().getToType());
    }
    if (!getForEachNode().isWaitForCompletion()) {
      ForEachNodeInstance.this.triggerCompleted(org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE, false);
    }
  }
}
origin: org.jbpm/jbpm-flow

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

origin: org.jbpm/jbpm-flow

public VariableResolver getVariableResolver(String name) {
  if (extraParameters.containsKey(name)) {
    return new SimpleValueResolver(extraParameters.get(name));
  }
  
  Object value = ((VariableScopeInstance)
    nodeInstance.resolveContextInstance(
        VariableScope.VARIABLE_SCOPE, name)).getVariable(name);
  return new SimpleValueResolver(value);
}

origin: org.jbpm/jbpm-flow

if (replacements.get(paramName) == null) {
  VariableScopeInstance variableScopeInstance = (VariableScopeInstance)
      ((org.jbpm.workflow.instance.NodeInstance)nodeInstance).resolveContextInstance(VariableScope.VARIABLE_SCOPE, paramName);
  if (variableScopeInstance != null) {
    Object variableValue = variableScopeInstance.getVariable(paramName);
origin: org.jbpm/jbpm-executor

@Override
public Boolean execute(Context context) {
  KieSession ksession = ((RegistryContext) context).lookup( KieSession.class );
  WorkflowProcessInstance processInstance = (WorkflowProcessInstance) ksession.getProcessInstance(processInstanceId);        
  NodeInstance nodeInstance = getNodeInstance(workItem, processInstance);
  Throwable actualException = exception;
  if (actualException instanceof AsyncJobException) {
    actualException = exception.getCause();
  }
  String exceptionName = actualException.getClass().getName();
  ExceptionScopeInstance exceptionScopeInstance = (ExceptionScopeInstance)
    ((org.jbpm.workflow.instance.NodeInstance)nodeInstance).resolveContextInstance(ExceptionScope.EXCEPTION_SCOPE, exceptionName);
  if (exceptionScopeInstance != null) {
    logger.debug("Handling job error '{}' via process error handling", actualException.getMessage());
    exceptionScopeInstance.handleException(exceptionName, actualException);
    
    return true;
  } else {
    logger.debug("No process level error handling for '{}' letting it to be handled by execution errors", exception.getMessage());
    errorHandler.processing(nodeInstance);
    
    return false;
  }
  
}
origin: org.jbpm/jbpm-flow

public void internalTrigger(org.kie.api.runtime.process.NodeInstance fromm, String type) {
  String collectionExpression = getForEachNode().getCollectionExpression();
  Collection<?> collection = evaluateCollectionExpression(collectionExpression);
  ((NodeInstanceContainer) getNodeInstanceContainer()).removeNodeInstance(this);
  if (collection.isEmpty()) {
    ForEachNodeInstance.this.triggerCompleted(org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE, true);
  } else {
    List<NodeInstance> nodeInstances = new ArrayList<NodeInstance>();
    for (Object o: collection) {
      String variableName = getForEachNode().getVariableName();
      NodeInstance nodeInstance = (NodeInstance)
      ((NodeInstanceContainer) getNodeInstanceContainer()).getNodeInstance(getForEachSplitNode().getTo().getTo());
      VariableScopeInstance variableScopeInstance = (VariableScopeInstance)
        nodeInstance.resolveContextInstance(VariableScope.VARIABLE_SCOPE, variableName);
      variableScopeInstance.setVariable(variableName, o);
      nodeInstances.add(nodeInstance);
    }
    for (NodeInstance nodeInstance: nodeInstances) {
      logger.debug( "Triggering [{}] in multi-instance loop.", ((NodeInstanceImpl) nodeInstance).getNodeId() );
      ((org.jbpm.workflow.instance.NodeInstance) nodeInstance).trigger(this, getForEachSplitNode().getTo().getToType());
    }
    if (!getForEachNode().isWaitForCompletion()) {
      ForEachNodeInstance.this.triggerCompleted(org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE, false);
    }
  }
}
org.jbpm.workflow.instanceNodeInstanceresolveContextInstance

Popular methods of NodeInstance

  • getId
  • getSlaCompliance
  • getNode
  • trigger
  • cancel
  • getLevel
  • getNodeId
  • getNodeInstanceContainer
  • getNodeName
  • getProcessInstance
  • getSlaDueDate
  • getSlaTimerId
  • getSlaDueDate,
  • getSlaTimerId,
  • setDynamicParameters

Popular in Java

  • Finding current android device location
  • onCreateOptionsMenu (Activity)
  • getExternalFilesDir (Context)
  • requestLocationUpdates (LocationManager)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • String (java.lang)
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Top Sublime Text plugins
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