<?xml version="1.0" encoding="UTF-8"?>
<action-sequence> 
  <title>IPreparedComponent Available Test</title>
  <version>1</version>
  <logging-level>DEBUG</logging-level>
  <documentation> 
    <author>Will Gorman</author>  
    <description>This tests the XQueryBaseComponent's implementation of the IPreparedComponent interface, verifying that we can gain access to the component</description>  
    <help/>  
    <result-type>prepared_component</result-type>
    <icon/> 
  </documentation>

  <inputs>
    <position type="string">
      <sources>
        <request>position</request>
      </sources>
      <default-value>Engineer</default-value>
    </position>
  </inputs>
  <outputs>
		<prepared_component>
			<type>prepared_component</type>
		</prepared_component>
                <second_prepared_component>
                        <type>prepared_component</type>
                </second_prepared_component>
  </outputs>
  
  <resources>
    <document>
      <solution-file>
        <location>Quad_Data.xml</location>
        <mime-type>text/xml</mime-type>
      </solution-file>
    </document>
  </resources>


  <actions>

    <action-definition>
      <component-name>XQueryLookupRule</component-name>
      <action-type>XQuery For Report Data</action-type>
      <action-resources>
        <document type="resource"/>
      </action-resources>
      <action-outputs>
          <prepared_component/>
      </action-outputs>
      <component-definition>
        <live>false</live>
        <query><![CDATA[/descendant::row[POSITIONTITLE='{position}']]]></query>
      </component-definition>
    </action-definition>

    <action-definition>
      <component-name>XQueryLookupRule</component-name>
      <action-type>XQuery For Report Data</action-type>
      <action-resources>
        <document type="resource"/>
      </action-resources>
      <action-inputs>
          <prepared_component/>
      </action-inputs>
      <action-outputs>
          <prepared_component mapping="second_prepared_component"/>
      </action-outputs>
      <component-definition>
        <live>false</live>
        <query><![CDATA[/descendant::row[POSITIONTITLE='{PREPARELATER:POSITIONTITLE}']]]></query>
      </component-definition>
    </action-definition>
  </actions>

</action-sequence>