Information Technology Reference
In-Depth Information
These process variables (called
project
,
reqDescription
,
storyPoints
,
de-
veloperId
,
compiled
, and
deployed
) represent the information that will be carried
out by the process activities. We need to define all the information that we want to handle
at the process level. These properties will not have any visual representation in our dia-
gram, but we can usually define them in our modeling tool within the
Properties
panel.
Note that a process variable is composed of an
id
and an
itemSubjectRef
reference.
The
id
parameter represents the name of the variable. We will use the value of
id
to ref-
erence the process variable in different activities in our process. The
itemSubjectRef
parameter is used to reference a type of information that was externally defined. Since
BPMN2 is language-independent, we cannot make direct references to Java types.
For this reason, we use the following item definitions:
<bpmn2:itemDefinition id="_projectItem"
structureRef="String"/>
<bpmn2:itemDefinition id="_reqDescriptionItem"
structureRef="String"/>
<bpmn2:itemDefinition id="_storyPointsItem"
structureRef="Integer"/>
<bpmn2:itemDefinition id="_developerIdItem"
structureRef="String"/>
<bpmn2:itemDefinition id="_compiledItem"
structureRef="Boolean"/>
<bpmn2:itemDefinition id="_deployedItem"
structureRef="Boolean"/>
These item definition tags can be understood as type imports in Java. We are defining a
name for all the items of type
String
,
Boolean
, or
Integer
in this case. We are us-
ing basic types for our first executable version, but these item definitions can be of any
type as long as you provide a full class name.
With these two steps, defining the
itemDefinition
parameters and our process vari-
ables, we have defined placeholders for information. Now when we start our process, we
can fill some of these buckets that will be accessible for all the activities inside our pro-
cess. Let's analyze what exactly we have defined. The process will maintain the following
information:
• The project name