ipreparedcomponent_sql_preparelater.xaction 1.85 KB
Newer Older
Thitichaipun Wutthisak committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
<?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 SQLBaseComponent's implementation of the IPreparedComponent interface, verifying that we can gain access to the component</description>  
    <help/>  
    <result-type>rule</result-type>
    <icon/> 
  </documentation>

	<inputs/>
	<outputs>
		<prepared_component>
			<type>prepared_component</type>
		</prepared_component>
                <second_prepared_component>
                        <type>prepared_component</type>
                </second_prepared_component>
	</outputs>
  <resources/>
  
  <actions>

      <!-- create a prepared_component -->

    <action-definition>
      <component-name>SQLLookupRule</component-name>
      <action-type>Get Component</action-type>
      <action-inputs/>
      <action-outputs>
        <prepared_component/>
      </action-outputs>
      <component-definition>
        <jndi>SampleData</jndi>
        <query><![CDATA[SELECT COUNT(*) FROM QUADRANT_ACTUALS WHERE REGION='Western' AND DEPARTMENT='Sales' ]]></query>
      </component-definition>
    </action-definition>

    <action-definition>
      <component-name>SQLLookupRule</component-name>
      <action-type>Get Second Component</action-type>
      <action-inputs>
         <prepared_component/>
      </action-inputs>
      <action-outputs>
        <prepared_component mapping="second_prepared_component"/>
      </action-outputs>
      <component-definition>
        <REGION>Western</REGION>
        <query><![CDATA[SELECT COUNT(*) FROM QUADRANT_ACTUALS WHERE REGION={PREPARE:REGION} AND DEPARTMENT={PREPARELATER:DEPARTMENT}]]></query>
      </component-definition>
    </action-definition>

  </actions> 
</action-sequence>