Skip to main content
Skip table of contents

Setting Dynamic Parameters

How can I set parameters dynamically?

In a technical process, you can set parameters dynamically to control process modules depending on the processed data and, if necessary, overwrite parameters already set at process runtime.

Dynamic parameters are generated using XSL mappings that output specific processing instructions. These processing instructions are processed by a subsequent process component (e.g.To do this  an adapter).

To do this, you have several options:

  • Set parameters via single XSL mapping: Here you can create a single XSL data mapping that transforms XML data and contains dynamic processing instruction definitions at the same time.
  • Parameterize dynamically without data transformation: You can also create a separate XSL mapping that generates processing instructions only.


Note

Observe the following prioritization when using Component Parameters and setting parameters dynamically:

  • Component parameters overwrite the configuration of process modules in the repository (for example, function adapters) at process runtime.
  • Dynamic parameters overwrite set parameters (global, project and system parameters) as well as the configuration of process modules in the repository (for example, function adapters) at process runtime.

Setting Parameters Dynamically via XSL Mappings

  1. Place an XSL mapping before the adapter or database connection to be parameterized in the Technical Process.

  2. Define a processing instruction in the XSL mapping according to the following pattern: <xsl:processing-instruction name="DynamicParameter">ParameterName=" ParameterValue "</xsl:processing-instruction>.

  3. Replace ParameterName with the required parameter name.

  4. Replace ParameterValue with a value, in most cases using an XSL instruction.

  5. If the XSL mapping shall create dynamic parameters only, define an additional processing instruction <xsl:processing-instruction name="NoResult"/>. As a result, the XSL mapping will not produce an output document.

Note

The XSL mapping must generate a root element in each case in order to be able to execute the mapping.

Parameterizing Dynamically without Data Transformation

If you want to hand over an input document without transformation to a dynamically parameterized adapter, insert a Fork component into a Technical Process diagram:

  1. In the first branch, set the XSL mapping according to the above described procedure.
  2. In a second branch, set the process component to be handed over.
  3. Place the adapter right after the Join component.

Example

A file name stored inside an XML document is handed over to a File system transfer adapter as dynamic parameter.

In this example, the XSL mapping contains the following code:

XML
<xsl:stylesheet xmlns:xsl="http://www.w3.org/" version="1.1">
  <xsl:output method="xml" media-type="text/xml"/>
  <xsl:template match="/"> 
    <xsl:processing-instruction name="DynamicParameter">path=" 
      <xsl:value-of select="data"/>"
    </xsl:processing-instruction>
    <xsl:processing-instruction name="NoResult"/> 
    <root/> 
 </xsl:template>
</xsl:stylesheet>

Dynamic Parameters with DynamicParameter

With XSL mappings, you can control the process execution at runtime. An XSL mapping implements the logic to customize the configuration of adapters, transfers, and database connections. Depending on the processed data, custom parameter values can be set. Those custom parameter values will be processed by the following adapter or database process component and overwrite parameter values set in the component.

Creating Parameter Values

To set parameter values within Technical Processes dynamically, create an XSL mapping that produces a specific Processing Instruction which will be handed over to the following process component and will be interpreted.

HTML/XML
<xsl:processing-instruction name="DynamicParameter">
parameterName="parameterValue"</xsl:processing-instruction>

Output of the XSL mapping:

HTML/XML
<?DynamicParameter parameterName="parameterValue" ?>

Parameters and parameter values

In the XSL mapping, you can define any number of different parameters and corresponding values:

  • parameterName: Name of the parameter to be overwritten
  • parameterValue: Parameter value to be overwritten; always inside of quotation marks

Note

Please note that the XSL mapping must generate a well-formed XML document providing a root element, in order to be able to execute the XSL mapping.

Example

XML
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
version="1.0">  
  <xsl:output encoding="UTF-8" method="xml" indent="yes" version="1.0"/>  
  <xsl:template match="/"> 
    <xsl:processing-instruction 
    name="DynamicParameter">key="i"</xsl:processing-instruction>  
    <root/> 
  </xsl:template> 
</xsl:stylesheet>
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.