Composer can validate your diagram files and other source files for completeness and accuracy.
For information on setting Validation preferences, see the figure in topic Project Properties dialog box. Select Validation.
Prompts Resource Validation
In Diagram Preferences, Global Settings, the Enable Validation for Prompt Resource preference enables diagram validation warnings where prompt audio resources no longer exist in the given file path. If the audio file is no longer present, the diagram block will show a warning icon.
This topic covers both callflow/workflow diagrams and interaction process diagrams (IPDs).
You can initiate standalone callflow or workflow validation in a couple of ways. When the callflow or workflow is saved and selected:
- Diagram > Validate from the menu.
- Click the Validate icon on the upper-right of the Composer main window .
Note: In case of errors, the Problems view will become visible and error markers are put on the callflow or workflow blocks that contain errors. Double clicking on an error in the Problems view will take you to the corresponding blocks that contain the errors. Review each of the errors and do the fixes, then validate again. After validation, you can generate code.
Interaction Process Diagram Validation
The validation process is basically the same for IPDs. When the IPD is selected or in view :
- Diagram > Validate from the menu.
- Click the Validate icon on the upper-right of the Composer main window.
When invoked, validation checks for the existence of objects in Configuration Server and indicates the results. Validation does not make changes in Configuration Server as part of the process. Note: If Composer is not connected to Configuration Server, clicking the validation button brings up the Connect to Configuration Server dialog.
Source File Validation
There are two types of validation that can occur when you are working with source files in Composer Rich editors:
- Source validation
- Batch validation
Source validation occurs as you type your code; this validation reflects the "unsaved" and "unbuilt" contents of the source you are editing. Note: To turn source validation on (or off) for all structured text editors, click Window > Preferences > General> Editors> Structured Text Editors and check (or uncheck) Report problems as you type. Batch validation occurs on saved files. Batch validations may catch build process errors and other types of non-source validation errors. Batch validation can uncover errors in multiple files at once and give you a comprehensive view of where problematic code can be found in your project. Moreover, you do not need to open files in an editor to run batch validation. To run batch validation on specific files, select and right click the files in the Project Explorer and then select Run Validation from the popup menu. Note: To set preferences for batch validation, click Window > Preferences > Team > Validation.
Project Level Validation
You can validate a Project using the integrated Composer Validator, which is enabled or disabled at global level using the Validation preferences (Window > Preferences > Team > Validation > Composer > Composer Validator).
- Invoke Composer Validator on a Project or individual file by right clicking and selecting Validate from the pop-up menu.
Note: Automatic validation does not occur during any change in resource contents, since this action is taken care by the Composer Project Builders. You can enable or disable Composer Project Builders using the Project > Build Automatically menu option.
Project Level Validation Use Cases
Here are some possible validation use case scenarios:
- Validate all the callflow and workflow diagram files within the Composer Project.
- Validate all the referenced subroutines and subdialog diagram files, which have the corresponding .scxml / .vxml files generated inside the src-gen folder.
- Validate all the GBuilder files, which have the corresponding .grxml file generated within the Grammars folder.
- Validate all ASP.NET related resources within a .NET Composer Project.
- Validate all JSP related resources within a Java Composer Project.
Validating a Single Flow Diagram
- Starting with 8.1.4, Composer shows a warning when validating a workflow if some (potential) infinite loop is detected.
- Composer shows the developer (via IPD Diagram properties) the Orchestration Server SCXML attributes for infinite loop defense.
To configure the contents of the Problems view to view only warnings and errors associated with the currently validated callflow/workflow:
- Open the Problems View by selecting Window > Show View > Problems.
- On the top right side of the Problems view, click the down arrow to display the View menu.
- Select Configure Contents.
- On the left side of the Configure Contents dialog box under Configurations, select Errors/Warnings on Selection.
- Under Scope, click On selected element and its children.
- Click OK.
For more information on this dialog box:
- Select Help > Contents.
- Open the Workbench User Guide.
- Expand Concepts > Views > Problems.
- Review the Problems View topic.