Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-11370

Activiti workflow mail task goes to default localhost:25

    Details

    • Support Ticket IDs:

      Description

      In IDM 6.0.0, if an activiti workflow has a mail task, the mail gets sent to the default localhost port 25, instead of the mail host/port configured in workflow.json.

      (This works in IDM 5.5.0.)

       

      TEST CASE:
      ~~~~~~~~~~

      • IDM 6.0.0, samples/provisioning-with-workflow.
      • workflow.json:

       

      {
          "useDataSource" : "default",
          "workflowDirectory" : "&{idm.instance.dir}/workflow",
          "mail" : {
              "host" : "host.domain.com",
              "port" : 1025
          }
      }

       

       

      • Add a mail task to the contractorOnboarding sample workflow:

       

          <sequenceFlow id="sequenceFlow-247f944c-b753-4ff7-aa7e-01d60fb3cd0a" sourceRef="requestMadeGateway" targetRef="decisionPrep"></sequenceFlow>
          <sequenceFlow id="sequenceFlow-079d1a0b-6e48-43d6-92d6-40e4dbb6c476" sourceRef="mailtask1" targetRef="decideApprovalTask"></sequenceFlow>
      ...
          <serviceTask id="mailtask1" name="Mail Task" activiti:type="mail">
            <extensionElements>
              <activiti:field name="from" stringValue="order-shipping@thecompany.com" />
              <activiti:field name="to" stringValue="recipient@example.com" />
              <activiti:field name="subject" expression="Your order has been shipped" />
              <activiti:field name="text" expression="Test email" />
            </extensionElements>
          </serviceTask>
      ...

       

       

      • Verify that the workflow.json settings are present:

       

      $ curl -u openidm-admin:openidm-admin "http://host:8086/openidm/config/workflow" | jq .
      {
        "_id": "workflow",
        "useDataSource": "default",
        "workflowDirectory": "&{idm.instance.dir}/workflow",
        "mail": {
          "host": "host.domain.com",
          "port": 1025
        }
      }

       

       

      • Invoke the workflow:

       

      $ curl -u openidm-admin:openidm-admin "http://host:8086/openidm/workflow/processinstance?_action=create" --header "Content-Type: application/json" -X POST --data '{"_key":"contractorOnboarding"}' | jq .
      {
        "code": 500,
        "reason": "Internal Server Error",
        "message": "Could not send e-mail"
      }

       

       

      • openidm0.log.0 shows that it is trying to connect to localhost:25 :

       

      FINEST: connection failed
      java.net.ConnectException: Connection refused (Connection refused)
              at java.net.PlainSocketImpl.socketConnect(Native Method)
              at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
              at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
      ...
      Caused by: org.apache.commons.mail.EmailException: Sending the email to the following server failed : localhost:25
      ...
      Caused by: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 25; timeout 60000;
      ...

       

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tal.herman Tal Herman
                Reporter:
                wei-yee.lum Wei-Yee Lum
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: