AttachmentsTest.xaction 6.1 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
<?xml version="1.0" encoding="UTF-8"?>
<action-sequence>
   <name>AttachmentsTest.xaction</name>
   <version>1</version>
   <title>Email A report</title>
   <logging-level>debug</logging-level>
   <documentation>
      <author>Doug Moran</author>
      <description>This Action Sequence will run a report and email it</description>
      <help/>
      <result-type>email</result-type>
      <icon>BurstActionSequence.png</icon>
   </documentation>
   <inputs>
      <REGION type="string">
         <sources>
            <request>REGION</request>
         </sources>
         <default-value>Central</default-value>
      </REGION>
      <output-type type="string">
         <default-value>pdf</default-value>
      </output-type>
      <attach type="string">
         <default-value>report-output</default-value>
      </attach>
   </inputs>
   <outputs/>
   <resources>
      <report-definition>
         <solution-file>
            <location>JFreeQuadrantForRegion.xml</location>
            <mime-type>text/xml</mime-type>
         </solution-file>
      </report-definition>
      <a-resource>
         <solution-file>
            <location>content1.html</location>
            <mime-type>text/html</mime-type>
         </solution-file>
      </a-resource>
   </resources>
   <actions>
      <action-definition>
         <action-inputs>
            <output-type type="string"/>
         </action-inputs>
         <action-outputs>
            <report-output type="content" mapping="central-report"/>
         </action-outputs>
         <component-name>JFreeReportComponent</component-name>
         <action-type>report</action-type>
         <component-definition>
            <source>sql</source>
            <live>true</live>
            <jndi>SampleData</jndi>
            <query>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='Central' order by QUADRANT_ACTUALS.REGION, QUADRANT_ACTUALS.DEPARTMENT</query>
         </component-definition>
      </action-definition>
      <action-definition>
         <action-inputs>
            <output-type type="string"/>
         </action-inputs>
         <action-outputs>
            <report-output type="content" mapping="eastern-report"/>
         </action-outputs>
         <component-name>JFreeReportComponent</component-name>
         <action-type>report</action-type>
         <component-definition>
            <source>sql</source>
            <live>true</live>
            <jndi>SampleData</jndi>
            <query>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='Eastern' order by QUADRANT_ACTUALS.REGION, QUADRANT_ACTUALS.DEPARTMENT</query>
         </component-definition>
      </action-definition>
      <action-definition>
         <action-inputs>
            <output-type type="string"/>
         </action-inputs>
         <action-outputs>
            <report-output type="content" mapping="western-report"/>
         </action-outputs>
         <component-name>JFreeReportComponent</component-name>
         <action-type>report</action-type>
         <component-definition>
            <source>sql</source>
            <live>true</live>
            <jndi>SampleData</jndi>
            <query>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='Western' order by QUADRANT_ACTUALS.REGION, QUADRANT_ACTUALS.DEPARTMENT</query>
         </component-definition>
      </action-definition>
      <action-definition>
         <action-inputs>
            <output-type type="string"/>
         </action-inputs>
         <action-outputs>
            <report-output type="content" mapping="southern-report"/>
         </action-outputs>
         <component-name>JFreeReportComponent</component-name>
         <action-type>report</action-type>
         <component-definition>
            <source>sql</source>
            <live>true</live>
            <jndi>SampleData</jndi>
            <query>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='Southern' order by QUADRANT_ACTUALS.REGION, QUADRANT_ACTUALS.DEPARTMENT</query>
         </component-definition>
      </action-definition>
      <action-definition>
         <component-name>EmailComponent</component-name>
         <action-inputs>
            <a-resource type="content"/>
            <message-html type="string"/>
            <eastern-report type="content"/>
            <western-report type="content"/>
            <central-report type="content"/>
            <southern-report type="content"/>
         </action-inputs>
         <component-definition>
            <to>dmoran@doug.org</to>
            <from>dmoran@pentaho.org</from>
            <eastern-name>Eastern Report.pdf</eastern-name>
            <western-name>Western Report.pdf</western-name>
            <southern-name>Southern Report.pdf</southern-name>
            <central-name>Central Report.pdf</central-name>
            <resource-name>HTML Attachment.html</resource-name>

            <attachment-ref name-param="eastern-name" input-param="eastern-report"/>
            <attachment-ref name-param="western-name" input-param="western-report"/>
            <attachment-ref name-param="southern-name" input-param="southern-report"/>
            <attachment-ref name-param="central-name" input-param="central-report"/>
            <attachment-ref name-param="resource-name" resource-param="a-resource"/>
            <subject>Regional Reports</subject>
            <message-plain><![CDATA[Hi, 

The four regional reports are attached along with some HTML content. 


Doug.]]></message-plain>
         </component-definition>
      </action-definition>
   </actions>
</action-sequence>