Question

5
Replies
74
Views
Close popover
Nanjundan Chinnasamy (Nanjundan Chinnasamy)
Decision Consultant Solutions
PEGA Decisioning Consultant
Decision Consultant Solutions
GB
Nanjundan Chinnasamy Member since 2015 9 posts
Decision Consultant Solutions
Posted: November 16, 2020
Last activity: November 17, 2020

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

Pega Customer Decision Hub 8.3 Decision Management Communications and Media Decisioning Consultant