process4.biz 7.x Documentation

features description for Process4.biz

Validation Scripts

Validation scripts are used for methods verification and are created and maintained in Database Designer. They analyze diagrams and inform on whether the modelling is wrong (according to the defined criteria). Validation scripts are written in VB (Visual Basic) and you can use allp4b API functions.

The difference between conditions for link rules and validation scripts is that validation scripts analyze existing links - the conditions for link rules, can prevent the creation of the links, if the modelling was wrong.

Attention:

To create validation scripts, basic programming skills are recommended.

Create Validation Scripts

  1. Choose the desired Unit in the Database Designer.
  2. Open the section “Validation Scripts” in the navigation window.
  3. Click on the button “New”.

    1. Alternatively, you can use the function “New” from the context menu of the section “Validation scripts”.
  4. properties window appears for the newly created validation script.

    1. Name
      The desired name for this validation script.
    2. Unit
      Unit cannot be changed in properties window as it was chosen in step 1.
    3. Target classes ID
      Select the class(es) whose objects are to be analyzed.
    4. Enabled diagram classes
      Select the diagram class/es where validation script will be executed.
    5. Enabled
      Enables/disables the validation script.
    6. Validation message
      Enter the text you want to be displayed in the validation window. It is displayed only when the variable “result” after running the validation script contains the value “True”.
    7. Validation script text
      Enter here the validation script to be executed; this can be a condition (also: Conditions for Link Rules, or a small program in Visual Basic.
  5. Clicking “OK” creates the validation script.

* 328807
*

Properties window of a validation script.

Examples of validation scripts

Validation Rule

Script text

From an object of the class "input", there should always be an outgoing link.

An object of the class "input", can have no incoming links.

An object of class "Output" should have no outbound links.

Each object of the class "activity" should have an appropriate RACI link to a role under "R".
An object of the class "activity" should always be linked either with another object of this class, or with an object of the class "Output".
Roles linked as "R" and "A" cannot have the same name, i.e., there should be different objects.

Validate charts

When [Conditions for Link Rules]((conditions-for-link-rules) and/or Validation scripts have been defined, you can validate diagrams.

To do this, open a diagram and click on the validation icon (green check mark) in the process4.biz menu.

In the validation window at the bottom of the diagram appear now the messages about the successful or unsuccessful validation. These messages can be controlled by clicking on the 3 different signs:

  • Green:

    Shows successful messages (Result = True)

  • Yellow:

    Shows neutral messages and instructions (see: System dialogues)

  • Red:

    Shows error messages (Result = False)

You can also use the search to locate the validation window for an object or a class.

When you double-click on a validation message, it or the corresponding shape/s will be marked on the diagram.

328809

Validate a diagram.