Validation of workflow
The validation process is invoked when the Planning Engine data is saved in SCP
configuration. The validation is invoked for every workflow definition in the Planning Engine.
The process uses the model definition from the Planning Engine definition to validate the
references, from workflows to the model such as classes, properties, attributes used in the
workflow.
The workflow source text is processed to check for issues. The process continues to collect all findings and report the issues at the end of the validation. The checks performed by the validation are a subset of run-time validations. A workflow that has been validated successfully can still generate warnings or errors during run-time.
As part of the validation process:
- All syntax errors are collected.
- All incorrect model references are collected.
- An exception is generated if any error is reported in step 1 or 2. The exception contains one or more messages. Each message corresponds to one finding of the validation (a syntax error, or a model reference error). If there are no findings, no exception is generated and the validation is completed. The message in the exception are processed and displayed to the user.
Note: In the current SCP version, if the validation is completed with one
or more errors, all error messages are displayed and the user is not allowed to save the
Planning Engine definition.
Examples of errors that are not checked as part of the validation process:
- Unknown workflow commands. This is only checked during workflow execution at run-time. If an unknown command is encountered at run-time, an error is reported and the command is not considered.
- References to unknown names of nested workflows and solves (the parameters of
workflow:
andsolve:
commands). If an unknown name of a nested workflow or a solver is encountered at run-time, an error is reported and the workflow or the solver invocation is not considered.