Link Metadata to Actions

You can configure process steps using link metadata. A link allows you to use information stored in metadata instead of hardcoding values in the process. You use instead references to the information stored in the metadata that you link to actions in the process.

The metadata references are converted into metadata information at generation time, and the process step code remains generic. If you link the same step to another metadata, or if the metadata is modified, then the action will use the new metadata information.

For example, instead of hardcoding a file path in multiple file actions, link a file metadata to all these actions and use the file path centrally defined in the file metadata.

Metadata linking is frequently used to access, within processes, connections, and other structural information (table names, list of columns, etc.) typically stored in metadata files.

To link a metadata to a step:

  1. Open the process that you want to modify.

  2. In the Project Explorer view, select the metadata that you want to link. For example, a data store or a data server.

  3. Drag and drop the metadata onto the step in the diagram. It is added as a Metadata Link on the step element.

  4. Select this metadata link, right-click and then select Show Properties View.

  5. In the properties view, set the following parameters:

    • Name: Name of the Metadata Link. This name is used as an alias to access the content in the metadata.

    • Description: Description of the metadata link.

    • Visibility: Define whether the link is visible for this current action or also for the parent of the action.

  6. Press Ctrl+S to save the process.

Use the Linked Metadata

Use a Connection

When you link a data server or schema metadata an actions (or to processes containing actions), you automatically use this data server or schema for the action. For example, when an action (for example, the SQL Operation action) requires a SQL Connection, the SQL connection of the linked metadata is automatically used.

Use Specific Information

Via the metadata link, you can access specific information contained in the metadata. This information is accessed using an XPath query. You can use such a value retrieved from a metadata link in the code and any property of the action.

When using this method:

  • You should use the Name (alias) set when defining the metadata link as a variable in the XPath expression.

  • The XPath expression must be surrounded with %x{…​}x% to be interpreted accordingly and resolved at run-time.

Use a Metadata Link

For example, a metadata link to a data server is named Local_DB. The following XPath expression returns the JDBC URL defined in the data server.

%x{ $Local_DB/tech:jdbcUrl() }x%

Note the use of the $Local_DB variable to access the metadata by the name of the metadata link. The /tech:jdbcUrl() XPath expression searches for the JDBC URL defined in the metadata.