Workflow Status Adding Approver’s stop if AutoPromote is Yes
If there is Auto Promote “Yes” for status, Adding users as approvers will not working properly.
If I make Autopromote “No” then it works fine. it will add the approvers to the next status.
Do you have any solutions for this.
To give you more detail.
Status
Pending Submit Reviewer1 Reviewer2 Reviewer3 Release
Here on all the above reviewer is AutoPromote “Yes”.
and for all the Reviewer I have to add approver’s dynamically using code.
Here Dynamic means i am selecting users from the Page three attribute and add to the next status. So when user clicks on the Reviewer/ Next Status the Approvers will be displayed dynamically.
Status moving from Pending to Submit I am adding approvers to next status( Reviewer1 )
Status moving from Submit to Reviewer1 I am adding approvers to next status( Reviewer2 )
Status moving from Reviewer1 to Reviewer2 I am adding approvers to next status( Reviewer3)
Without Autopromote this works fine.
Is there a reason you aren’t using Status Criteria on the workflow to add the approvers instead of custom code?
I had a similar issue. The workaround I found was to leave through CSP (in WF admin) a dummy approver at each review (status type) with auto-promotion, and let the code remove this dummy approver just AFTER adding other approvers have been chosen by the code algorithm. The dummy approver might be a user-group, so it won’t catch an extra user license.
Hi Tal Kobrowski,
adding to my last note i have many reviewers(6) but for eg i said only 3 reviewers.
On which status I have to remove dummy approver. I am adding the appover to Next status
CSP (in WF admin) a dummy approver is attaching when moving to the reviewer status.
for eg:
If the status is moving from Pending to submit add approvers to Reviewer1 ( this works fine No adding dummy approver required)
If the status is moving from Submit to reviewer1 add approvers to Reviewer2 ( this works fine No adding dummy approver required)
If the status is moving from Reviewer1 to reviewer2 add approvers to Reviewer3 ( Here it will attach only Dummy User not the Dynamic users from Code)
I am using event “Change status for workflow”
Without Autopromote to any of the review status work fine. and if Auto promote Yes then change.getDefaultNextStatus() throws null.
—————————————————
Hi dannypitt,
Here approvers I have to pick Dynamically from the Page 3 List attributes. So I can’t attach the attributes to the Status Criteria.
Hi Hi Tal Kobrowski,
I am able to add and remove Dummy approver, Partially its working.
Pending
Submit
Reviewer1 AutoPromote No
Reviewer2 AutoPromote Yes
Reviewer3 AutoPromote Yes
Reviewer4 AutoPromote No
Reviewer5 AutoPromote Yes
Reviewer6 AutoPromote No
Release AutoPromote No
Till Reviewer3 its working fine, From Reviewer4 auto promote “No” but still it is Autopromoting.
Do you have any clue why it is auto-promote. Let me know something I am missing in the code