The mail service
Objective: Typically, in a workflow, when a process step is completed, the subsequent responsible person is informed. We want to simulate this situation by sending a mail with information about the ticket processing to the creator when the ticket is closed.
Extension of the process
We go to the "Process Editor" and add another task at the end of the process and change the task type to "Send-Task". This will provide the correct attributes for this task.
Used TL-Script expressions
To calculate the recipient (entry in recipient rule): x->$x.get(`MyEntities:Ticket#createdByContact`)
Subject:
Your ticket: {$model.get(`tl.bpe.execution:Token#processExecution`).get(`MyEntities:Ticket#name`)}
To add model content to the mail text:
Your ticket: {$model.get(`tl.bpe.execution:Token#processExecution`).get(`MyEntities:Ticket#ticketTitle`)}
Creator: {$model.get(`tl.bpe.execution:Token#processExecution`).get(`MyEntities:Ticket#createdByContact`).get(`Contacts:Contact.Person#fullName`)}
Email of the creator: {$model.get(`tl.bpe.execution:Token#processExecution`).get(`MyEntities:Ticket#createdByContact`).get(`Contacts:Contact.all#email`)}
Explanation:
- the curly braces separate the text entered directly into the content field from the TL script
- $model.get(`tl.bpe.execution:Token#processExecution`) points to the current process
What does the result look like?
For example, after the above configuration you get the following email: