As a general technique to find examples, look at the EDG implementation
itself. For example, open
edg.topbraidlive.org/1.0/collection/COLLECTION_EDG-all-...ttl and then
select email:Message and Find References. One of them is in
teamwork:sendNotifications:
<ui:setContext let:body="{= ?header }{= ?text }{= ?footer }"
ui:queryGraph="{= IRI(CONCAT(str(ui:tempGraph),
ui:uniqueId())) }">
<ui:forEach ui:resultSet="{#
SELECT DISTINCT ?email
WHERE {
( ?property ?projectGraph )
teamwork:partyInGovernanceRoleAtProjectGraph ?party .
?party teamwork:workflowParticipantEmails ?email .
} }">
<ui:update ui:updateQuery="{!
INSERT {
?message a email:Message .
?message email:subject ?title .
?message email:body ?body .
?message email:from ?from .
?message email:to ?to .
?from a email:Address .
?from email:address ?sender .
?to a email:Address .
?to email:address ?email .
}
WHERE {
BIND (BNODE() AS ?message) .
BIND (BNODE() AS ?from) .
BIND (BNODE() AS ?to) .
BIND
(teamwork:singularProjectTypeLabel(teamwork:getProjectType(?projectGraph))
AS ?typeLabel) .
BIND (swa:labelInGraph(?notification,
ui:graph) AS ?rawLabel) .
BIND (CONCAT("[TopBraid] Notification:
", spif:replaceAll(?rawLabel, "Vocabulary", ?typeLabel))
AS ?title) .
BIND (teamwork:getFromAddress() AS
?fromAddress) .
BIND (COALESCE(?fromAddress,
"[email protected]") AS ?sender) .
} }"/>
</ui:forEach>
<sml:SendEMails/>
</ui:setContext>
HTH
Holger
On 16/11/2019 00:30, Sanjeev Devireddy wrote:
Hi,
As of now I am still trying to understand how the instances of
email:Message can be created. Actually I am looking for an example,
which helps me to understand where to start and how to implement email
notifications using different methods/modules available in composer.
Thanks,
Sanjeev
--
You received this message because you are subscribed to the Google
Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/a05f58e5-a548-4833-8466-ecef8f56327a%40googlegroups.com
<https://groups.google.com/d/msgid/topbraid-users/a05f58e5-a548-4833-8466-ecef8f56327a%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups "TopBraid
Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/83e2a434-14c1-5814-6437-537e38542d2a%40topquadrant.com.