Extracts allows you to instrument process activities non-intrusively.
Extracts could be an alternative for using nJAMS log activities, especially if you want to enrich log messages on the fly with functional information, which can be searched for later in nJAMS GUI.
Managing Extracts requires WRITE privilege on the specific process definition.
To manage Extracts open the “Extracts configuration” dialog by clicking on the Extracts icon (N):
The dialog opens for editing the Extract’s definition:
- Select whether an Event is to be generated, when the Extract is executed.
- ADD ATTRIBUTE allows defining regular expressions or xpath instructions to extract data from the activity’s input or output data and assign the result to the designated Attribute: Business Service, Business Object, Correlation ID, External ID and Parent ID, Event Message, Event Code, Payload, and Stacktrace.
- ADD CUSTOM ATTRIBUTE allows defining individual custom attributes of your choice.
- Select the related scope to which you may apply these Extract definitions. You can apply the Extract to multiple targets.
For example, click on ADD CUSTOM ATTRIBUTE and the following dialog opens:
- Enter the name of the new custom attribute
- Select a type of expression, either Regular Expression or XPATH 2.0
- Enter the expression
- Click on “Edit” to open the expression dialog
- Specify input or output structure of the expression
The “Edit” dialog allows you to test your expression based on previously collected trace data:
- If the activity contains trace data, you can test your expression against the trace data.
- Press TEST EXPRESSION and the result of the expression will be provided above.
- Click on SAVE to store the current expression
When the Extract definition is complete, you have to apply the Extract to nJAMS Client:
- APPLY applies the configuration to nJAMS Client
- Click on DELETE for removing an Extract
- The status indicates whether applying the Extract was successful.
When an Extract is defined for an activity, the Extract icon is present at the corresponding activity:
|Versions of Extracts:|
Extracts are versioned.
That means, the current aspect configuration for a process definition can be inspected by first selecting the process definition from the Navigation Tree.
Historic settings are available, when a process entry is selected in the Result list.
The Extract configuration shown in the latter case matches the configuration that was active when the process was executed.
Extracts can also be based on conditions. You can define a rule that will only create an Event, when the condition is true.
- In combo box Event select Rule.
- Specify the type of expression. You can choose Regular Expression or XPath 2.0.
- Enter the expression depending on its type
- Choose whether your expression refers to incoming or outgoing data of the activity
Suppose there are incoming order data that contains different product types.
in case the order type is “TI99/4A” an event should be generated.
The sample incoming data is:
- At “Event” select Rule
- At “Type of expression” select XPATH 2.0
- The expression is:
- Click on APPLY. When the process is executed the next time, a new event of type INFO is generated.
Moreover, assume we want to send an event of type SUCCESS if the order type is TI99/4A.
For all other order types we want to receive a WARNING. The expression is:
if (//order_type="TI99/4A") then "SUCCESS" else "WARNING"