Engine
The MailPlugin is a Java mail implementation for sending mails during a workflow step. To use this Plugin in a WorkflowApplication you need to add the following PluginClass to the Model Configuration:
org.imixs.workflow.jee.plugins.MailPlugin
See the Imixs Modeler Mail Documentation for details about mail activities.
To use this JEE plugin you need to specify a JNDI mail session inside the application server. The expected JNDI name for the mail session is
org.imixs.workflow.jee.mailsession
The mail session object is used to send outgoing mails from the workflowManager EJB to Mailserver See JEE spec for details about Java mail sessions.
As the MailPlugin needs to lookup the Java mail session using a JNDI Lookup you need to provide a valide Resource Reference to the WorkflowManager Session EJB. Therefore you need to customize the ejb-jar.xml and also sun-ejb-jar.xml in glassfish to provide the WorkflowManager with a valid JNDI Object.
......
......
<session>
<ejb-name>WorkflowManagerImplementation</ejb-name>
<ejb-class>
org.imixs.workflow.jee.ejb.WorkflowManagerImplementation
</ejb-class>
<session-type>Stateless</session-type>
<env-entry>
<description>
Mail Plugin Session name
</description>
<env-entry-name>IX_MAIL_SESSION</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>testSession</env-entry-value>
</env-entry>
<!-- Define Mail Session Ressource for
org.imixs.workflow.jee.plugins.MailPlugin -->
<resource-ref>
<res-ref-name>
mail/org.imixs.workflow.jee.mailsession
</res-ref-name>
<res-type>javax.mail.Session</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</session>....
<ejb>
<ejb-name>WorkflowManagerImplementation</ejb-name>
<jndi-name>
ejb/ReklamationsmanagementWorkflowManagerImplementation
</jndi-name>
<!-- Define Mail Session Ressource for
org.imixs.workflow.jee.plugins.MailPlugin -->
<resource-ref>
<res-ref-name>
mail/org.imixs.workflow.jee.mailsession
</res-ref-name>
<jndi-name>mail/org.imixs.workflow.jee.mailsession</jndi-name>
</resource-ref>
</ejb>