The Parameter File Format

You can create Optimization Process Composer activity parameters by importing a file that contains XML elements and attributes that define each parameter. Creating parameters using an XML file is useful if you have a large number of parameters to define. You can also create a file containing parameter definitions in XML format by exporting parameters. The XML parameter file can be read by an external application, such as a script.

See Also
Importing Parameters from an XML File
Exporting Parameters to an XML File

The following example illustrates the format of the parameter file. Examples are provided for each type of parameter and for scalar and array parameters.

<?xml version='1.0' encoding='UTF-8' ?>
<ParameterData>
  <ParameterList>
   <Parameter name="InputStringParameter" mode="input">
      <Value>inval</Value>
   </Parameter>
   <Parameter name="OutputIntegerParameter" mode="output" type="integer">
      <Value>42</Value>
   </Parameter>
   <Parameter name="InputRealParameter" mode="input" type="real">
      <Value>3.1415></Value>
   </Parameter>
   <Parameter name="NeutralStringParameter">
      <Value>neutralval></Value>
   </Parameter>
   <Parameter name="InOutStringParameter" mode="both">
      <Value>inoutval</Value>
   </Parameter>
   <Parameter name="OutputTimestampParameter" mode="output" type="timestamp">
      <Value>1382539333000></Value>
   </Parameter>
   <Parameter name="InputBooleanParameter" mode="input" type="boolean">
      <Value>true</Value>
   </Parameter>
   <Parameter name="InOutArrayParameter" mode="both" type="real" 
      valuetype="array" arraydim="[2,2]">
        <Value index="[0,0]">11.0</Value>
        <Value index="[0,1]">21.0</Value>
        <Value index="[1,0]">21.0</Value>
        <Value index="[1,1]">22.0</Value>
    </Parameter>
    <Parameter name="InputExpressionParameter" mode="input">
        <Expression syntax="SCE">
           [${PARAMETER[Parameter1]} * 2]
        </Expression>
        <Value>0.0</Value>
    </Parameter>
  </ParameterList>
</ParameterData>

If you are unsure of the format expected by the parameter file, you can use Optimization Process Composer to create the parameter and to export it to a parameter file. You can then view the syntax of the parameter declaration in the parameter file.

The following table describes the attributes of the Parameter element:

XML attribute Required/optional Default value
name required
type optional string
mode optional neutral
valueoptionalblank string
idoptionalempty string

The id attribute is not used by Optimization Process Composer when you are importing parameters. However, the attribute is included in the XML file that is exported because it might be used by an external application.

Optimization Process Composer issues an error message and will not import the parameter file if there is an error in it; for example, if it contains invalid XML.

In contrast, Optimization Process Composer issues an error message but continues to export the parameter file if it contains an invalid expression.