Question


Accenture
IN
Last activity: 4 Oct 2018 11:08 EDT
How to resolve the WOs with specific prefixes A- and B-
I have a requirement like below.
I need to resolve the WOs with prefixes A- and B-. I have written an activity with obj browse on assign- WB and assign - WB got the WOs, did page merge and used pxForcecaseclose OOTB activity to close the cases. Now in input param, I have given A and B. So if A is selected WOs related to A prefix only should get closed, likewise if B is selected only B should get closed. What is the best approach to write logic to address this requirement?
Message was edited by: Kip Jackson multiple edits
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution


Pegasystems Inc.
IN
- You can write a report definition on work class to fetch all the work objects with criteria : pyID starts with param.Prefix and pyStatusWork does not starts with Resolved-
- Then you can call this report definition in an activity and look over all results and pxForceCaseClose activity
- This activity resolves the work object and also closes all the existing assignments so you don't need any extra logic for assignments
You need to call this report definition by passing Prefix param as A- or/and B- depending on your requirements. Let me know if this helps and if you need any other information


Pegasystems
US
pxForcecaseclose seems to take a single work object as its parameter, but you said you gathered a list of assignment objects. Does one of the properties shown on each assignment object indicate the work object ? That's what you need to pass to pxForcecaseclose.
Also, pxForcecaseclose seems to be closing the case and all its sub cases. So, if multiple assignment objects in your list refer to the same case or its sub cases, you need to be careful to only call pxForcecaseclose for the work object, and only call it once for that work object.
One way you might consider doing this is, first sort your list of assignments by work object. That will make all assignments for a given work object contiguous in the list. Then, walk your list in an activity loop, and each time you encounter an assignment whose work object is DIFFERENT than for the previous assignment, and the prefix of that work object is your desired prefix, then call pxForcecaseclose else skip the call and walk to the next assignment on the list.
/Eric


Accenture
IN
Thanks Eric for the quick reply!
My requirement includes to close all assignments of each WO and then resolve the case.
Now I require help in this part.. I need to get only A- WO s n they shd get resolved if I select A in input params, likewise if I select only B- then only B WO s shd get resolved. How can I achieve this? How to write the logic?
Thanks in advance.
Accepted Solution


Pegasystems Inc.
IN
- You can write a report definition on work class to fetch all the work objects with criteria : pyID starts with param.Prefix and pyStatusWork does not starts with Resolved-
- Then you can call this report definition in an activity and look over all results and pxForceCaseClose activity
- This activity resolves the work object and also closes all the existing assignments so you don't need any extra logic for assignments
You need to call this report definition by passing Prefix param as A- or/and B- depending on your requirements. Let me know if this helps and if you need any other information


Accenture
IN
Thanks much Pankaj! That's a quick reply!
Obj browse is that not a right option? Can I use it to fulfill my req?
Thanks,
Sri.


Pegasystems Inc.
FR
Hi Sri,
Of course you can use Obj-Browse, but don't browse the Assign- elements, search for the Work- ones (with your prefix on pyID). The Main point from the message sent by Pankaj above is to use work objects and not the associated assignments. The pxForceCaseClose activity will handle the assignments closure automatically.


Areteans
US
Hi There,
I have similar requirement we are calling the pxForceCaseClose activity in loop. when the list has 3 item which needs to be resolved, when 1st item is resolved it is vanishing all the data from the work table (assignments are deleted from the assign table) subsequent work objects are resolved, but data is not vanished. All this happening in the same loop.
Any help on this appreciated
Thanks
Ambresh
-
Akhil Muppadi


Pegasystems Inc.
IN
Hi,
Thank you for posting your query in the PSC. This looks like an inactive post and hence, we suggest you create a new post for your query. Click on the Write a Post button that’s available on the top right pane of this page. Once created, please reply back here with the URL of the new post.
You may also refer this discussion link as a reference in the new thread.