Enable the SessionSelection business process to handle multiple reviews. Since multiple reviews could imply several different scenarios, so we propose that you handle the specific case of needing to complete 2 reviews before proceeding.
Tip: What activities will be affected and need to change to handle 2 reviews?
activities will need to be updated to handle 2 reviews.
DecideOnSession should also be implemented to allow the chairperson to make a decision when the reviewers don’t agree to reject the session.
If you need some guidance on how you could solve the challenge above, feel free to check out the steps below!
Update the AssignReviewer human activity
- In ProposedSession_AssignReview_PopupEditor add a boolean input variable called FinalReview.
- Change the AssignReviewer screen action of the ProposedSession_AssignReview_PopupEditor to close the human activity only if this is the FinalReview.
- Modify the label of AssignReviewer to be Assign & Close when this will be the FinalReview assigned.
- Modify the AssignReview link. First set the FinalReview Boolean variable to GetReviewsByProposedSessionId.Count = 1. When one review has been assigned then it would be True that this should be the final review to be assigned.
- Hide the AssignReview link in the ProposedSessionDetails screen once 2 reviewers have been assigned. In the base process this is managed by the visibility of the container that holds the AssignReviewer link and the Popup RichWidget. Modify the Display property of the container to be: GetReviewsByProposedSessionId.Count < 2 and CheckChairRole(Session.UserId)
- Modify the AssignReviewers On Close callback to throw the exception when GetReviewsByProposedSessionId.Count < 2 and the exception to throw the error “Please select another reviewer”
- These steps allow for 2 reviewers. If we want to have 2 unique reviewers you would have to look up the reviewer for the first review and make sure that reviewer is not selected for the second review.
- Change the name to WaitForReviews
- Update the WaitForReviews On Close callback by modifying the GetReviewsByProposedSessionId aggregate. Add a filter, Review.isComplete = True. Then modify the If to check if GetReviewsByProposedSessionId.Count = 2
- Change User property to GetReview(NewReview.ActivityReviewId).Review.ReviewerId
- Update the ReviewProposedSession On Close callback by modifying the GetReviewsByProposedSessionId. Change the filter from ProposedSessionId to Review.Id = NewReview.ActivityReviewId
- Create the ReviewProposedSession On Open callback. Start by creating an aggregate, GetProposedSessionById using the processes ProposedSessionId. Then test whether the ProposedSession.StatusId is currently BeingReviewed. If so don’t throw an exception, just End. Otherwise, use SetPropsoedSessionStatus to set the status to BeingReviewed.
- Update the Review Session link on the ProposedSessionDetails screen to only be visible when the review has not been completed and the Reviewer is the currently logged in user. (not ProposedSession_ReviewTable.List.Current.Review.isComplete and ProposedSession_ReviewTable.List.Current.Review.ReviewerId = Session.UserId)
- Change the name to ReviewersRejectedSession
- Update Re viewersRejectSession by modifying the GetReviewsByProposedSessionId aggregate. Add a filter, Review.SuggestDecision = Entities.SuggestedDecision.Reject. Then modify the If to check if GetReviewsByProposedSessionId.Count = 2
- Replace the DecideOnSession Automatic Activity with a Human Acitivty
- Set the Roles so only the Chair role is selected
- Set the Destination to be the ProposedSessionDetails screen
- Set the Detail to the ProposedSession.Title
- Set the Instructions to “Make the final decision”
- Set the Due Date to some date in the future. Not really important.
- Modify the ProposedSessionDetails screen to show two new buttons (Accept and Reject) if the ProposedSession.StatusId = Entities.Status.Reviewed the User is in the Chair role (CheckChairRole(Session.UserId)). Otherwise show the regular buttons.
- Tie the new buttons to a new screen action called FinalDecision which takes a boolean input variable called Accept with the Accept button setting it to True and the Reject button setting it to False.
- Update the FinalDecision screen action to test if Accept is True. If so, SetProposedSessionStatus to Accepted, otherwise set ProposedSessionStatus to Rejected. Also provide a feedback message stating whether the session was accepted or rejected. Finally automatically close the human activity.