on 10-30-2013 12:24 PM
Hello Experts,
I am facing a strange issue dealing with Workflows in Projects. I have created a workflow definition, linked it to a phase and linked the phase configuration to a project document type.
All the pre-requisite configurations like configuring the Process Owner, associating the required security profiles etc are done.
Strangely, the workflow is not triggered during the phase change. I have rechecked all the configurations and it seems fine.
I have a feeling this issue might be related to the process owner profile but I cannot pin point the problem.
Any help/pointers would be highly appreciated.
Note: We are on CLM 9.0 SP5.
Thanks,
Arijeet
Hello Experts,
We have managed to resolve the issue. Finally, we had to upgrade the patch level on SP05. The patch level we were on had issues related to workflows.
Thanks,
Arijeet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Check the workflow:
- Is the workflow Active
- are there any start conditions in start events
- is start event Active
- are the other workflows running wıthout problem
- check event receivers with swue
REZA ROSTAMI - SAPHIRAN.COM - رضا رستمی
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arijeet,
As per my understanding, you have followed all steps correctly. But this issue might occur when the workflow pre-script or post-script have some code mismatch. Pls re-check the scripts in workflow and try.
And also let me know whether the document is getting locked or not?
Regards,
Vignesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vigneshwar,
The pre-script and post-script are without any errors/mismatch. The issue is that the document is not getting locked. I am assuming the process owner is unable to carry the work item to the approval phase due to which it is unbale to lock the document. Just to be sure I am pasting the prescript and postscript code below for your reference.
Prescript:
import com.sap.odp.api.doc.collaboration .*;
import com.sap.odp.api.usermgmt.masterdata.*;
import com.sap.odp.api.ibean .*;
import com.sap.eso.api.projects.*;
import java.util.*;
import java.math.*;
import java.String.*;
//Get List of collaborators from Project
collab = doc.getCollaborators();
iter = collab.iterator();
while(iter.hasNext()){
member = iter.next();
if(member.getCollaboratorRole().getDisplayName().toUpperCase().endsWith("APPROVER"))
addApprover(member.getPrincipal());
}
Postscript:
import com.sap.odp.api.doc.collaboration.*;
import com.sap.odp.api.doccommon.masterdata.*;
import com.sap.eso.api.projects.*;
import com.sap.odp.api.ibean.IBeanHomeLocator.*;
import com.sap.odp.api.doc.IapiDocumentLockManager.*;
import com.sap.odp.api.common.types.*;
import com.sap.odp.api.usermgmt.masterdata.*;
import com.sap.odp.api.workflow.*;
import java.math.*;
import com.sap.odp.api.common.types.TypeFactory.*;
if(getApprovalStatus() != APPROVED){
home = doc.getIBeanHomeIfc();
home.upgradeToEdit(doc);
home.changePhase(doc,"Business Need");
IapiDocumentLockManager.unlockDocument(session,doc);
}
if(getApprovalStatus() == APPROVED){
home = doc.getIBeanHomeIfc();
home.upgradeToEdit(doc);
home.changePhase(doc,"Market Analysis");
IapiDocumentLockManager.unlockDocument(session,doc);
}
It would be great if you could check the above code.
Thanks,
Arijeet
Hi Arijeet,
As per my understanding the collaborator with APPROVER role has to approve the document. If yes then your presript is correct. Try to give a static value(use .equals() instead of .endsWith()) and check whether the document is getting locked or not. Try with this prescript code
collaboratorsCollection = doc.getCollectionMetadata("COLLABORATORS").get(doc);//to get collborators collection
iter = collaboratorsCollection.iterator();
while(iter.hasNext()){
member = iter.next();
if(member.getCollaboratorRole().getDisplayName().toUpperCase().equals("APPROVER"))
addApprover(member.getPrincipal());
}
Regards,
Vignesh
Hi Vigesh,
Thank you for your response. Yes, you are correct in understanding that the script picks up a single collaborator with role Approver. I will try the code changes and get back to you. Just wanted to check whther I am using the correct verison of TWE editor. I have used version 2.1.1 to design the XPDL's.
Do you think I need a higher version?
Thanks,
Arijeet
User | Count |
---|---|
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.