Example rules using areElementsInRange

Following are example rules created using the areElementsInRange rule:

Example 1: Simple rule

if(areElementsInRange('System,COMPANY,PROCESS_LEVEL','[HR,AP][2001-4321]
 [RBH],[][117][AP,GL,IC,PO,RQ]'))
{'ALL_ACCESS'}
else
{'NO_ACCESS'}}

Example 2: More complex rule when many process levels are interrogated

if(areElementsInRange('System,COMPANY,PROCESS_LEVEL','[][101-999][IF],[][117][AP,GL,IC]'))
{'ALL_INQUIRES'}
else{if(areElementsInRange('System,COMPANY,PROCESS_LEVEL','[][306][AC,AM,AP],[][330-339][AC,AM,AP],
  [AC][9][15330000001-15339999999,15FA33000-15FA33999]'))
{'ALL_ACCESS'}
else{'NO_ACCESS'}}

Example using legacy "PROCLEVEL" rule

The following is an example of a rule that was written against the PROCLEVEL element before "areElementsInRange" function was available.

This example rule performs the same checks as "Example 2" in the areElementsInRange section above.

if((COMPANY>='101'&&COMPANY<='999')&&(PROCESS_LEVEL=='IF')){ 'ALL_INQUIRES'}
else{if((COMPANY=='117')&&(PROCESS_LEVEL=='AP')) { 'ALL_INQUIRES'}
else{if((COMPANY=='117')&&(PROCESS_LEVEL=='GL')) { 'ALL_INQUIRES'}
else{if((COMPANY=='117')&&(PROCESS_LEVEL=='IC')) { 'ALL_INQUIRES'}
else{if((COMPANY=='306')&&(PROCESS_LEVEL=='AC')){'ALL_ACCESS'}
else{if((COMPANY=='306')&&(PROCESS_LEVEL=='AM')){'ALL_ACCESS'}
else{if((COMPANY=='306')&&(PROCESS_LEVEL=='AP')){'ALL_ACCESS'}
else{if((COMPANY>='330'&&COMPANY<='339')&&(PROCESS_LEVEL=='AC')){'ALL_ACCESS'}
else{if((COMPANY>='330'&&COMPANY<='339')&&(PROCESS_LEVEL=='AM')){'ALL_ACCESS'}
else{if((COMPANY>='330'&&COMPANY<='339')&&(PROCESS_LEVEL=='AP')){'ALL_ACCESS'}
else{if((SystemCode=='AC')&&(COMPANY=='9')&&(PROCESS_LEVEL>='15330000001'&&PROCESS_LEVEL<='15339999999'))
 {'ALL_ACCESS'}
  else{if((SystemCode=='AC')&&(COMPANY=='9')&&(PROCESS_LEVEL>='15FA33000'&&PROCESS_LEVEL<='15FA33999'))
 {'ALL_ACCESS'}
  else{'NO_ACCESS'}}}}}}}}}}}}