cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing called element of call activity

fconrady
Champ in-the-making
Champ in-the-making
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
5 REPLIES 5

jbarrez
Star Contributor
Star Contributor
No, not really an easier way (cause the info is not needed at runtime except until it's executed).

You can probably simplify your code a lot using http://activiti.org/userguide/index.html#advanced_parseHandlers parse handlers to inject the execution listeners automatically for each process

fconrady
Champ in-the-making
Champ in-the-making
Thanks for the advice. I will try to use the parse handler, so that I don't have to write the execution listeners manually.

kalpanaab
Champ in-the-making
Champ in-the-making
Hi,
Am new to activity. We are trying to convert weblogic JPDs to activiti.
In weblogic jpds,
1.At the end of each SUB JPD we set some success or failure parameter and xml object (input to next element in the flow) , based on that we decide whether the flow in the MAIN JPD should proceed or go to the error block.
Can you please suggest me how I can do this.
Thanks,
Kalpana B

kalpanaab
Champ in-the-making
Champ in-the-making
and one more question
2. In Activiti how to make variable global or process specific variables.


Thanks,
Kalpana B

kalpanaab
Champ in-the-making
Champ in-the-making
One thing I sorted out using call activity I resolved my 1.At the end of each SUB JPD we set some success or failure parameter and xml object (input to next element in the flow) , based on that we decide whether the flow in the MAIN JPD should proceed or go to the error block.
for the second question am trying to start instance by some variable
but am not able to get that variable in my service task
Can someone please help me