Question
Cognizant Technology Solutions
CA
Last activity: 16 Mar 2016 14:10 EDT
Java Vs Call Method for triggering an activity
Hi
I am doing a POC in V6.2 Sp2 where I need to fire activities dynamically based on the values in declare page.The declare page of type list contains properties holding value of both name and class of the activity to be called dynamically
I had the below two approaches
- To iterate over declare page(list) and call the activity using Java(tools.doactivity) dynamically
- To Iterate over declarePage(list) and call a wrapper activity where I pass the activity name and class has Parameter, This wrapper activity contains steps with call method for each possible activity and i have a precondition for each step to check whether the Param matches activity name
When I evaluated for performance using PAL,I found approach 1 is better compared to approach 2 .But since it uses Java it is not complaint with best practices.
Kindly advice what are the pros and cons in using Java instead of Call method for triggering activity.Also let me know is there any better approach available considering if I do the POC in Pega 7 as well.