send-email.xaction 3.48 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
<?xml version="1.0" encoding="UTF-8"?>
<action-sequence> 
  <name>send-email.xaction</name>
  <title>%title</title>
  <version>1</version>
  <logging-level>error</logging-level>
  <documentation> 
    <author>Doug Moran</author>  
    <description>%description</description>  
    <help/>  
    <result-type>none</result-type>  
    <icon/> 
  </documentation>

  <inputs> 
    <to type="string"> 
      <default-value>joe.pentaho@pentaho.org</default-value>  
      <sources> 
        <runtime>EMAIL</runtime> 
      </sources> 
    </to>  
    <to-name type="string"> 
      <default-value>Joe Pentaho</default-value>  
      <sources> 
        <runtime>MANAGER_NAME</runtime> 
      </sources> 
    </to-name>  
    <attach-name type="string"> 
      <default-value>%default-attachment</default-value>  
      <sources> 
        <runtime>report-name</runtime> 
      </sources> 
    </attach-name>  
    <subject type="string"> 
      <default-value>%default-subject</default-value>  
      <sources> 
        <runtime>report-description</runtime> 
      </sources> 
    </subject>  
    <from type="string"> 
      <default-value>joe.pentaho@pentaho.org</default-value> 
    </from>  
    <report-output type="content"> 
      <sources> 
        <runtime>report-output</runtime> 
      </sources> 
    </report-output> 
  </inputs>

  <outputs/>

  <resources/>
  
  <actions> 
    <action-definition> 
      <component-name>UtilityComponent</component-name>
      <action-type>Format The Email Msg</action-type>
      <action-inputs> 
        <to-name type="string"/>  
        <subject type="string"/> 
      </action-inputs>
      <action-outputs> 
        <formatted-msg type="string" mapping="messageHtml"/> 
      </action-outputs>
      <component-definition> 
        <format> 
          <format-string>%message-msg</format-string>  
          <arg>to-name</arg>  
          <arg>subject</arg>  
          <return>formatted-msg</return> 
        </format> 
      </component-definition> 
    </action-definition>
  
    <action-definition> 
      <component-name>TemplateComponent</component-name>
      <action-type>Format The Debug Msg</action-type>
      <action-inputs> 
        <to-name type="string"/>  
        <to type="string"/>  
        <subject type="string"/> 
      </action-inputs>
      <action-outputs> 
        <output-message type="string" mapping="debugMsg"/> 
      </action-outputs>
      <component-definition> 
        <template><![CDATA[%debug-msg - {to-name} - {to} - {subject}]]></template> 
      </component-definition> 
    </action-definition>
  
    <action-definition> 
      <component-name>UtilityComponent</component-name>
      <action-type>Print Parameters</action-type>
      <action-inputs> 
        <debugMsg type="string"/> 
      </action-inputs>
      <component-definition> 
        <print> 
          <arg>debugMsg</arg> 
        </print> 
      </component-definition> 
    </action-definition>
  
    <action-definition> 
      <component-name>EmailComponent</component-name>
      <action-type>Send Email</action-type>
      <action-inputs> 
        <to type="string"/>  
        <from type="string"/>  
        <subject type="string"/>  
        <message-html type="string" mapping="messageHtml"/>  
        <report-output type="content"/>  
        <attach-name type="string"/> 
      </action-inputs>
      <component-definition> 
        <attachment-ref name-param="attach-name" input-param="report-output"/> 
      </component-definition> 
    </action-definition>
 
  </actions> 
</action-sequence>