We know that the event bus in K2[blackpearl] enables event firing.
K2[blackpearl] client events, which provides for a task to be surfaced to a group of people or a Role, can send notification emails to those users about the task assignment. This option is a simple check box in the client event wizards.
The message sent to the users is customisable through the K2 workspace – the web interface. On deployment of the process on the server, K2[blackpearl] creates two notification events under the workflow notification category. One under management events for handling task re-assignments and one under runtime to handle the initial notification for the destinations of the client event.
You can update these two notification messages to have different messaging as per your needs. The base template is also available on the K2 server as a text file (C:\program files\k2[blackpearl]\host server\bin\Sourcecode.Eventbus.ClientRecorder.DLL.mailTemplate) which you can modify to make global changes. This change won’t affect the already configured events.
At this stage this interface allows you to use process fields and process data fields. Smartobject data is not available however a simple workaround is to have process datafields that hold your smart object data.
ensure you have a smartobject load event prior to this client event. If you use the smart object event to create the datafields on demand (map and create option in smartobjectevent) for you inside the process they wont be available in the email configuration editor though. You need to have process data fields created and then mapped in the smartobject event.
The other option to have an email notification is to look at adding a WF code activity to the client event XOML file. You can add a bit of code in there to send an email. The K2 context object will provide you information related to the event, the worklist item url, etc.
What we did recently was to have a separate process for sending custom email messages using the K2 mail event and initiating a process instance of that process from within this code activity.
2 responses to “We know that the event bus in K2…”
[…] things to share re: out of the box task notifications. You can modify the message by updating the email template. but, be careful! You must ensure you include the tag [UrlWithSN] somewhere in there (I put it […]
[…] Customising the Task notification email Posted November 14, 2008 Filed under: General | A KB article has been published on customising the standard K2 notification mail message. I also blogged about this topic here. […]
You must log in to post a comment.