About the Attribute Values Parser

The attribute value parser allows you to read data from or write data to the XML format Optimization Process Composer attributes file. The attributes file is used by Process Composer (Web) to define attributes.

This page discusses:

When you are writing data, the attribute values parser writes the Value element of output (or input/output) attributes to the attributes file. Conversely, when you are reading data, the attribute values parser reads the Value element from the attributes file and modifies the value of the corresponding input (or input/output) attribute.

Attribute Location

You can configure an external application to read from or write to the execution attributes file. The following XML elements determine where the attribute can be used:

<SimulationAttributes>
Attributes in a simulation.
<ActivityAttributes>
Attributes in an activity.
<SimulationDocumentAttributes>
Attributes in a versioned or non-versioned document in a simulation.
<ActivityDocumentAttributes>
Attributes in a versioned or non-versioned document in an activity.

The attribute must exist in Optimization Process Composer; if you try to use the execution attributes file to create an attribute, the job will fail.

You must use the ReferenceData element to define the attribute groups and the attributes specified in the upload rules.

Assigning Attributes to Documents

To assign attributes to a document that already exists, add the new attributes to the DocumentAttributes element.

The following must be true:

  • The attributes must exist in an attribute group that is specified in an upload rule for the document.
  • The DocumentAttributes element must already exist.

To assign attributes to a document that will be created, you must add the DocumentAttributes element to each document that will be created. The following must be true:

  • The oid attribute must be blank (oid="").
  • The path attribute must contain the complete path to the document relative to the working directory.

An Example of an Attribute Values XML File

The following example illustrates the format of the execution attribute values XML file:

<?xml version="1.0" encoding="UTF-8"?>
<AttributeData>
<CreationInfo date="11/10/2010 08:36:39 AM" user="Administrator" locale="en-us,en;q=0.7,fr;q=0.3"/>
  <SimulationAttributes>
      <Attribute name="colorAttribute" type="string" ValueType="singleval" mode="both">
        <Value>red</Value>
      </Attribute>
      <Attribute name="volumeAttribute" type="integer" ValueType="singleval" mode="both" minimum="0" maximum="10"> 
         <Value>1</Value>
      </Attribute>
      <Attribute name="radiusAttribute" type="real" ValueType="singleval" mode="input"  minimum="0.0" maximum="10.0">
         <Value>1.1</Value>
      </Attribute>
      <Attribute name="material" type="string" ValueType="singleval"  mode="output">
         <Choices>
            steel
            aluminum
            copper
         </Choices>
         <Value>copper<Value>
      </Attribute>
      <Attribute attributeName="model" type="string" ValueType="singleval" mode="both">
        <Value>DX4</Value>
      </Attribute>
      <Attribute attributeName="colorSelection" type="string" ValueType="singleval" mode="input">
         <Choices>
            red
            green
            blue
            yellow
         </Choices>
         <Value>red</Value>
      </Attribute>
      <Attribute attributeName="numWheels" type="integer" ValueType="singleval" mode="output"  
                 minimum="0" maximum="10"> 
         <Value>4</Value>
      </Attribute>
      <Attribute attributeName="radius" type="real" ValueType="singleval" mode="both"  
                 minimum="0.0" maximum="10.0">
         <Value>1.1</Value>
      </Attribute>
      <Attribute attributeName="weight" type="real" ValueType="multival"  mode="both">
         <Value>1.10</Value>
         <Value>2.20</Value>
         <Value>3.30</Value>
      </Attribute>
      <Attribute attributeName="modelType" type="string" ValueType="multival"  mode="both">
         <Value>Sport</Value>
         <Value>Cruise</Value>
         <Value>Sedan</Value>
      </Attribute>
   </SimulationAttributes>
   <SimulationDocumentAttributes>
      <DocumentAttributes oid="111.22.333.4455" name ="myDoc" path=="Specification/f1" 
                                 contentRelation="Simulation Content - Owned">
         <Attribute name="stringAttr1" type="string" mode="both">
            <Value>Model 848</Value>
         </Attribute>
         <Attribute  name="stringChoiceAttribute1" type="string" mode="both">
            <Choices>
               black
               white
               gray
            </Choices>
            <Value>black</Value>
         </Attribute>
         <Attribute name="integerAttribute" type="integer" mode="both">
            <Value>1</Value>
         </Attribute>
      </DocumentAttributes>
   </SimulationDocumentAttributes>
   <ActivityAttributes> 
      <Attribute name="stringAttribute" type="string" mode="both">
         <Value>rubber</Value>
      </Attribute>
      <Attribute  name="stringChoiceAttribute" type="string" mode="both">
         <Choices>
            black
            white
         </Choices>
         <Value>white</Value>
      </Attribute>
      <Attribute name="realAttribute" type="real" mode="input" minimum="0.0" maximum="30.0">
         <Choices>10.000000
                  20.000000
                  30.000000
         </Choices>
         <Value>10.0</Value>
      </Attribute>
   </ActivityAttributes>
   <ActivityDocumentAttributes>
       <DocumentAttributes oid="23904.60868.29268.18050" contentRelation="Simulation Content - Owned" 
                           name="Doc-0000149" path="Specifications/">
           <Attribute name="a1" type="string" mode="both" minimum="" maximum="">
              <Value>a</Value>
           </Attribute>
           <Attribute name="a2" type="string" mode="both" minimum="" maximum="">
               <Value>200</Value>
           </Attribute>
        </DocumentAttributes>
    </ActivityDocumentAttributes>
</AttributeData>