Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Two Workflows in Sequence

Hi Experts ,

I have requirement of having two workflows at two consecutive phases one after the other.

Like if my phases are a b C D e .

I am having workflows at C and D .

Problem I am facing is ,if the workflow at Phase C gets approved it shall move to Phase D and It is rightly moving and adding the approver which I am picking at workflow D by pre script , but it is not locking the document though the Approver is getting the option to approve or reject the document at Phase D.

Prescript of XPDL at C at Approval activity is : Pick the owner of the document and add as approver

Postscript of XPDL at C:If approved go to Phase D for this the code is like

if (getApprovalStatus() == APPROVED)
{
    home = doc.getIBeanHomeIfc();
    home.upgradeToEdit(doc);
    home.changePhase(doc,"D");
 }

Prescript of XPDL at D at Approval activity is :Pick some other collaborator role of custom type

Postscript of D:If approved go to Phase e for this the code is like


if (getApprovalStatus() == APPROVED)
{
    home = doc.getIBeanHomeIfc();
    home.upgradeToEdit(doc);
    home.changePhase(doc,"e");
 }

What I feel is like in Postscript of C the document is being brought to edit mode to change phase of the document then phase change is taking place and since one more workflow is attached it is executing the prescript of it first i.e picking another approver and adding as approver but not locking the document.

I tried using the following code after changing phase in postscript of C hoping it might help in locking the document!.But it din't help me still.

home.save(doc);

home.downgradeToView(doc);

Any help wud be gr8!

Regards,

Uday

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question