Wait is not processed for subcases have different statuses
Parent case is configured to resume when the sub case reaches the status Pending-ParentCaseResume.
However this is not working as expected, in the below scenario:
Subcase A is created, parent moves to the wait state, Subcase A first moves to Pending-ParentCaseResume,and then moves to Resolved-Completed. Parent resumes. Subcase B is created, parent waits, Subcase B moves Pending-ParentCaseResume and then to Resolved-Rejected. Parent does not resume.
The same scenario works fine if both the sub cases move to the same resolution status.
Note: Subcase status is changed first to Pending-ParentCaseResume through the UpdateStatus Activity and then moved to Resolved status.
Steps to Reproduce
Login as one user and move the case to the wait shape. Following procedure occurs:
a) Sub case gets created and the parent waits for the subcase to complete.
Before it moves to resolution status, the status of the subcase is set to Pending-ParentCaseResume.
This triggers the wait shape and parent is moved forward.Subcase moves to Resolved-Completed.
b) Another subcase is created which makes the parent to wait for subcase to complete
c) Second subcase is processed and status is set to Pending-ParentCaseResume
d) Subcase moves to Resolved-Rejected.
This scenario works fine if the sub cases have the same resolution status either Resolved-Completed or Resolved-Rejected. But does not, when the resolution status is different even though the wait is set on Pending-ParentCaseResume status.
A defect in Pegasystems’ code or rules
Wait shape is not being processed for subcases which move to waiting status and then ending with different statuses. This is because when the Wait shape is waiting, code checks if the activator has crossed the desired status. While verifying the dependency, current status of the activator is considered instead of the dependency status for which the wait shape is looking for.