Troubleshoot Data Association

The following troubleshooting tips pertain to performing data association.

When I click Apply in the data association editor, I receive an error that validation of associations failed.

The output data type from the previous process flow element doesn’t match the input data type that the current process flow element expects.

To solve the problem, first make sure you dragged and dropped the correct data object. If the data object is correct, add a function that converts the data type:

  1. In the data association editor, click the Launch Expression Builder icon next to the input field.

    The Expression Editor opens.

  2. Surround the data object name with a function named for the type that the current process flow element expects.

    For example, if the field name is inputDataObject, and the type must be string, type string(inputDataObject) in the Expression Editor.

  3. Click OK to close the Expression Editor and then click Apply.

When I click the Validate Application icon, I receive an error stating that data association isn't valid because double or float can't be assigned to int.

A field with a data type of int can only contain integers, or whole numbers. A field of type double or float can contain decimal numbers.

In data association, if the input type is int, the output type can be any numeric data type, such as int, double, or float. However, if the output type is int, the input type must also be int, or an error occurs.

You can solve the problem in one of these ways:

  • Change the data type of the input field to int.

  • Change the data type of the output field to double or float.

  • Use an expression to convert the input field type to int.

To convert the input field type:

  1. In the data association editor, click the Launch Expression Builder icon next to the input field.

    The Expression Editor opens.

  2. Surround the field name with the round() and int() functions.

    For example, if the field name is loanAppDataObject.form.income, change it to int(round(loanAppDataObject.form.income)).

  3. Click Validate to verify the expression and then click OK.

    The Expression Editor closes.

For example, if you’re performing data association for a Decision and the inputs are from a form, you can solve the problem in one of these ways:

  • In the form editor, use a Quantity field, which has a data type of int.

  • Recreate the Decision and make sure the Fact Type is double or float.

  • Use an expression to convert the input field type to int as described previously.