| 47 | == UpdateFunction |
| 48 | An UpdateFunction is one of the phases of the DialogPhase. It allows computation of derived variable values. These functions can be programmed in Java. Generally these functions look like this in json |
| 49 | |
| 50 | {{{ "updatefunction":{"NameOfFunction":[["invar1","invar2",...],["outvar1","outvar2",...]]}, |
| 51 | |
| 52 | NameOfFunction is the name of a java class that implements the UpdateFunction class. |
| 53 | This class implements a function Parameters {{{call(Parameters parameters) }}} |
| 54 | |
| 55 | The incoming Parameters will be set to the current parameter values in the dialogstate . |
| 56 | The Parameters returned by the function will be put back into the parameter values of the dialogstate. |
| 57 | |
| 58 | This mechanism allows the function to be called with different parameters as needed in the dialog. And it allows functions of arbitrary input and output arity. |
| 59 | |