DependentParameterExample.xaction 7.16 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 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218
<?xml version="1.0" encoding="UTF-8"?>
<action-sequence> 
  <title>%title</title>
  <version>1</version>
  <logging-level>debug</logging-level>
  <documentation> 
    <author>Michael D'Amour</author>  
    <description>%description</description>  
    <help>just testing...</help>  
    <result-type>report</result-type>  
    <icon>JFree-quadrant-budget-hsql.png</icon> 
  </documentation>

  <inputs> 
    <outputType type="string"> 
      <default-value>html</default-value>  
      <sources> 
        <request>type</request> 
      </sources> 
    </outputType>  

    <outputTypeList type="property-map-list">
      <sources>
        <runtime>outputTypeList</runtime>
      </sources>
      <default-value type="property-map-list">
        <property-map>
          <entry key="report-output-desc">PDF</entry>
          <entry key="report-output-type-id">pdf</entry>
        </property-map>
        <property-map>
          <entry key="report-output-desc">Excel</entry>
          <entry key="report-output-type-id">xls</entry>
        </property-map>
        <property-map>
          <entry key="report-output-desc">Word</entry>
          <entry key="report-output-type-id">rtf</entry>
        </property-map>
        <property-map>
          <entry key="report-output-desc">Web Page</entry>
          <entry key="report-output-type-id">html</entry>
        </property-map>
        <property-map>
          <entry key="report-output-desc">Comma Separated Value</entry>
          <entry key="report-output-type-id">csv</entry>
        </property-map>
      </default-value>
    </outputTypeList>









    <REGION type="string"> 
      <default-value>Central</default-value>  
      <sources> 
        <request>REGION</request> 
      </sources> 
    </REGION>  
    <DEPARTMENT type="string"> 
      <default-value/>  
      <sources> 
        <request>DEPARTMENT</request> 
      </sources> 
    </DEPARTMENT>  
    <POSITIONTITLE type="string"> 
      <default-value/>  
      <sources> 
        <request>POSITIONTITLE</request> 
      </sources> 
    </POSITIONTITLE>  
    <REGION_FILTER type="string-list"> 
      <sources/>  
      <default-value type="string-list"> 
        <list-item>Central</list-item>  
        <list-item>Eastern</list-item>  
        <list-item>Western</list-item>  
        <list-item>Southern</list-item> 
      </default-value> 
    </REGION_FILTER>  
    <DEPARTMENT_VALUES type="string-list">
      <sources>
        <request>DEPARTMENT_VALUES</request>
      </sources>
      <default-value type="string-list">
        <list-item>Executive Management</list-item>
        <list-item>Finance</list-item>
        <list-item>Human Resource</list-item>
        <list-item>Marketing &amp; Communication</list-item>
        <list-item>Product Development</list-item>
        <list-item>Professional Services</list-item>
        <list-item>Sales</list-item>
      </default-value>
    </DEPARTMENT_VALUES>
    <POSITIONTITLE_FILTER type="string-list"> 
      <sources>
        <request>POSITIONTITLE_FILTER</request>
      </sources>
      <default-value type="string-list"> 
        <list-item>CTO</list-item> 
        <list-item>QA Manager</list-item> 
      </default-value> 
    </POSITIONTITLE_FILTER>  
  </inputs>

  <outputs> 
    <rule-result type="result-set"/> 
  </outputs>

  <resources> 
    <parameter-template> 
      <solution-file> 
        <location>DependentParameterTemplate.htmlf</location>  
        <mime-type>text/xml</mime-type> 
      </solution-file> 
    </parameter-template>  

    <report-definition> 
      <solution-file> 
        <location>JFreeQuadForRegion.xml</location>  
        <mime-type>text/xml</mime-type> 
      </solution-file> 
    </report-definition> 
  </resources>
  
  <actions> 
  
    <action-definition> 
      <component-name>SQLLookupRule</component-name>
      <action-type>Perform SQL Query</action-type>
      <action-inputs/>
      <action-outputs> 
        <POSITIONTITLE_FILTER type="result-set"/> 
      </action-outputs>
      <component-definition> 
        <jndi>SampleData</jndi>  
        <query><![CDATA[select distinct PositionTitle from QUADRANT_ACTUALS order by PositionTitle]]></query> 
      </component-definition> 
    </action-definition>  
  
  
    <action-definition> 
      <component-name>SecureFilterComponent</component-name>
      <action-type>Prompt For Region, Dept, and Output Type</action-type>
      <action-inputs> 
        <outputTypeList type="property-map-list"/>
        <outputType type="string"/>
        <REGION type="string"/>  
        <DEPARTMENT type="string"/>  
        <POSITIONTITLE type="string"/>  
        <REGION_FILTER type="string-list"/>  
        <DEPARTMENT_VALUES type="string-list"/>
        <POSITIONTITLE_FILTER type="string-list"/>  
      </action-inputs>
      <action-outputs/>
      <component-definition> 
        <selections> 
          <!-- for now ignore the column names -->  
          <REGION style="select"> 
            <title>Select a REGION</title>  
            <filter>REGION_FILTER</filter> 
          </REGION> 
          <DEPARTMENT style="select"> 
            <title>Select a DEPARTMENT</title>  
            <filter>DEPARTMENT_VALUES</filter>
          </DEPARTMENT>  
          <POSITIONTITLE style="select"> 
            <title>Select a POSITIONTITLE</title>  
            <filter>POSITIONTITLE_FILTER</filter>
          </POSITIONTITLE> 
          <outputType style="radio">
            <title>Choose Report Format</title>
            <filter value-col-name="report-output-type-id" display-col-name="report-output-desc">outputTypeList</filter>
          </outputType>
        </selections>  
      </component-definition> 
    </action-definition>
  
    <action-definition> 
      <component-name>SQLLookupRule</component-name>
      <action-type>Query For Report Data</action-type>
      <action-inputs> 
        <REGION type="string"/> 
        <DEPARTMENT type="string"/>  
        <POSITIONTITLE type="string"/>  
      </action-inputs>
      <action-outputs> 
        <query-results type="result-set" mapping="rule-result"/> 
      </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} and QUADRANT_ACTUALS.POSITIONTITLE = {PREPARE:POSITIONTITLE} order by QUADRANT_ACTUALS.REGION, QUADRANT_ACTUALS.DEPARTMENT]]></query>  
        <live>true</live> 
      </component-definition> 
    </action-definition>
  

    <action-definition> 
      <component-name>JFreeReportComponent</component-name>
      <action-type>Create Report Using Query Results</action-type>
      <action-inputs> 
        <data type="result-set" mapping="rule-result"/> 
        <output-type type="string" mapping="outputType"/>
      </action-inputs>
      <action-resources> 
        <report-definition type="resource"/> 
      </action-resources>
      <component-definition> 
        <output-type>html</output-type> 
      </component-definition> 
    </action-definition>

  </actions> 
</action-sequence>