cancel
Showing results for 
Search instead for 
Did you mean: 

problem in sending mails using service task

sivap
Champ in-the-making
Champ in-the-making
hi all, i have requirement when "the task(any process) is in approve or review mode.If the user not approved or reviewed in particular time period then automatically alert mail send to authorized person".

here, i am using activiti 5.9 with JPA and spring integration.In my configuration file simple i use service task with type="mail" but it not recognized.
my mail server configuration are correct.
<serviceTask id="alertMail" name="sending alert mail" type="mail">
—–
——
</serviceTask>

any alternative way for sending mail in activiti…..

thanks in advance for your answers………….
12 REPLIES 12

frederikherema1
Star Contributor
Star Contributor
Prefix the "mail" attribute with the activiti-namespace. So use "activiti:mail" instead (in case the xml-namespace is activiti, off course).

sivap
Champ in-the-making
Champ in-the-making
hi frederikheremans,

i am not understanding what u says…….

Actually my configuration like
<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" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlnsSmiley Surprisedmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsSmiley Surprisedmgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">

<process id="processId" name="general-info">
———–
——-
<serviceTask id="alertMail" name="sending alert mail" activiti:type="mail" >
—–
——
</serviceTask>
——
———
</definitions>

here,when ever i am using activiti:type="mail" getting

error is :
"Multiple annotations found at this line:
- cvc-enumeration-valid: Value 'activiti:mail' is not facet-valid with respect to enumeration '[shell]'. It must be a value from the
  enumeration.
- cvc-attribute.3: The value 'activiti:mail' of attribute 'activiti:type' on element 'serviceTask' is not valid with respect to its type, 'null'.
- Start tag of element <serviceTask>"

sivap
Champ in-the-making
Champ in-the-making
hi, iam using activiti 5.9 with spring but in xxxxx.bpmn20.xml configuration file i am using service task for sending mail . iam fallowing user guide, in user guide service task is <serviceTask id="sendMail" activiti:type="mail"> but i am getting configuration error

Multiple annotations found at this line:
- cvc-attribute.3: The value 'mail' of attribute 'activiti:type' on element 'serviceTask' is not valid with respect to its type, 'null'.
- cvc-enumeration-valid: Value 'mail' is not facet-valid with respect to enumeration '[shell]'. It must be a value from the
  enumeration.

my file is:

<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"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlnsSmiley Surprisedmgdc="http://www.omg.org/spec/DD/20100524/DC"
xmlnsSmiley Surprisedmgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema"
expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
<process id="myProcess" name="My process" isExecutable="true">
  <startEvent id="startevent1" name="Start"></startEvent>
  <serviceTask id="sendMail" name="sending mail"  activiti:type="mail" >
   <extensionElements>
    <activiti:field name="from" expression="asss@xxx.com" />
    <activiti:field name="to" expression="xyxz@xxx.com" />
    <activiti:field name="subject"
     expression="Your order has been shipped" />
    <activiti:field name="text">
     <activiti:expression><![CDATA[ This test mail for application ]]>
     </activiti:expression>
    </activiti:field>
   </extensionElements>
  </serviceTask>
  <endEvent id="endevent1" name="End"></endEvent>
  <sequenceFlow id="flow5" sourceRef="sendMail" targetRef="endevent1"></sequenceFlow>
  <sequenceFlow id="flow6" sourceRef="startevent1"
   targetRef="sendMail"></sequenceFlow>
</process>

sivap
Champ in-the-making
Champ in-the-making
hi, iam using activiti 5.9 with spring but in xxxxx.bpmn20.xml configuration file i am using service task for sending mail . iam fallowing user guide, in user guide service task is <serviceTask id="sendMail" activiti:type="mail"> but i am getting configuration error

Multiple annotations found at this line:
- cvc-attribute.3: The value 'mail' of attribute 'activiti:type' on element 'serviceTask' is not valid with respect to its type, 'null'.
- cvc-enumeration-valid: Value 'mail' is not facet-valid with respect to enumeration '[shell]'. It must be a value from the
enumeration.

sivap
Champ in-the-making
Champ in-the-making
hi,
see this problem…………

anandharaj
Champ in-the-making
Champ in-the-making

How?

frederikherema1
Star Contributor
Star Contributor
You can safely ignore the XSD-warnings, the activiti-XSD is out of date

sivap
Champ in-the-making
Champ in-the-making
thank,

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
You can safely ignore the XSD-warnings, the activiti-XSD is out of date

Will it be updated?