cancel
Showing results for 
Search instead for 
Did you mean: 

Question about creating Contract Document workflow

Former Member
0 Kudos

Hi experts,

I have started to create the first workflow for the Contract Document. I have a lot of questions in mind and i think you guys can help me to clarify those question. Please see the following question.

1. When i created a new Phase Defination for Contract Document, i have seen 2 phases which can not be remove ('Draft' and 'Excuted'). I understand that those phases are the madatory phase for Contract Document, when a contract is created and saved for 1st time it will be automatically moved to 'Draft' or i need to write the script to change the phase to 'Draft'. When everythings done('approved') it should be moved to 'Excecuted'. Am i correct?

2. I'd like to add the approver in the Collaborators collection. for example i'd like to add 'noppong.j' (user id) as approver in the Collaborators,. which api do i have to use to look up the user object and add it to Collaborators collection.

3. I'm using TWE 2.2-1 to create XPDL. Does the participant in the TWE tool have to be the same as the approver in the script.In other word the participant in TWE is 'Approver', but i add 'noppong.j' as the approver in the preScript. Is in work?

Noppong,

Thank you in advance

Edited by: Noppong Jinbunluphol on Nov 2, 2011 11:19 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

1. As you said Draft and Executed are the default mandatory phases and a contract document is always created & saved in draft phase. You need not incorporate additional logic to achieve this. Executed phase is the final phase iteration once all the approvals are complete.

2. Following methods can be used in prescript to add approvers:

addApprover(principal) : Adds the specified principal to the list of approvers. The principal must be an object reference to a group or a user.

addApprover(principal, rule): Overloaded variant of the previous method. The addition of rule controls whether all approvers must approve or any of the approvers can approve the activity

You can further look into threads wherein you would find multiple examples of usage of these methods

Regards

Mudit Saini

Former Member
0 Kudos

Thanks Mudit,

I want to ask more questions. I have just realized that 'addApprover()' is not available outside workflow. I thought i could be able to write the logic to add the approvers in the save context.

1. How can i add the approvers when the Contract document is created.

2. What is the normal case to add the approver in Collaborators collection when the Contract Document is saved.

Thank you in advance

Noppong

Former Member
0 Kudos

Hi

I can think of two approval scenarios that I am explaining below.

1. Approver automatically added based on certain predefined condition once contract is moved to approval phase: This scenario could be achieved using workflows wherein using addApprover() method approver would be added dynamically.

2. Adding Approver manually to collaborator list in master agreement: You can add approver manually or using scripts by getting access to collaborators list using functions getCollaborators() and create() and set collaborator role using function setCollaboratorRole() however in this case there is no dynamic identification of collaborators taking place.Again here also you would need to use workflows to carry out approval process.

I would suggest using the first option as it would provide more flexibility. Hope this would clarify things

Regards

Mudit Saini

Edited by: Mudit_UCB on Nov 3, 2011 8:29 AM

Former Member
0 Kudos

Thank you so much Mudit,

Your post is useful for me to start creating the first workflow. Do you have link or blog to share about the Scripting and Workflow, i think the document from SAP is not enough for complicated case.

Thanks you,

Noppong

Answers (0)