Support Article
Unable to save an activity calling ootb callActivity function
SA-17275
Summary
Developer is trying to call an activity in an expression, using the standard function callActivity(). But they are facing issue while running it.
Error Messages
.pySteps(5).pyParamArray(1).PropertiesValue:
Invalid expression or reference: No suitable instance found
[seeking]
@(null:Utilities).callActivity(ClipboardPage,String,PublicAPI)
[candidate functions are]
or with different function call syntax, the error is still received:
...
[seeking]
@((PegaRULES:Utilities.callActivity(ClipboardPage,String,PublicAPI)
...
Steps to Reproduce
In an activity, create a step with method Property-Set
, PropertiesName = Param.X, and PropertiesValue = @Utilities.callActivity(pyWorkPage, "Abc", tools.getParameterPage())
Root Cause
This Rule Utility Function( RUF) is returning a void.
Customer is using this RUF to assign to a property. So, this is throwing the error.
Resolution
This RUF could be used as in a java step of any activity :
pega_rules_utilities.callActivity(param1,activityName,paramPage);
where param1 is of type ClipboardPage
Activityname is of type string
paramPage is of type Parameter Page.
For eg:
pega_rules_utilities.callActivity(tools.findPage("pyWorkPage"),"CIBILScoreCalculator",tools.getParameterPage());
You can also use like this :
ParameterPage pg = new ParameterPage();
pg.putParamValue("","");
pega_rules_utilities.callActivity(tools.findPage("pyWorkPage"),"CIBILScoreCalculator",pg );
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.