Manage transformation rules

You define transformation rules for the case attributes and events in separate scripts. The scripts for events are called event collectors.

You need SQL knowledge to add or customize transformation scripts.

Mandatory script items

Make sure that the scripts contain all the mandatory script items:

  • The case attribute script must include the case ID

  • The event scripts must include the case ID, the event name, and the timestamp of the event

Mandatory script items are indicated by a status indicator placed above the script:

Status indicator Description
Mandatory script item is missing
Mandatory script item is added

Error linting for event collectors and case attributes

The script editor provides a linter that parses the script to detect errors related to event collectors and case attributes. Rows with errors are highlighted and indicated by a red dot. Each error in a row is indicated by a wavy underscore. If available, additional information is displayed when you hover the error.

Resolve all indicated errors. In case that one of the mandatory script items is missing, the pipeline will break.

Add or customize transformation rules

You can add or customize transformation rules from two places:

  • From the Process data model card in the Overview tab

  • From a business object in the Process data model tab

Add or customize transformation rules from the overview tab

Follow these steps:

  1. Open your process data pipeline.

  2. On the Overview tab, find the business object in the Process data model card and click it.

    The script editor opens. Available scripts containing the transformation rules are listed in the sidebar.

  3. Add new scripts or customize existing ones, read more in section Script editor options.

  4. Confirm with Save.

    Your changes are applied when the data pipeline is executed the next time.

Add or customize transformation rules from the Process data model tab

Follow these steps:

  1. Open your process data pipeline, then the Process data model tab.

  2. Click , then Edit.

    The script editor opens. Available scripts containing the transformation rules are listed in the sidebar.

  3. Add new scripts or customize existing ones, read more in section Script editor options.

  4. Confirm with Save.

    Your changes are applied when the data pipeline is executed the next time.

Script editor options

Add and edit scripts

To add and edit scripts, use the following options in the sidebar:

  • To add a script for case attributes, select the Case Attributes tab and paste your script.

  • To add a script for events, click Add event collector and paste your script.

  • To name or rename a script, click and enter a name.

  • To edit a script, select it and apply your changes to the script or if you want to add a part select the right place and add the extension.

  • Under Available columns, you can search for available source data, tables, and columns. Either search in the tree structure or enter a search string in the search field. To add an available column, select it. The column is added to the script at the current cursor position.

Preview the script result

To preview the result of a script, use the following options:

  • Preview: Click . The preview shows the first 100 rows of the script result

  • Cancel: Click to cancel the preview

  • Reload: Reload the preview of the script result

  • Dismiss: Click to hide the preview

  • and : Move the preview area down or to the right

Generating a preview can take some time. While a script preview is loading, you can switch to another script.

Find and replace

To find and replace script elements, follow these steps:

  1. In the script editor, click .

  2. Enter the search term you want to locate.

    Findings are highlighted in the script. You can navigate the findings with the arrow buttons next to the search field.

  3. If you want to replace a finding, click and enter the new term in the Replace with field.

  4. Choose whether to consider capitalization by selecting the Consider capitalization option.

  5. Click Replace or press Enter. To update all findings at once, click Replace All.

    The script is updated accordingly.

Shortcuts to edit script

To view the available shortcuts for editing script, follow the steps below:

  1. In the script editor, click .

    A pop-up window appears with a list of shortcuts.

  2. In the pop-up window, scroll down to view all the available shortcuts.

  3. Click to close the pop-up.

Delete transformation rules

Deleting can't be undone.

You delete transformation rules in two ways:

  • From the Process data model card in the Overview tab

  • From a business object in the Process data model tab

Delete transformation rules from the overview tab

Follow these steps:

  1. Open your process data pipeline.

  2. On the Overview tab, find the business object in the Process data model card and select the business object.

    The script editor opens.

  3. In the sidebar, click for the script you want to delete.

    The script is selected for deletion.

    To undo the selection, click .

  4. Confirm with Save.

    Your changes are applied to the next execution of the data pipeline.

Delete transformation rules from the Process data model tab

Follow these steps:

  1. Open your process data pipeline then the Process data model tab.

  2. Select the required business object and click , then Edit.

    The script editor opens.

  3. In the sidebar, click for the script you want to delete.

    The script is selected for deletion.

    To undo the selection, click .

  4. Confirm with Save.

    Your changes are applied to the next execution of the data pipeline.

Next steps

Run the complete data pipeline