Question

Coforge Limited
IN
Last activity: 6 Jul 2022 4:19 EDT
After wait dependency on child case status in parent case, the status of child cases was still old.
In our application, parent case is waiting for all the child cases to be resolved. Even when all the child cases are resolved and wait dependency is fulfilled, when parent case moved to next stage (as expeced) we observe the child status were still Pending- (old status not expected). We got the pega fix for this using java step to get the deferred status (new status) of the child work objects.
Solution: We called a data page on the child work object and in post processing activity we updated the status of the work objects using java step. Please check the screen shot for activity.
Java code:
boolean statusPresent=false; PegaDatabase db = (PegaDatabase) tools.getDatabase(); java.util.Iterator deferredOps = db.getDeferredOps().iterator();
In our application, parent case is waiting for all the child cases to be resolved. Even when all the child cases are resolved and wait dependency is fulfilled, when parent case moved to next stage (as expeced) we observe the child status were still Pending- (old status not expected). We got the pega fix for this using java step to get the deferred status (new status) of the child work objects.
Solution: We called a data page on the child work object and in post processing activity we updated the status of the work objects using java step. Please check the screen shot for activity.
Java code:
boolean statusPresent=false; PegaDatabase db = (PegaDatabase) tools.getDatabase(); java.util.Iterator deferredOps = db.getDeferredOps().iterator();
while (deferredOps.hasNext()) { DeferredOperation op = (DeferredOperation) deferredOps.next(); ClipboardPage instancePage = null; if (op instanceof DeferredOperation.SaveInstance){ DeferredOperation.SaveInstance tempOpVal = (DeferredOperation.SaveInstance) op; instancePage = tempOpVal.getInstance(); }else{ continue; } if(instancePage.getString("pxObjClass").contains("History-") && instancePage.getString("pxHistoryForReference").equals(ChildInsKey) &&(instancePage.getString(".pyMessageKey").indexOf("StatusChanged")!=-1)){ String messageKey = instancePage.getString(".pyMessageKey"); ChildStatus = messageKey.substring(messageKey.indexOf("StatusChanged") + "StatusChanged ".length()); } }