secure-sample.xaction 4.9 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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
<?xml version="1.0" encoding="UTF-8"?>
<action-sequence> 
  <name>secure-sample.xaction</name>
  <title>%title</title>
  <version>1</version>
  <logging-level>debug</logging-level>
  <documentation> 
    <author>Doug Moran</author>  
    <description>%description</description>  
    <help>just testing...</help>  
    <result-type/>  
    <icon>secure-sample.png</icon> 
  </documentation>

  <inputs> 
    <output-type type="string"> 
      <default-value>html</default-value>  
      <sources> 
        <request>type</request> 
      </sources> 
    </output-type>  
    <REGION type="string"> 
      <default-value/>  
      <sources> 
        <request>REGION</request> 
      </sources> 
    </REGION>  
    <REGION_FILTER type="result-set"> 
      <sources> 
        <session>REGION_FILTER</session> 
      </sources>  
      <default-value/> 
    </REGION_FILTER>  
    <DEPARTMENT_FILTER type="property-map-list"> 
      <default-value type="property-map-list"> 
        <property-map> 
          <entry key="Dept">Human Resource</entry>  
          <entry key="Display">HR Dudes</entry> 
        </property-map>  
        <property-map> 
          <entry key="Dept">Product Development</entry>  
          <entry key="Display">The Smart Guys</entry> 
        </property-map>  
        <property-map> 
          <entry key="Dept">Executive Management</entry>  
          <entry key="Display">Overhead</entry> 
        </property-map> 
      </default-value> 
    </DEPARTMENT_FILTER>  
    <DEPARTMENT type="string"> 
      <default-value/>  
      <sources> 
        <request>DEPARTMENT</request> 
      </sources> 
    </DEPARTMENT>  
    <result type="string"> 
      <sources> 
        <request>result</request> 
      </sources>  
      <default-value>&lt;HTML&gt;No selections for REGION were found in your session. &lt;p/&gt;This means you are not logged in or you do not have permission to view this report.&lt;/HTML&gt;</default-value> 
    </result> 
  </inputs>

  <outputs> 
    <result type="content"> 
      <destinations> 
        <response>content</response> 
      </destinations> 
    </result> 
  </outputs>

  <resources> 
    <report-definition1>
      <solution-file>
        <location>JFreeQuadForRegion.xml</location>
        <mime-type>text/plain</mime-type>
      </solution-file>
    </report-definition1>
  </resources>
  
  <actions> 
    <actions> 
      <condition><![CDATA[REGION_FILTER]]></condition>  
      <action-definition> 
        <component-name>SecureFilterComponent</component-name>
        <action-type>Prompt For Region and Dept</action-type>
        <action-inputs> 
          <REGION type="string"/>  
          <REGION_FILTER type="result-set"/>  
          <DEPARTMENT type="string"/>  
          <DEPARTMENT_FILTER type="property-map-list"/> 
        </action-inputs>
        <action-outputs/>
        <component-definition> 
          <selections> 
            <!-- for now ignore the column names -->  
            <REGION style="radio"> 
              <filter value-col-name="REGION" display-col-name="REGION">REGION_FILTER</filter>  
              <title>Select the Region</title> 
            </REGION>  
            <DEPARTMENT style="select"> 
              <filter value-col-name="Dept" display-col-name="Display">DEPARTMENT_FILTER</filter>  
              <title>Select the Department</title> 
            </DEPARTMENT> 
          </selections>  
          <xsl>CustomReportParameters.xsl</xsl>  
          <target>Report_Window</target> 
        </component-definition> 
      </action-definition>
  
      <action-definition>
        <component-name>SQLLookupRule</component-name>
        <action-type>Get Data from Relational</action-type>
        <action-inputs> 
          <REGION type="string"/>  
          <DEPARTMENT type="string"/>  
        </action-inputs>
        <action-outputs>
          <query-result type="result-set"/>
        </action-outputs>
        <component-definition>
          <jndi>SampleData</jndi>
          <query><![CDATA[select   QUADRANT_ACTUALS.REGION,   QUADRANT_ACTUALS.DEPARTMENT,   QUADRANT_ACTUALS.POSITIONTITLE,   QUADRANT_ACTUALS.ACTUAL,   QUADRANT_ACTUALS.BUDGET,   QUADRANT_ACTUALS.VARIANCE  from QUADRANT_ACTUALS where QUADRANT_ACTUALS.REGION={PREPARE:REGION} and QUADRANT_ACTUALS.DEPARTMENT={PREPARE:DEPARTMENT} order by QUADRANT_ACTUALS.REGION, QUADRANT_ACTUALS.DEPARTMENT]]></query>
        </component-definition>
      </action-definition>

      <action-definition>
        <component-name>JFreeReportComponent</component-name>
        <action-type>Pentaho Report</action-type>
        <action-inputs>
          <data type="result-set" mapping="query-result"/>
        </action-inputs>
        <action-resources>
          <report-definition type="resource" mapping="report-definition1"/>
        </action-resources>
        <component-definition>
          <output-type>html</output-type>
        </component-definition>
      </action-definition>
 
    </actions>
 
  </actions> 
</action-sequence>