This file should be available deployed on the relative path "WEB-INF\storage<custom><global>\education-global.xml".
<?xml version="1.0" encoding="UTF-8"?> <definitions> <connector> <treatment> <categories> <category name="education" label="treatment.education.label" description="treatment.education.description" /> </categories> </treatment> </connector> </definitions>
This file should be available from the relative path "WEB-INF\storage<custom><connectors>\education-smtp.xml" within the final connectors package.
<?xml version="1.0" encoding="UTF-8"?> <connectors> <connector name="smtp.connector" version="1.0" company="Visiativ Software" ref-connection="smtp.connection"> <treatments> </treatments> </connector> </connectors>
<?xml version="1.0" encoding="UTF-8"?> <connectors> <connector name="smtp.connector" version="1.0" company="Visiativ Software" ref-connection="smtp.connection"> <treatments> <treatment name="sendMail" label="smtp.connector.sendMail.label" execution="asynchronous"> <class qualifiedName="com.axemble.education.connectors.smtp.SampleSendMailTreatmentConnector" /> </treatment> </treatments> </connector> </connectors>
package com.axemble.education.connectors.smtp; import org.w3c.dom.Element; import com.axemble.vdoc.sdk.connectors.BaseTreatmentConnector; import com.axemble.vdoc.sdk.interfaces.IContext; import com.axemble.vdoc.sdk.interfaces.ITaskInstance; import com.axemble.vdoc.sdk.interfaces.IWorkflowInstance; public class SampleSendMailTreatmentConnector extends BaseTreatmentConnector { private static final long serialVersionUID = -1412125636353912245L; /* (non-Javadoc) * @see com.axemble.vdoc.sdk.connectors.BaseTreatmentConnector#execute(com.axemble.vdoc.sdk.interfaces.IContext, com.axemble.vdoc.sdk.interfaces.IWorkflowInstance, com.axemble.vdoc.sdk.interfaces.ITaskInstance, org.w3c.dom.Element) */ @Override public int execute( IContext context, IWorkflowInstance workflowInstance, ITaskInstance taskInstance, Element customElement ) { return BaseTreatmentConnector.CONTINUE; } }
<?xml version="1.0" encoding="UTF-8"?> <connectors> <connector name="smtp.connector" version="1.0" company="Visiativ Software" ref-connection="smtp.connection"> <treatments> <treatment name="sendMail" label="smtp.connector.sendMail.label" execution="asynchronous"> <class qualifiedName="com.axemble.education.connectors.smtp.SampleSendMailTreatmentConnector" /> <configuration> <class qualifiedName="com.axemble.education.connectors.smtp.SampleSendMailTreatmentConnectorEditor" /> <section name="main" label="smtp.connector.sendMail.section.main.label"> <fields> <field name="fldSubject" label="smtp.connector.sendMail.subject.label" description="smtp.connector.sendMail.subject.description" ctrl="com.axemble.vdoc.sdk.document.fields.LocalizedTextField" string-value="[${iWorkflowInstance-document.sys_Reference}] - ${iWorkflowInstance-document.sys_Title}" mandatory="true" /> <field name="fldBody" label="smtp.connector.sendMail.body.label" description="smtp.connector.sendMail.body.description" ctrl="com.axemble.vdoc.sdk.document.fields.LightBoxField" mandatory="true" targetLabel="treatment.mail.sendMail.bodyContent.label"> <targetField ctrl="fckeditor" fck_ToolbarSet="EzsRichText" fck_ImageBrowser="false" fck_LinkBrowser="false" fck_FlashBrowser="false" /> </field> </fields> </section> <custom /> </configuration> <entry-points> <workflow-library categoryName="education" /> </entry-points> </treatment> </treatments> </connector> </connectors>
package com.axemble.education.connectors.smtp; import com.axemble.vdoc.sdk.connectors.BaseTreatmentConnectorEditor; public class SampleSendMailTreatmentConnectorEditor extends BaseTreatmentConnectorEditor { private static final long serialVersionUID = -6439184427515294832L; public final static String FIELD_SUBJECT = "fldSubject"; public final static String FIELD_BODY = "fldBody"; @Override public boolean onAfterLoad() { // place your code here... return super.onAfterLoad(); } }