Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Page passed as a parameter to a queued activity throws exception



In a main Activity user creates a Page and passes its name as a parameter to another Activity using following two ways:

1. Once by using Call method and invoke the “Child” Activity
2. Another by using Queue method to invoke the same "Child” Activity

When using Call method, the “Child” activity is able to read the property of the created Page and log it correctly.

When using Queue method, the same activity with the very same Page parameter throws an InvalidReferenceException.

Error Messages The reference "Mode: " + Param.Mode + ".pyID: " + .pyID is not valid. Reason: FUAInstance-NullMyStepPage
at com.pegarules.generated.activity.ra_action_child_ca4c8706e85d638d4c3e88e38ab60b5c.step2_circum0(
at com.pegarules.generated.activity.ra_action_child_ca4c8706e85d638d4c3e88e38ab60b5c.perform(
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(
at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(
at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivities(
at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.runActivities(
at com.pega.pegarules.session.internal.async.agent.QueueProcessor.executeBatchTask(
at com.pega.pegarules.session.internal.async.agent.QueueProcessor.execute(
at com.pega.pegarules.session.internal.PRSessionProviderImpl.performTargetActionWithLock(
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(

Steps to Reproduce

1. Create one "main" activity that creates a page and sets one of the properties to a given value.
2. *Call* another "Child" activity and pass the page as a parameter.
3. In the "Child" activity, declare a parameter of type "Page Name" and use it as a Step Page for a Log-Message command that prints the property set above.
4. Observe in the log that the property was logged with the correct value set at step 1.
5. From the "main" activity now *Queue* the same "Child" activity and pass again the page as a parameter.
6. Observe in the log that an exception was thrown.

Root Cause

This is working as designed.


Here 's an explanation:

When using "Call" "Child" activity, the execution is sequential and occurs within the same requestor context. The clipboard page built within that requestor is available to "Child" activity.
What you are passing across in the parameter page is just the name of the page. Hence when the “Threaded” activity is executed that same page is available in the context and it works.

When using "Queue" Threaded activity, this will cause "Child" activity to run asynchronously. No step page and primary page is passed.
Only parameter page is passed across.

However parameter page is a String valued collection of name parameters hence passing across the name of the page.
When calling any activity using Queue method, the execution occurs on a separate requestor hence that requestor cannot access the pages created in source requestor.

Refer following link for more details on Queue method:

Published July 17, 2017 - Updated October 8, 2020

Was this useful?

100% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us