Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.0.0.CR5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.kie.api.runtime.process
Interface ProcessContext

All Superinterfaces:
  KieContext

    public interface ProcessContext

extends KieContext

Represents the context when executing a process.

Method Summary
`NodeInstance` | `getNodeInstance()` Returns the node instance that is currently being executed in this context, or `null if no node instance is currently being executed.`
`ProcessInstance` | `getProcessInstance()` Returns the process instance that is currently being executed in this context.
`Object` | `getVariable(String variableName)` Returns the value of the variable with the given name.
`void` | `setVariable(String variableName, Object value)` Sets the value of the variable with the given name.

Methods inherited from interface org.kie.api.runtime.KieContext
`getKieRuntime, getKnowledgeRuntime`

Method Detail

### getProcessInstance

    ProcessInstance getProcessInstance()

  Returns the process instance that is currently being executed in this context.

  Returns:
    the process instance that is currently being executed in this context

### getNodeInstance

    NodeInstance getNodeInstance()

  Returns the node instance that is currently being executed in this context, or `null if no node instance is currently being executed.

  `
  Returns:
    the node instance that is currently being executed in this context

### getVariable

    Object getVariable(String variableName)

  Returns the value of the variable with the given name. Based on the current node instance, it will try to resolve the given variable, taking nested variable scopes into account. Returns `null` if the variable could not be found.

  Parameters:
    `variableName` - the name of the variable
  Returns:
    the value of the variable

### setVariable

    void setVariable(String variableName,
                     Object value)

  Sets the value of the variable with the given name. Based on the current node instance, it will try to resolve the given variable, taking nested variable scopes into account. If the variable cannot be resolved, it will set the value as a process-level variable. It is however recommended to only use this with caution, as it is always recommended to define the variables that are used inside a process.

  Parameters:
    `variableName` - the name of the variable
    `value` - the value of the variable

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.0.0.CR5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.