cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP Sourcing CLM - Approval WF - Error

Former Member
0 Kudos
236

Hi all,

we are using SAP Sourcing 9.0 and Together Workflow Editor 5.0-1 to create xpdl Workflows.

Now I am facing one problem. The document is locked when I increase the phase to "in approval". As soon as its approved or rejected, it changes phase like supposed to. But the document is still locked. Either in Draft or approved phase after approval.

Daemon:

Documents in WF  (Setup - WF definition - Report) are shown "In Approval" even after the approver aproved the item.

I will post the Postscript as reply.

Do you know any solution?

Thanks and regards,

Özlem

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

import java.math.*;

import com.sap.odp.api.common.exception.*;

import com.sap.odp.api.common.types.*;

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

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

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

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

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

//1. Create a logger for messaging

logMsg = Logger.createLogMessage(session);

    

//2. If we are not approved, then change the phase backward

doc.getIBeanHomeIfc().upgradeToEdit(doc);

if(getApprovalStatus() == APPROVED)

{

try{

//Increase approval phase:

doc.getIBeanHomeIfc().changePhase(doc,"Approved");

}catch(e){

logMsg.setLogMessage(e.toString());

logMsg.setException(e);

Logger.error(logMsg);

}

//Save document changes

doc.getIBeanHomeIfc().save(doc);

}

if(getApprovalStatus() != APPROVED)

{

try{

//Increase approval phase:

doc.getIBeanHomeIfc().changePhase(doc,"Draft");

}catch(e){

logMsg.setLogMessage(e.toString());

logMsg.setException(e);

Logger.error(logMsg);

}

//Save document changes

doc.getIBeanHomeIfc().save(doc);

}

former_member89217
Contributor
0 Kudos

The Postscript is fairly routine. As long as you have the previous and next phases as stated this should be fine. However I'm not sure about your together workflow editor version being supported.  Version 5.0 is MUCH newer than anything we have supported. 3.2.1 is the latest version we recommend.

Regards,

Gary

Former Member
0 Kudos

Hi Gary,

works perfect with version 3.2.1. Thank you!

Regards,

Özlem

Answers (0)