cancel
Showing results for 
Search instead for 
Did you mean: 

Hard coding an approval limit

Former Member
0 Kudos

Hi All,

I have been looking at hard coding an approval limit into some Project workflow prescript but I am having issues using compareTo with my limit.

I have been trying to use the below code:

import java.math.*;

// Get estimated value price

estvalueprice = doc.getEstimatedValue().getPrice();

// Set approval limit

limit = 200000;

// compare estimated value price against the approval limit

if (hasValue(estvalueprice) @and

   estvalueprice.compareTo(limit) < 0)

{

// add approver

}

Using this code I am getting an error when importing the XPDL file which is showing in the log as “Error parsing script”. Do I need to convert the limit before using it in a compare?

Many thanks

Dan

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Dan,

limit should be a BigDecimal. Try this...

BigDecimal limit = new BigDecimal(200000.00);

Regards,

Vikram

Former Member
0 Kudos

Hi Vikram,

That worked. Thank you for your help.

Regards

Dan

Answers (0)