Hello @PoojaPalla
I’ve analyzed your problem statement and generated a solution attached. Kindly import attached jar (product) in your PRPCPersonalEdition (8.7.#) cluster. You can associate the rulesets under attached product with DMSample application. After importing product rule to your personal environment, kindly examine especially report definition rules under PulledCasesFromWorkQueueWorkedByOperators ruleset. I’ve introduced basic function Reverse under Embed-UserFunction class that will be act as a sql function on solution’s text manipulation part of the pyMessageKey text value.
Additionally, History-DMOrg-DMSample-Work-Feedback is a class group for history instances of Feedback case in my personal development environment. The report definition rules (except IsWorkBasket) must be under the respective History-… class where your actual Pega environment is writing history instances of respective case(s) in your actual scenario. For instance, if you are grouping history instances of different cases let’s assume they are three different case types under one history class group that means report result will be covered for those three different cases’ history instances because report definition rules configured as “Report on descendant class instances” and also report definition rules defined under class group.
Okay, let’s focus the solution details that Pega is storing some useful information related assignments that we are going to benefit from them in history instances of the respective cases. let’s have a look at the history type character codes first.
We are going to filter history instances of cases with three following attributes that are pyHistoryType, pyAssignedTo and pyAssignmentClass. First of all, we need to filter pyHistoryType as R to be able to see the assignments transferred (reassign) from work queue or list to another work queue or list but that’s not enough because we need to exclude the instances transferred from work list since requirement explicitly indicates that "the cases that were pulled out from selected WB" that’s why we are filtering pyAssignmentClass as Assign-WorkBasket and pyAssignedTo as with the selected work queue from the drop down list of the report’s custom filter UI section.
Okay now let’s have a look at the history instance above after applying filter. Well, we filtered the history instances with applying defined logic but solution still not covering entire requirement because it is not guaranteed that assignment really pushed to work list of the respective operator although it is assigned to work list of operator on example above but it might be work queue because there are some scenarios in real life work processes that assignment may be transferred from one work queue to another work queue.
Therefore, let’s continue to find a way to fully cover requirement that pyMessageKey attribute value includes some information separated with “\t” (tab) chars. We can absolutely change what is currently written in there or format of message text by overriding some rules but let’s keep that format and values as-is since this solution provided based on OOTB behavior of the system. In case you need to dive into details about how Pega is setting pyMessageKey from the reassign functionality. You may check and examine the CL: Work- ID: Reassign activity specifically parameter values of the referred AddWorkHistory activity as well as CL: Assign- ID: AddWorkHistory activity.
Anyways, we are going to manipulate the pyMessageKey value to get the text after last “\t” character of entire text eventually we will obtain the value either operator’s user name (not a pyUserIdentifier - it would be good that Pega store pyUserIdentifier as well anyway) or work queue name (hopefully Pega is storing pyWorkBasket which is a key of Data-Admin-WorkBasket - we will look at this table further to ensure whether assignment pushed to work basket or not) then we are going to exclude history instances pushed to some another work queue that’s why solution includes one another report definition IsWorkBasket defined under Data-Admin-WorkBasket.
Finally, let’s test it.
Image I: Create a Case
Image II: Case has been assigned to work queue.
Image III: Find assignment from the respective work queues through widget.
Image IV: Do reassignments as much as possible different scenarios.
Image V: Check history rows of the respective case from the database table or history class instances from the Pega platform to see whole history log so that you will be able to compare the report result with the whole history instances in order to verify whether solution successful or not.
Image VI, VII, VIII: Finally run report and get the results. I reassigned the case as much as different possible scenarios that’s why we see the result shown in the image VIII as it has been pulled from [email protected] work queue to be pushed respective operator’s work list.
Kindly try it and let me know the result whether it works or not. In case you need to discuss something else related with the subj, kindly join my Slack channel to discuss further.
Regards.
Mert.
PulledCasesFromWorkQueueWorkedByOperators.zip (97.3 KB)