cancel
Showing results for 
Search instead for 
Did you mean: 

Put a Comment/Reason if the workflow phase is skipped.

ritikbaral
Explorer
0 Kudos

Hi Sourcing Experts,

We have a multi level Contract Approval Workflow. It has two approval steps . This is working perfectly fine. Now the business has come up with a requirement saying if we jump any approval step, then we have to put a comment/reason for that. Is there any way to achieve this. Do I have to develop another workflow or it can be handled through the customization.

Thanks ,

Ritik

Accepted Solutions (0)

Answers (3)

Answers (3)

ritikbaral
Explorer
0 Kudos

Thanks Devesh/Baski for your help. My issue is resolved .

Former Member
0 Kudos

Hi Ritik,

Adding on to what Baski has already mentioned, please be informed that if you do NOT add any approvers in a particular step then that step is auto approved.

Based on this you can choose to write to an extension field (called Reason) and as Baski mentioned - this should be done in the post script for that step.

Also, If by skipping an approval step you mean just pushing the document to some other phase by skipping over an approval phase then you can write a PrePhaseChange script to achieve what you have in mind.

Thanks

Devesh

ritikbaral
Explorer
0 Kudos

Hi Devesh/Baski,

Thanks for your input. So as per your suggestion first we have to put a comment/note section in our agreement where the comments will be stored.The other part will be configuring the workflow(only the Postscript) in the phase just before the approval phase, which will check whether we are skipping the approval phase or not. Please correct me if i am wrong.

Thanks,

Ritik

Former Member
0 Kudos

Ritik,

I would say it is partially correct.

Yes, you should have a comment section on the MA where you can store all the comments.

But if you want to see whether a phase has been skipped and do some processing based on that then I would suggest you use a PrePhaseChange target script. You dont need to change anything in your workflow.

You should clarify you requirement a little here. Do you need to skip an approval step or an approval phase?

An approval step is an activity inside the XPDL file whereas an approval phase is a document phase to which an XPDL(i.e. approval) has been attached.

The solution I gave above is for skipping an approval phase, not a step.

Thanks

Devesh

ritikbaral
Explorer
0 Kudos

Hi Devesh,

Thanks a lot Devesh for your reply. The functional team will put the field for comment/note in the Master Agreement.

In our case the user may skip one approval phase, not the approval step.

I checked this place where we can put our PrePhaseChange Script, but I am not sure on this. The concerns are:

1. How this script will get triggered when I will change the Workflow phase .

2. How this script is linked to the Master Agreement & Contract that I am using , because no where we are specifying the

Agreement Name or Contract Document Name while defining this PrePhaseChange Script . I am bit curious about the

relationship will between these.

Location where I defined the PrePhaseChange Script:

SETUP->[System Setup]->Integration->Script Definition->Document Life Cycle Event->Create->[Target: Pre Phase Change]->In the Script box the scripting logic will go.

Is the above place is the right place to put the Pre Phase Change Script.

Thanks,

Ritik

Former Member
0 Kudos

Hello Ritik,

There are some system variables that are available specifically for PrePhaseChange/PostPhaseChange scripts. You can use these variables to access the current, next and previous phases.

You can manually mention in the code the current and next phase combination for which your logic needs to be executed. This script gets called automaically whenever a contract document/project transitions from one phase to another.

In order to access the details of the MA you have to consder it as the parent of the contract document on which this script is executing.

I would suggest reading the online help/guide before moving forward.

Thanks

Devesh

Former Member
0 Kudos

Hi Devesh,

Ritik and myself are working on this requirement.

We have a Contract Phases as:

Supplier Draft

Final Legal Review

Executed

At Supplier Draft, buyer will see whether any changes are done to the contract by the Supplier.

If there are no changes, the contract is directly put into ' Executed' phase skipping the ' Final Legal Review ' phase.

When the above process is done, we want to put a comment as to why the ' Final Legal Review ' phase is skipped.

The workflow is attached at ' Final Legal Review ' Phase.

We have written a script for Pre Phase change and also have the ' comment' extension in place. The script is not getting triggered. What could be the issue.

Regards,

Pankaj/Ritik

Former Member
0 Kudos

Hello,

Well, it is kind of difficult to point the exact reason for this.

It requires no configuration to run this script. It is executed automatically on a phase change. Only the correct class and target need to chosen.

Are you sure the script is not being triggered? I mean try raising an exception at the first line of the script and see whether it is executed. In this way you can at least be sure whether the script is being called.

You can also give a pseudo code for what you have coded.

Thanks

Devesh

Former Member
0 Kudos

Hi Ritik,

There are no configurations around this. You have to change the xpdl file attached. You may have to work on your XPDL post script to perform this. Note: Changing workflow defnition will not affect the documents that are already in workflow...

btw, do you plan to show this information in some extension text fields or in workflow history view?

Thanks,Baski