Question
Pegasystems Inc.
JP
Last activity: 12 Jun 2017 22:33 EDT
How to forcibly close all open cases in a system
Hi,
I want to withdraw all open cases in a system. There is an out-of-the-box Process API called "pxForceCaseClose" and I am trying to utilize this. Below is overview and please see detailed code and trace in the attached excel file.
1. Obj-browse to create a page list (tempPage) of open Work instances
2. For each embedded page (tempPage.pxResults), call pxForceCaseClose activity to withdraw
Is above idea wrong somehow? I thought this is pretty straightforward but PRPC is throwing a java.lang.NullPointerExcepction. Why is this and how am Isupposed to do this requirement?
Thanks,
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
US
The hot fix modifies step 4 of the pxForceCaseClose activity.
Description of changes:
In fourth step in activity pxForceCaseClose we are using the page @Default.PrimaryPageName(tools) but this doesn't work for the case of an embedded page which is causing the page name to be empty and giving the NPE. Use the java code instead of the Property set 4th step in pxForceCaseClose and set the required properties.
I will attach screen shots of the hot fix version (07-10-28) and the prior version (07-10-21) so you can see the differences.
Allianz Technology
DE
One of the options is to Obj-Browse the list of active requestors and call @java(tools.getDatabase().getLockManager().unlockForRequestor()) for each of them.
Pegasystems Inc.
JP
Hi,
I thought Obj-Browse would not do WorkLock and it is read only. Why would I need to unlock? In which step in my activity would I do that if I need to? Can you please show me details?
Thanks,
Pegasystems Inc.
US
Can you show the stack trace from the log?
Pegasystems Inc.
JP
Hi,
Please see attached.
Thanks,
Pegasystems Inc.
US
Thank you for the log file. I see HFix-33137 was generated for this issue on Pega 7.2.2. You can submit an SR to request the hot fix.
Pegasystems Inc.
JP
Hi,
So, is this a product defect? Which part is this hotfix fix for in the activity?? I am using Pega 7.2.
Thanks,
Accepted Solution
Pegasystems Inc.
US
The hot fix modifies step 4 of the pxForceCaseClose activity.
Description of changes:
In fourth step in activity pxForceCaseClose we are using the page @Default.PrimaryPageName(tools) but this doesn't work for the case of an embedded page which is causing the page name to be empty and giving the NPE. Use the java code instead of the Property set 4th step in pxForceCaseClose and set the required properties.
I will attach screen shots of the hot fix version (07-10-28) and the prior version (07-10-21) so you can see the differences.
-
Rahul Choudhary Ananya Anshudhar
Pegasystems Inc.
JP
Thanks for the screenshot. I private-edited and it started to work. I will create an SR to get a hotfix for Pega 7.2. As you said, our Work-.pxForceCaseClose activity version was 07-10-21.
Pegasystems Inc.
AU
Hi Kensho,
Can you try to executing the pfForceClose activity standalone by providing all the parameters (like WO ID, status and audit note). If you do not see any issues, please trace the activity?
Regards,
Basavaraj
Pegasystems Inc.
JP
Hi,
Are you sure about this "pfForceClose" activity? If this is a typo, please first take a look at the attached files. Of course I tried this pxForceCaseClose by stand alone and it works completely fine when I pass parameters manually. When I use this activity from a page list I get an error. The log, trace are already attached above. The issue must be around lock and requestor. Well, this is very simple two steps activity and anyone can replicate it easily. See the original excel file gattached please. All codes are there.
Thanks,
Accenture Australia
AU
Hi
It is a straight forward method to close the cases which are in open status. But we need to pass the parameters to the called activity from the calling activity. pxForceCaseClose needs some parameters.Please check the parameters tab of called activity and pass the required parameters.
Thanks
Pegasystems Inc.
JP
Did you see my attached file in the original post?
I know how to use pxForceCaseClose and it works completely fine by stand-alone. The issue is not how to use it but when I call it from page list created by Obj-Browse.
Thanks,