on 2014 Nov 06 5:15 PM
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
Request clarification before answering.
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);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.