Skip to main content

         This documentation site is for previous versions. Visit our new documentation site for current releases.      

Defining the input parameters of a rule

Updated on August 10, 2021

Control the type of information that users can pass to a rule by defining input parameters. By referencing these input parameters in your rule logic, you can use run-time data to make decisions.

For example, you can define income, debt, and expense information as input parameters to a rule in a life insurance application. At run time, the rule calculates a debt-to-income ratio to determine which policy plan meets the customer's lifestyle.

Note: Some rules do not support parameters or support only a subset of the following options. The names of fields vary, based on the type of rule that you update.
  1. In the navigation pane of Dev Studio, click Records.
  2. Open the form for a rule that supports parameters.
    For example: To edit an activity, in the Records section, expand the Technical category, click Activity, and then, in the list of instances, open the activity that you want to configure.
  3. Click the Parameters tab.
  4. Define an input parameter that your rule supports:
    1. Click the Add item icon.
    2. In the Name field, enter a unique identifier.
    3. In the Description field, enter text that describes how your rule logic processes the input parameter.
    4. In the Data Type list, select a format for the input parameter.
    5. Optional: To require a non-null value for the input parameter, in the Required? list, select Yes.
      Note: Do not make Boolean input parameters required because your application might interpret a false value as a null or blank value.
    6. Optional: To set the initial value of the input parameter, enter a value in the Default Value field that corresponds to the format that you select in the Data Type list.
  5. If the input parameter has the Data Type field set to Page Name, on the Pages & Classes tab, add a corresponding page name and class.
    For more information, see Defining the pages and classes of a rule.
  6. On other tabs of the rule form, update your rule logic to reference the input parameter by using the following notation: param.[input parameter name]
  7. To add another input parameter, click Add item, and then repeat steps 4 through 6.
  8. Click Save.
What to do next: You can test your changes by running the rule and providing values for the input parameters.

Prompting users for parameter values

You can prompt users for values when they run a rule that has input parameters. By displaying a list of options instead of a blank text box, you can help users provide information quickly and accurately.

Note: Some rules do not support parameters or support only a subset of the options below. Names of fields may vary, based on the type of rule that you are updating.
  1. Define the input parameters for your rule.

  2. In the header of the rule form, click Actions > View references to display a list of rules that call your rule.

  3. Inspect the list to ensure that your rule runs in response to an action that a user performs, such as a flow action, because parameter prompting does not occur when a rule runs programmatically.

  4. Click the Parameters tab.

  5. In the SmartPrompt type field, enter the first key part, which is typically the class, of the input parameter.

    For example, you can enter Rule-Message to display a list of messages that are available in the run-time class path.

  6. To refine the options in the list, enter the second key part of the input parameter in the Validate as field.

    For example, you can enter pyCaption when the SmartPrompt type field is set to Rule-Obj-FieldValue to display only field values with a field name that contains "pyCaption".

    You can also reference a property in this field.

  7. Click Save.

You can test your changes by running your rule.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us