Maximum

<< Click to Display Table of Contents >>

Navigation:  Bizagi Studio > Process wizard > Business Rules > Business rules examples > Perform Math operations >

Maximum

Overview

This function returns the largest value of a set of numbers.

 

CHelper.Math.Max([Number1,Number2])

 

The parameters of this function can be defined as Xpaths, variables or numbers, and must be between brackets

 

Considerations

Input parameters must be double.

The supported attribute types to use as input XPath parameter (or Xpaths stored in variables) are: integer, currency, float, real.

The function returns error if an input array is either too long or undefined.

Use the IsNaN function to validate the parameters used are numbers.

 

Example

A loan application is not rejected if the  applicant or co-borrower bureau score is greater than 600. You can use the Max function to evaluate which is the best bureau score and based on that define if the application is rejected or not:

 

Math4

 

//Obtain the Best bureau score between the applicant and his/her borrower

Bestscore= CHelper.Math.Max(<LoanApplication.Applicant.Score>,<LoanApplication.Coborrower.Score>)

 

//Evaluate if the Best score is greater than or equal to 600

if (Bestscore>=600)

{

//If so do not reject the application

<LoanApplication.Rejected>= false;

}else

{

//If not reject the application

<LoanApplication.Rejected>= true;

}