AnsweredAssumed Answered

Accessing called element of call activity

Question asked by fconrady on Oct 27, 2014
Latest reply on Sep 12, 2016 by kalpanaab
Hi,

I am creating an auto-documentation feature in my processes. When a process is run in auto-documentation mode, it automatically generates wiki files for each activity and sub-process.

For service tasks I achieve this by having my custom classes derive from a base class with appropriate methods for documentation. When the process is run in documentation mode, these methods are called to generate the corresponding wiki files.

My challenge is to achieve the same for call activities. In order to document a call activity the way I want I need to know the called element.

My current solution:
1. I attach execution listeners to each call activity.
2. In the execution listener class, I use the repository service to get the BpmnModel and then I look up the call activity in the model to get the called element.

It took me a while to figure this out and I was surprised that I could not find a more direct way to access the called element.

Questions:
a) Is there a simpler way to do this?
b) Is there a way to customize call activities similarly to service tasks?

Thanks
Florian

Outcomes