Support Article
Work object creation through listeners fails
Summary
Work object creation through listeners fails sporadically with an Owner work party error.
Error Messages
Error Message:
pyWorkParty(Owner).pyWorkPartyUri: The party named System cannot be looked up as an operator record.
Steps to Reproduce
- Configure a listener to create work objects from a CSV or XML file.
- Write a log message when CreateWorkPage, AddWork, or CommitWithErrorHandling fails.
- Create a work object through the listener and check the logs for errors.
Root Cause
An issue in the custom application code or rules. The Owner work party is set to the system when processing the listener.
Resolution
Here’s the explanation for the reported behavior: There are two areas to consider regarding the Owner work party:
1. Creation of the Owner work party
In a working Trace, the pyPartyRoleVisibleOnEntry is True and isBatchRequestor evaluates to False. Hence, an Owner work party is created using the CurrentOperator data transform. The pyWorkPartyUri is not set because the pxRequestor.pyUserIdentifier is empty.Perform the either of the following local-changes to address the issue:
- Uncheck the pyPartyRoleVisibleOnEntry if it is not required for other cases
- Change the precondition in PartyNewSetup to use @(Pega-RULES:Default).isBatchRequestor(tools) || pxRequestor.pxUserIdentifier == "".
2. References to the Owner work party
Verify if there are any assignments, emails, etc. that route to the Owner work party or current operator.
These processes fail if the Owner work party is not set or if it is set to System, which is not a valid operator.
Perform the following local-change:
Ensure that cases processed through an agent or listener are not routed to the Owner work party or current operator. They can be routed to a workbasket or a different operator.
Published April 12, 2018 - 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.