Sub-Process Links

The sub-process link defines the filter query that is executed when an event with messageId='BX_INSTANCE_SUBPROCESS_CREATED' is expanded to show events of the sub-process instance.

For example:

There is a single <subProcessLink> element in the eventLinks.xml file that controls the filtering for all sub-process events:

<subProcessLink>
   <filter query="(managedObjectId='{subprocessInstanceId}' AND
                 (messageId='BX_INSTANCE_PROCESS*' OR 
                  messageId='BX_INSTANCE_SUBPROCESS*')) OR 
                 (managedObjectId='{subprocessInstanceId}' AND 
                  managedObjectType &lt;&gt; '*Event' AND    
                 managedObjectType &lt;&gt; '*Gateway' AND
                   managedObjectType &lt;&gt; 'userTask') OR 
                 (messageCategory='WORK_ITEM' AND 
                  parentObjectId='{subprocessInstanceId}')"
           maxEvents="100"/>
  <sorts>
	    <sort attribute="creationTime" order="ASCENDING"/>
  </sorts>
</subProcessLink>

filter Element

The <subProcessLink> element contains a <filter> element that has the following attributes:

  • query - This attribute is a string value used to query the event collector database for events related to the sub-process. All events that satisfy the filter string specified in this attribute are returned from the event collector database and displayed in the Event Viewer when the sub-process start event is expanded.

    Note that the string value in this attribute follows the same rules as the query string used for pre-defined event filters—for more information, see Event Filter String.

    You can modify the default query string in this attribute to cause the list of sub-process events to contain whatever you desire.

  • maxEvents - This attribute contains an integer that specifies the maximum number of events to display for the sub-process when it is expanded. The default is 100.

    If the user expands a sub-process start event that contains more events than the maximum number allowed, an alternative method is to select the “Started instance” event, then select “This instance” from the Links menu to create a new event list containing all of the events related to the sub-process instance that was started.

sorts Element

The <subProcessLink> element contains a <sorts> element that defines how the sub-process are sorted. It has the following attributes:

  • attribute - The name of the event attribute to sort on.
  • order - The sort order: either ASCENDING or DESCENDING