Mail as boundary event
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2011 04:46 AM
Hi All
Is it possible to define mail as boundary event… e.g. sending mail at start, completion of task as well as sending repeated reminders.
Thanks in advance
krish
Is it possible to define mail as boundary event… e.g. sending mail at start, completion of task as well as sending repeated reminders.
Thanks in advance
krish
Labels:
- Labels:
-
Archive
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2011 07:57 AM
You should take a look at 'execution listeners' or 'task listeners'.
They allow you to do exactly that.
They allow you to do exactly that.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2011 11:51 PM
Hi
I need one clarification…. how do we call email service task inside 'execution listeners' or 'task listeners' . Or is it that we should write our own Java classes to send the email.
Thanks in advance
Krish
I need one clarification…. how do we call email service task inside 'execution listeners' or 'task listeners' . Or is it that we should write our own Java classes to send the email.
Thanks in advance
Krish
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2011 04:15 AM
Hi
We can use in the following manner as well, using the org.activiti.engine.impl.bpmn.MailActivityBehavior as execution listener:
This works as well
Thank you
Krish
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
<process id="SimpleUserTask" name="SimpleUserTask">
<startEvent id="startevent2" name="Start"></startEvent>
<userTask id="usertask2" name="User Task" activiti:formKey="formInclude/approve.form">
<extensionElements>
<activiti:taskListener event="create" class="com.test.poc.DynamicAssignment" />
<activiti:executionListener class="org.activiti.engine.impl.bpmn.MailActivityBehavior" event="start">
<activiti:field name="to" expression="${assigneeemail}"/>
<activiti:field name="from" expression="kkrish@ty.com">
</activiti:field>
<activiti:field name="html">
<activiti:expression><![CDATA[ <html>
<body>
Hello ${assignee},<br/><br/>
A new order has been allocated to you , the order value is <FONT size="5" COLOR="#0000FF"> ${orderValue}</FONT> <b>please view the same in your inbox</b>.<br/><br/>
Kind regards,<br/>
TheCompany.
</body>
</html>
]]></activiti:expression>
</activiti:field>
</activiti:executionListener>
</extensionElements>
</userTask>
<sequenceFlow id="flow3" name="" sourceRef="startevent2" targetRef="usertask2"></sequenceFlow>
<sequenceFlow id="flow4" name="" sourceRef="usertask2" targetRef="endevent2"></sequenceFlow>
<endEvent id="endevent2" name="End"></endEvent>
<boundaryEvent id="escalationTimer" cancelActivity="true" attachedToRef="usertask2">
<timerEventDefinition>
<timeDuration>PT60S</timeDuration>
</timerEventDefinition>
</boundaryEvent>
<sequenceFlow id="flow9" sourceRef="escalationTimer" targetRef="endevent6" />
<endEvent id="endevent6" name="End">
</endEvent>
</process>
</definitions>
We can use in the following manner as well, using the org.activiti.engine.impl.bpmn.MailActivityBehavior as execution listener:
This works as well
Thank you
Krish
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
<process id="SimpleUserTask" name="SimpleUserTask">
<startEvent id="startevent2" name="Start"></startEvent>
<userTask id="usertask2" name="User Task" activiti:formKey="formInclude/approve.form">
<extensionElements>
<activiti:taskListener event="create" class="com.test.poc.DynamicAssignment" />
<activiti:executionListener class="org.activiti.engine.impl.bpmn.MailActivityBehavior" event="start">
<activiti:field name="to" expression="${assigneeemail}"/>
<activiti:field name="from" expression="kkrish@ty.com">
</activiti:field>
<activiti:field name="html">
<activiti:expression><![CDATA[ <html>
<body>
Hello ${assignee},<br/><br/>
A new order has been allocated to you , the order value is <FONT size="5" COLOR="#0000FF"> ${orderValue}</FONT> <b>please view the same in your inbox</b>.<br/><br/>
Kind regards,<br/>
TheCompany.
</body>
</html>
]]></activiti:expression>
</activiti:field>
</activiti:executionListener>
</extensionElements>
</userTask>
<sequenceFlow id="flow3" name="" sourceRef="startevent2" targetRef="usertask2"></sequenceFlow>
<sequenceFlow id="flow4" name="" sourceRef="usertask2" targetRef="endevent2"></sequenceFlow>
<endEvent id="endevent2" name="End"></endEvent>
<boundaryEvent id="escalationTimer" cancelActivity="true" attachedToRef="usertask2">
<timerEventDefinition>
<timeDuration>PT60S</timeDuration>
</timerEventDefinition>
</boundaryEvent>
<sequenceFlow id="flow9" sourceRef="escalationTimer" targetRef="endevent6" />
<endEvent id="endevent6" name="End">
</endEvent>
</process>
</definitions>
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2011 04:36 AM
Awesome!
I had forgotten about this feature. Thanks for posting it!
I had forgotten about this feature. Thanks for posting it!