Dec 26, 2007

JBPM Architecture Continued !!


Action Handlers are contained in process definition and are executed in JBPM engine.When the process engine encounter a node during the execution of process instance which is derived from process definition, action handler associated with them are executed. Action handlers are instances of Java code that interact with external systems when executed.

Process Definition: A process definition is based on a directed graph (A ProcessDefinition is formal description of process represented as Java Objects). The graph is composed of nodes, transitions, one start state, and one end state. The type of each node defines the runtime behavior for the node. While a process definition executes, the following entities come into play:
Process instance: A process instance is one execution of a process definition. When a process instance is created a token is created for main path of execution called the "Root Token" and is positioned and the start state of the Process Definition.
ProcessInstance processInstance = new ProcessInstance (processDefinition);


Token: A token is one path of execution. A token is the runtime concept that maintains a pointer to a node in the graph.
Token token = processInstance.getRootToken ();

Signal: A signal instructs a token to continue graph execution by transition out of a node.When receiving an unnamed signal, the token will leave its current node over the default leaving transition. When a transition-name is specified in the signal, the token will leave its node over the specified transition. A signal given to the process instance is delegated to the root token.
token.signal ();

Node: Nodes are responsible for the continuation of a graph execution. When a token enters a node, the node executes. Node type determine what will happen when execution arrives at a particular node.A node that does not propagate execution is regarded as a state.
Action: Actions are instances of Java code executed when events occur in a process execution. The primary event types are "entering a node," "leaving a node”, and "taking a transition."

No comments:

Post a Comment