cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow according to Estimated Value of Project

Former Member
0 Kudos

Hi All ,

I am trying to create a workflow and the requiremement is that the second approver shall get added only when Estimated amount of the Project is

greater than some amount.For that I tried adding the condition to check at the time of transition along with getApprovalStatus() as follows

getApprovalStatus() == APPROVED && doc.getFieldMetadata("ESTIMATED").get(doc).getPrice(2).intValue()<600 but this is not working.

Any idea on how to achieve the requirement would be great.I am looking for a 2 step when ever the Estimated Value is greater than some amount else it shall be one Step approval.I tried using Otherwise transition but no idea on how to use it.

Regards,

Uday.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Uday,

Leverage the functionality that when you do not add approvers in a particular step, that step is auto-approved.

Here is what you can do:

1) Add the 1st step approver using your existing logic.

2) When this user approves the document, transition to the second step.

3) in the prescript for 2nd step, put your code under the condition if(estimatedValue > 600). Here estimatedValue is the value of the field you want to consider.

Thanks

Devesh

Former Member
0 Kudos

Hi,

In addition to Devesh's response above, you also have to specify the transition condition after the second step as getApprovalStatus() != PENDING instead of getApprovalStatus() == APPROVED.

I struggled with this for a bit and that's how I resolved my issue where the workflow was not advancing beyond the second step.

Thanks,

MP

Update on Dec 06, 2011

I would like to correct the above statement. I am now able to get the workflow working for optional steps with the standard getApprovalStatus() == APPROVED since the step is Auto approved.

Edited by: MP1234 on Dec 6, 2011 11:15 PM

Former Member
0 Kudos

@Devesh

That functionality is nice!... it did implemment for me,but the requirement got changed!...

Regards,

Uday!

Answers (0)