AnsweredAssumed Answered

mail task: mail not send but no errors either

Question asked by michafn on Sep 5, 2012
Latest reply on Sep 26, 2012 by jbarrez

I am just getting started with activit and BPMN 2.0, and therefore tried to setup a really simple process, which does nothing but sending an email via an external SMTP server.

This is my process definition:

<process id="process1" name="process1">
    <startEvent id="startevent1" name="Start"></startEvent>
    <endEvent id="endevent1" name="End"></endEvent>
    <serviceTask id="mailtask1" name="Mail Task" activiti:async="true" activiti:type="mail">
        <activiti:field name="to" expression="my@mailadress"></activiti:field>
        <activiti:field name="subject" expression="test"></activiti:field>
        <activiti:field name="html">
        <activiti:field name="text">
    <sequenceFlow id="flow1" name="" sourceRef="startevent1" targetRef="mailtask1"></sequenceFlow>
    <sequenceFlow id="flow2" name="" sourceRef="mailtask1" targetRef="endevent1"></sequenceFlow>

In the activiti.cfg.xml file I added following paramters

<property name="mailServerHost" value="xxx" />
       <property name="mailServerUsername" value="xxx" />
       <property name="mailServerPassword" value="xxx" />

and finally generated a simple test unit to start the process:

RepositoryService repositoryService = activitiRule.getRepositoryService();
            new FileInputStream(filename)).deploy();
      RuntimeService runtimeService = activitiRule.getRuntimeService();
      Map<String, Object> variableMap = new HashMap<String, Object>();
      variableMap.put("name", "Activiti");
      ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process1", variableMap);
      System.out.println("id " + processInstance.getId() + " "
            + processInstance.getProcessDefinitionId());

so everything pretty much standard operations…
However, if i start the process it looks all fine, I get the expected output from the last line of the code and no error message…but I do not receive any email as well and since I do not get any error I cannot even debug…

did anyone experience a similar problem? Am I missing anything fundamental?

Thanks for any help…