cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Inactive Approver Role in Workflow definition

Former Member
0 Kudos


Hi Experts,

we are having issue with Inactive Approver Role in workflow definitions.

we have created workflow for Master agreements and Projects. Phases and workflow are working fine.

But the issue is when a programmatically added approver has completed the approval activity, collaborator role is not changing from approver role to Inactive Approver Role mentioned in workflow definition. For example, you might select Reviewer in Inactive Approver Role, Then Selected collaborator role to be given to programmatically added approvers when the approval activity is completed.

This is functionality not happening when project or contract document approved and workflow completed in project and MA. we have followed all the standard functionality when we have created workflow. Please see screen shot for the same.

Can anyone please tell me is there any functionality we missed it or do we need to write any script in xpdl or do we need to check anything with collaborator role or with security profiles.

we have checked with other roles also same issue coming.

This Reviewer is in active state and have Readonly profile. We don't have Pre script in this workflow because we are using standard approval.

Thanks in advance!

Lava

Accepted Solutions (1)

Accepted Solutions (1)

former_member89217
Contributor
0 Kudos

Since you do not have a prescript, you are not assigning the approver programatically within the workflow.  This type of "adhoc" approver will be part of the approval process but will not get assigned the inactive role.  This is expected and known behaviour.  If you need the approver to become a reviewer when the workflow is over, it needs to be added as an approver in the prescript.

Regards,

Gary

Former Member
0 Kudos


Thanks gary for your helpful answer.


As per your answer We have added the approver role in the prescript so that it gets added programmatically , still no luck.

here is the script we wrote in prescript.

import com.sap.eso.api.common.*;

import com.sap.eso.api.projects.*;

import com.sap.odp.api.workflow.*;

import com.sap.odp.api.usermgmt.masterdata.*;

import com.sap.eso.api.doc.collaboration.*;

import com.sap.eso.api.doccommon.masterdata.*;

import com.sap.eso.api.ibean.*;

import com.sap.odp.api.ibean.*;

import com.sap.eso.api.contracts.*;

import com.sap.odp.api.doc.collaboration.*;

collaboratorsCollection = doc.getCollectionMetadata("COLLABORATORS").get(doc);

if (collaboratorsCollection.size() > 0)
{

   for (int i = collaboratorsCollection.size() - 1; i >= 0; --i)
  {

        collaboratorsCollection_member = collaboratorsCollection.get(i);

        if (hasValue(collaboratorsCollection_member))
       {

           collaboratorRole = collaboratorsCollection_member.getCollaboratorRole().getDisplayName();


            // Get approver of Role "Approver".
           if(collaboratorRole.equals("Approver"))
           {
                principal = collaboratorsCollection_member.getPrincipal();
             }

       }
  }
}

if (hasValue(principal))
{
     addApprover(principal);
   
}

Do you have any other suggestions? or if you have any related code snippet please share with us.

former_member89217
Contributor
0 Kudos


I am not sure how effective this prescript is since it assumes the approver has already been added. The idea of the prescript is that it determines and adds the approver.  Think of this in terms of the UI... What would happen if you added user "A" as an approver if it were already there.  To prove this to yourself, hard code a user in this prescript and go through the workflow again and see what happens...

Gary

Former Member
0 Kudos

Hi All,

Above issue is resolved.

This is standard behavior when we add Approver and Reviewer in inactive role.

Because Approver have R/W access after approval we are trying to convert to Reviewer role but reviewer have Read only access. By logically it is not correct so it is not changing to Reviewer role.

Regards,

Lava.

Answers (0)