Question
GovCIO
US
Last activity: 26 Aug 2020 8:17 EDT
callActivity() issue
Hi,
I was trying to use callActivity() in my V62 environment using Expression Builder. I gave the activity name and the primary page with optional param page as per signature of the function. After clicking the Validate button I have got invalid expression err message. I tried all possible ways but I could not get out of this issue. I hope some of the members in this forum might have got this issue earlier and fixed it too. Below is the screenshot for your info to help me on this. I might be wrong in building the function with below i/p params and want to correct it.
Note: Tried the similar way in V7.1.x and still seeing the same error.
Thanks,
Ravi Kumar Pisupati.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
GovCIO
US
Pegasystems Inc.
US
Ravi Kumar,
Hi. I've never seen this particular error, but why are you doing this? Where are you calling this expression from? Does the rule have a method for calling an activity? What does the calling activity do and is there another/better way to do that? What is the ultimate business problem you are trying to solve because I suspect there is a more guardrails compliant way to solve it.
Regards,
Mike
GovCIO
US
This exercise is to note down the exact function call with params. One of my team members were experimenting on this and not sure about the purpose of doing it.
Thanks.
Pegasystems Inc.
US
It appears that TestActivity is being interpreted as a ClipboardPage. Is it a local variable? If so, try local.TestActivity instead. Is a property? If so, try .TestActivity or [PageName].TestActivity.
GovCIO
US
Pegasystems Inc.
AU
Hey Ravi,
TestActivity should be "TestActivity", the function expects the activity name as a string.
GovCIO
US
I tried that way also. The prob is at the last param -> ParamPage. Don't undestand on why sys is showing void for it while validating.
Pegasystems Inc.
AU
Ah right, I remember this one.
Last time I used this one I specialized the function to remove the Parampage parameter and instead utilized tools.getParameterPage as a substitute to use the current parameter page.
I believe this function is mostly used within Java steps/functions so the parameter page is more accessible/creatable.
GovCIO
US
There you are! You got the point, Joe. There is no where it is mentioned that we shouldn't use it directly from activity/DT/where ever it is.When my team started using the issue being caught. Now tell me, do we have any documentation coming up on the usage restriction? If it is mentioned anywhere in PDN, pls let me know. May be me or my team over looked on the documentation side.
Thanks.
Pegasystems Inc.
AU
Strictly speaking there is no usage restriction, if you can form a parameter page then you're free to pass it; for instance:
When you select a function it does tell you the expected types, and it does note a difference between a ClipboardPage and ParameterPage.
As an aside, ML8 appears to have shipped with 'pxExecuteAnActivity' which is similiar in nature to the specialisation I mentioned earlier.
GovCIO
US
Thank you Joel Mcleish for the detailed explanation. I did see the similar way of calling in some of the java code snippets in V62 but wanted to see if this function can be used from the expression builder or not. Good to know that a new function introduced in ML8 and will inform my team to have a glance of it. Appreciate your help in this regards.
Thanks,
Ravi Kumar Pisupati.
Accepted Solution
GovCIO
US