Class EmailWorkItemHandler

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

    @Wid(widfile="EmailDefinitions.wid",name="Email",displayName="Email",defaultHandler="mvel: new org.jbpm.process.workitem.email.EmailWorkItemHandler()",documentation="jbpm-workitems-email/index.html",category="jbpm-workitems-email",icon="defaultemailicon.png",parameters={@WidParameter(name="From"),@WidParameter(name="To"),@WidParameter(name="Reply-To"),@WidParameter(name="Cc"),@WidParameter(name="Bcc"),@WidParameter(name="Body"),@WidParameter(name="Template"),@WidParameter(name="Subject"),@WidParameter(name="Attachments"),@WidParameter(name="Debug")},mavenDepends=@WidMavenDepends(group="org.jbpm",artifact="jbpm-workitems-email",version="7.67.0-SNAPSHOT"),serviceInfo=@WidService(category="Email",description="Send an email",keywords="send,email",action=@WidAction(title="Send email"),authinfo=@WidAuth(required=true,params={"host","port","username","password"},paramsdescription={"Host","Port","User Name","Password"})))
    public class EmailWorkItemHandler
    extends org.jbpm.process.workitem.core.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.
    • Constructor Detail

      • EmailWorkItemHandler

        public EmailWorkItemHandler()
      • EmailWorkItemHandler

        public EmailWorkItemHandler​(String handlingProcessId,
                                    String handlingStrategy)
    • Method Detail

      • 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)