Question

Get Name of Calling Activity

Hi

Can any one please let me know how to get the name of the calling activity in the current activity ?

Thanks,

Mariane

Comments

Keep up to date on this post and subscribe to comments

October 31, 2019 - 3:14am
Response to Thangasuresh-pega

Hello @Thangasuresh-pega

I followed the steps under article: https://community.pega.com/support/support-articles/how-capture-name-calling-activity

I included the code given in the support article in a Java step of the called activity. actName variable was supposed to give the calling activity name but unfortunately it did not. It returned the value "pyrunrecordexecute" as you can see in below screenshot

If you try the java code in the support article, does it return to you the name of the calling activity ?

Thank you,

Mariane

 

November 1, 2019 - 5:48am
Response to Thangasuresh-pega

Hello @Thangasuresh-pega,

Any updates ?

Thanks,

Mariane

November 5, 2019 - 8:56am

Hi Mariane,

Please use the attached Java code in Activity Java Step.

It will return Calling Activity Name in "ActName" local variable in tracer.

Thanks,
Bharathan

November 12, 2019 - 5:34am
Response to Bharathan

Hello @Bharathan,

I used the attached Java code in Activity Java Step. However it did not return Calling Activity Name in "ActName" local variable in tracer. Instead it returned the value "pyrunrecordexecute" as you can see in below screenshot

Is that the expected output ?!

Thank you,

Mariane

November 28, 2019 - 10:27am
Response to MarianeA

Hi Mariane,

I tried , for me its showing calling activity name.

Please check the attachment.

Is this your scenario?

Thanks,
Bharathan.

November 12, 2019 - 10:57am

The Java code is going to generate the Java stack for the current thread.

If this activity was called with a Batch operation, then this would send the job to a new Batch thread, hence you wouldn't be able to see the calling activity (as this would be a different thread).

I'm not sure if I have an answer for you on this. What are you trying to investigate?