You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 9, 2022. It is now read-only.
@@ -113,6 +122,10 @@ Now go back and edit the Send Task:-
113
122
114
123
Save the process diagram (validates your configuration of the task - no red stars mean it's configured properly).
115
124
125
+
For configuring a local mail agent to test this task, see [The CentOS website](http://wiki.centos.org/HowTos/postfix#head-c02f30bf0669d9b47a6c14c114243338b5ea1f27). Don't forget to set an
126
+
alias pointing 'admin' at your local linux machine's logged in user - you can then use Thunderbird to receive email
127
+
from the sample processes.
128
+
116
129
## Additional notes
117
130
118
131
There are some configuration elements that are true across multiple steps. These are documented below.
XML SMTP MESSSAGE FORMAT AS PER xdmp:email with {/wf:process/some/parameter} replacements.
27
-
</wf:message>
25
+
<wf:message>EmailTest</wf:message>
28
26
</options>
29
27
</action>
30
28
</execute>
@@ -38,18 +36,26 @@ try {
38
36
let $ns := ($cpf:options/wf:namespaces/wf:namespace,<wf:namespace short="wf"long="http://marklogic.com/workflow" />)
39
37
(: Default namespace is same as process doc :)(: TODO mix in those from BPMN2 doc :)
40
38
41
-
let $message := $cpf:options/wf:message/node() (: XML send email format from xdmp:email :)
42
-
43
-
(: TODO perform active parameter replacements withing text of email :)
44
-
39
+
let $message := xs:string($cpf:options/wf:message) (: XML send email format from xdmp:email :)
45
40
let $_ := xdmp:log("sendTask: Email message:-")
46
41
let $_ := xdmp:log($message)
47
42
48
43
44
+
let $messageText := wfu:getProcessAsset($cpf:document-uri,$message || ".txt")/text() (: This is a text file!!! Not XML :)
45
+
let $_ := xdmp:log($messageText)
46
+
47
+
(: Perform replacements across returned content :)
48
+
let $messageXml := wfu:evaluateXml($cpf:document-uri,$ns,$messageText, ()) (: TODO pass in real parameters, like to and from email etc.? Or just do inside template? :)
49
+
50
+
51
+
let $_ := xdmp:log("sendTask: Email message result XML:-")
52
+
let $_ := xdmp:log($messageXml)
53
+
54
+
49
55
(: If still none, throw failure message (misconfiguration) :)
0 commit comments