Document Builder: rule evaluation process

131 阅读1分钟

Created by Jerry Wang on Jul 09, 2014

start evaluation:

 

clipboard1

 

 

delegate to evaluator's method:

 

clipboard2

 

 

double click on formula's internal table ARGUMENTS:

 

clipboard3

 

 

we could find three entries which represent the design time rule: 

 

clipboard4

 

 

since current evaluation is a IF-ELSE evalation, so first we evaluate the result of IF condition in line 620 ~ 624. If result is true, we go to the first IF branch ( line 628 ) or else the second branch ( line 634 ).

 

clipboard5

 

 

Now try to evaluate whether ZFIRST = 'X'?

 

clipboard6

 

 

This is quite easy as from previous discussion we know that in reference mo_document we could get all the variables' content there.

 

clipboard7

 

 

in our example, ZFIRST is set to false:

 

clipboard8

 

 

 

 

clipboard9

 

 

since now the IF condition does not fulfill, we go to the ELSE ( the second ) branch of IF statement:

 

clipboard10

 

 

then use a dynamic call to execute the rule:

 

clipboard11

 

 

importing and exporting parameters are specified through eval_args:

 

clipboard12