Question
To call an Activity asynchronously using queueBatchActivity API throwing Error
Hi,
We would like to call PEGA Activity asynchronously from another Activity. We have tried the following options. But both are not working. Approach#1: We have used the queueBatchActivity API to call the Activity asynchronously using Java code Approach#2:We have used the Queue method available in Activity to call ELKLog activity asynchronously (pass current parameter checkbox selected)
Approach#1
We would like to call PEGA Activity asynchronously from another Activity. We have used the queueBatchActivity API to call the Activity asynchronously using Java code
Sample Java code used to call the asynchronous activity ELKLog available in baseclass usign queueBatchActivity API method.
ParameterPage parameterPage = tools.getParameterPage(); parameterPage.putString("pzUseCurrentAccessGroupForChild","true"); parameterPage.putString("pzInheritRulesetList", "true");
List clipboardPages = new ArrayList(); //Pass the current ClipboardPage
ClipboardPage elkLogClipboardPage = tools.findPage("LogPage");
clipboardPages.add(elkLogClipboardPage);
//Queue Activity to Execute tools.getRequestor().queueBatchActivity("@baseclass","ELKLog",null,clipboardPages,true);
But above code is throwing the error:
failed:Elements of aOtherPages must be internal implementation of ClipboardPage |
Approach#2: We have used the Queue method available in Activity method to call ELKLog activity asynchronously (pass current parameter checkbox selected)
We could see the ELKLog Activity being called from the Tracer. But we don't see any result from the Queued Activity ELKLog.
Thanks,
Nanjundan Chinnasamy
For Approach 1, is LogPage present? Since you are adding it to the clipboardPages List, the error could occur if it was not found.
For Approach 2, did you enable the 'Asynchronous Activity' event type in Tracer so you can click the 'Queue Activity' row and see the trace of the async activity? What does it show?