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?
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.
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.
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.