Show Table of Contents
Appendix A. Process Elements
A Process Element is a node of the Process definition. The term covers the nodes with execution semantics as well as those without.
A.1. Process
A Process is a named element defined in a Process Definition. It exists in a Knowledge Base and is identified by its ID.
A Process represents a namespace and serves as a container for a set of modeling elements: it contains elements that specify the execution workflow of a Business Process or its part using Flow objects and Flows. Every Process must contain at least one Start Event and one End Event.
A Process is accompanied by its BPMN Diagram, which is also part of the Process Definition and defines how the Process execution workflow is depicted when visualized, for example in the Process Designer.
Apart from the execution workflow and Process attributes, a Process can define Process variables, which store Process data during runtime. For more information on Process variables, refer to Section 4.8, “Variables”.
Runtime
During runtime, a Process serves as a blueprint for a Process instance (the concept of class and its object in OOP). A Process instance lives in a Session that may contain multiple Process instances. This allows the instances to share data, for example, using Globals that live in the Session instance, not in the Process instance. Every Process instance has its own context and ID.
Knowledge Runtime, called
kcontext, holds all the Process runtime data. You can call it in your code, for example, in Action scripts, to obtain or modify the runtime data:
- Getting the currently executed Element instance so as to query further Element data, such as its name and type, or cancel the Element instance.
Example A.1. Getting the currently executed Element
NodeInstance element = kcontext.getNodeInstance(); String name = element.getNodeName();
- Getting the currently executed Process instance so as to query further Process instance data, such as, its name, ID, or abort or send an event, such as a Signal.
Example A.2. Getting the currently executed Process and sending it a Signal event
ProcessInstance proc = kcontext.getProcessInstance(); proc.signalEvent( type, eventObject );
- Getting and setting the values of variables
- Execute calls on the Knowledge runtime, for example, start Process instances, insert data, etc.
A Process instance goes through the following life cycle:
- The
createProcessInstancemethod is called on a Process: a new process instance based on a Process is created and Process variables are initialized . The process instance is in statusCREATED. - The
start()method is called on the ProcessInstance: the execution of the Process instance is triggered (the token on the Start Event is generated). If the Process was instantiated manually, the token is generated only on its None Start Event. If it is instantiated using another mechanism, such as Signal, Message, or Error, the token is generated on the Start Event of the respective type that is defined to handle the particular object. The process instance becomesACTIVE. - Once there is no token in the flow (tokens are consumed by End Events and destroyed by Terminating Events), the Process instance is finished and becomes
CANCELLED.
The runtime state of a Process instance can be made persistent, for example, in a database. This allows to restore the state of execution in case of environment failure, or to temporarily remove running instances from memory and restore them later. By default, process instances are not made persistent. For more information on persistence refer to the Administration and Configuration Guide for JBoss BPMS.
Properties
- ID
- Process ID defined as a String unique in the parent Knowledge BaseExample value:
org.jboss.exampleProcessIt is recommended to use the ID form<packageName>.<processName>.<version>. - Name
- Process display name
- Version
- Process version
- Package
- Parent package the Process belongs to (Process namespace)Possible values:
true,false - Target Namespace
- BPMN2 xsd location
- Executable
- type of the process as concerns its executabilityPossible values:
true,false - Imports
- Imported Process
- Documentation
- Documentation is a generic element attribute that can contain element description. It has no impact on runtime.
- AdHoc
- Boolean property defining whether a Process is an Ad-hoc Process:If set to
true, the flow of the Process execution is controlled exclusively by a human user. - Executable
- Boolean property defining whether a Process is intended for execution or not (if set to
false, the process cannot be instantiated) - Globals
- Set of global variables visible for other Processes to allow sharing of data between them

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.