This topic provides an overview for how to write a Rule for a Process Flow Step. It assumes that you are familiar with writing complex SQL statement and VB.NET scripts.

See Administering Scripts for information on using scripts in Aptify.

 

SQL Rule

Follow these steps to define a Process Flow Step using a SQL statement:

  1. Add a Rule step to the Process Flow diagram.
  2. In the Properties area, enter a Name for the step.
  3. Click the Rule tab and select SQL as the Rule Type.
  4. Enter the SQL statement that performs the operation required by your process flow design. Keep in mind the following:
  5. Click the Rule's Properties tab and add any input values required by the rule to the step.
  6. Click the Rule's Action Map and add the possible results that the SQL statement can select and specify the next action that should occur when that result is returned.
  7. Save the Process Flows record to save your SQL Rule step.

VBScript Rule

Follow these steps to define a Process Flow Step using a VB.NET script:

  1. Add a Rule step to the Process Flow diagram.
  2. In the Properties area, enter a Name for the step.
  3. Click the Rule tab and select VBScript as the Rule Type.
  4. Click the buttons in the Script toolbar to review the set of intrinsic Available Objects that you can use directly in the script, the set of available object you can reference within the script, and any available examples.

    Blank Script Control

    Available Objects for Validation Scripts

  5. Using VB.NET syntax, write a script that provides the logic required for this process flow step.
      • This rule opens a message box that displays The value provided [value] is < 100.
      • The value included in the message box corresponds to DemoValue, which is an Input Property for the Process Flow. The oProperties.GetProperty method retrieves the DemoValue from the Process Flow's Context Object.
      • After displaying the message box, the script calls oResultCode.Value=SUCCESS to create an Action Map result (called SUCCESS) for the step.
      • See the rule-based steps included with Aptify's delivered Process Flows for more examples. (See Process Flows as Delivered on page 200 for more information about these Process Flows.)

        Sample VBScript Rule

  6. Click the Rule's Properties tab and add any input values required by the rule to the step.
  7. Click the Rule's Action Map and add the possible results that the VBScript can generate (based on the oResultCode.Value options you defined) and specify the next action that should occur when that result is returned.
  8. Save the Process Flows record to save your VBScript Rule step.