org.jbpm.process.workitem.email

## Class EmailWorkItemHandler

- java.lang.Object
- - org.jbpm.process.workitem.core.AbstractLogOrThrowWorkItemHandler
  - - org.jbpm.process.workitem.email.EmailWorkItemHandler

- All Implemented Interfaces:
    org.kie.api.runtime.process.WorkItemHandler

      public class EmailWorkItemHandler
      extends AbstractLogOrThrowWorkItemHandler

  WorkItemHandler for sending email. Expects the following parameters: - "From" (String): sends an email from the given the email address - "To" (String): sends the email to the given email address(es), multiple addresses must be separated using a semi-colon (';') - "Subject" (String): the subject of the email - "Body" (String): the body of the email (using HTML) - "Template" (String): optional template to generate body of the email, template when given will override Body parameter Is completed immediately and does not return any result parameters. Sending an email cannot be aborted.

- - ### Field Summary

    - ### Fields inherited from class org.jbpm.process.workitem.core.AbstractLogOrThrowWorkItemHandler

      `handlingProcessId, handlingStrategy, logThrownException`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EmailWorkItemHandler()`
    `EmailWorkItemHandler(String handlingProcessId, String handlingStrategy)`
    `EmailWorkItemHandler(String host, String port, String userName, String password)`
    `EmailWorkItemHandler(String host, String port, String userName, String password, String startTls)`
    `EmailWorkItemHandler(String host, String port, String userName, String password, String handlingProcessId, String handlingStrategy)`
    `EmailWorkItemHandler(String host, String port, String userName, String password, String startTls, String handlingProcessId, String handlingStrategy)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `abortWorkItem(org.kie.api.runtime.process.WorkItem arg0, org.kie.api.runtime.process.WorkItemManager arg1)`
    `protected Email` | `createEmail(org.kie.api.runtime.process.WorkItem workItem, Connection connection)`
    `void` | `executeWorkItem(org.kie.api.runtime.process.WorkItem workItem, org.kie.api.runtime.process.WorkItemManager manager)`
    `Connection` | `getConnection()`
    `protected boolean` | `getDebugFlag(org.kie.api.runtime.process.WorkItem workItem)`
    `void` | `setConnection(String host, String port, String userName, String password)`
    `void` | `setConnection(String host, String port, String userName, String password, String startTls)`

    - ### Methods inherited from class org.jbpm.process.workitem.core.AbstractLogOrThrowWorkItemHandler

      `findNodeInstance, handleException, handleException, setLogThrownException`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### EmailWorkItemHandler

          public EmailWorkItemHandler()

    - #### EmailWorkItemHandler

          public EmailWorkItemHandler(String host,
                                      String port,
                                      String userName,
                                      String password)

    - #### EmailWorkItemHandler

          public EmailWorkItemHandler(String host,
                                      String port,
                                      String userName,
                                      String password,
                                      String startTls)

    - #### EmailWorkItemHandler

          public EmailWorkItemHandler(String handlingProcessId,
                                      String handlingStrategy)

    - #### EmailWorkItemHandler

          public EmailWorkItemHandler(String host,
                                      String port,
                                      String userName,
                                      String password,
                                      String handlingProcessId,
                                      String handlingStrategy)

    - #### EmailWorkItemHandler

          public EmailWorkItemHandler(String host,
                                      String port,
                                      String userName,
                                      String password,
                                      String startTls,
                                      String handlingProcessId,
                                      String handlingStrategy)

  - ### Method Detail

    - #### setConnection

          public void setConnection(String host,
                                    String port,
                                    String userName,
                                    String password)

    - #### setConnection

          public void setConnection(String host,
                                    String port,
                                    String userName,
                                    String password,
                                    String startTls)

    - #### getConnection

          public Connection getConnection()

    - #### executeWorkItem

          public void executeWorkItem(org.kie.api.runtime.process.WorkItem workItem,
                                      org.kie.api.runtime.process.WorkItemManager manager)

    - #### createEmail

          protected Email createEmail(org.kie.api.runtime.process.WorkItem workItem,
                                      Connection connection)

    - #### abortWorkItem

          public void abortWorkItem(org.kie.api.runtime.process.WorkItem arg0,
                                    org.kie.api.runtime.process.WorkItemManager arg1)

    - #### getDebugFlag

          protected boolean getDebugFlag(org.kie.api.runtime.process.WorkItem workItem)

Copyright © 2001–2019 JBoss by Red Hat. All rights reserved.