# Workflow

## Messenger

| Prior to any configuration make sure the user EDBKERNEL has been created and is activated for the Workflow module because internal processes use the user EDBKERNEL as a reference user!
| The e-mail notifications the messenger sends to the user can be in html- or text-layout files whereas the html-layout is the default setting.
| In order to set the workflow mailing to "plain text", the following entries in the ABS_<environment>.ini have to be changed.
| All entries similar to LayoutFilePath=lay/notifier/Message_eng.html have to be replaced by ..../Message_eng.txt. It is recommended to replace all ".html" by ".txt"!
| It is important not to forget the dot in front of "html" because otherwise different entries in the ABS.ini may be changed by mistake!
| The entry "LayoutFileType=text/html" in the module "[Messenger\Layoutdefinitions]" has to be changed to "LayoutFileType=text/plain".
| If the second step is not performed, the information of the email is in one line!
| ## Generating workflow mails via xml generator
| Currently workflow mails are generated by approximately two dozen templates which only differ in some minor details. With the new feature a more compact solution is available, generating mails with only one xml transform script for HTML, alternatively one for plain text output.
| Please note that this new feature is delivered to provide you with the possibility of performing first tests.
| To activate this feature, add the line "XMLSwitch=true" under the [Messenger] module in the ABS_<environment>.ini file.
| Example: ("...." indicate customer specific entries) [Messenger] HOST=.... FROM=.... Admin_UIC=.... axalantSender=.... axalantWebHost=.... axalantWebApplication=.... .... XMLSwitch=true The transform scripts (...xsl) and the language specific entries (...properties) can be found in the directory ep_root\axalant\lay\notifier. The transform script files are: MailTemplateTransform_HTML.xsl MailTemplateTransform_TEXT.xsl These scripts define the general output format of the message. Language specific changes applying to all mails are made in this transform script. An instruction at the beginning of both scripts describes how to generate the output manually and check your changes outside the PLM system. Most of the used variables are generated by source code. Four variables (Subject, Title, Intro and LinkTo) are message specific and can be changed in the following .... properties files: MessageEntries.properties (default English) MessageEntries_de.properties (German)
| Note that the files are language-specific. The entries for Subject, Title, Intro and the LinkTo have the specific message name as postfix!
| ### How to make changes
| In the HTML xsl script file an commented example is describing how to define different colors for the output. Additional information about xml xsl ... can be found in the web or in appropriate literature.
| ### How to test your changes
| An instruction at the beginning of the xsl-scripts describes how to generate the output manually and check your changes outside the PLM system. This will be explained here in detail for a windows system:
| #### Prerequesites
| Search in your system for the following files: - xalan.jar - xerces.jar - xercesImpl.jar - xml-apis.jar - xsdlib.jar You will find them in the directory "<ep_root>\ext\bin\java" or in the directory "<ep_root>\ext\tomcat\common\endorsed".
| In a command shell with environment settings add the following code line: - Set CLASSPATH = <ep_root>\ext\bin\java\xalan.jar;%CLASSPATH% - Don't forget to replace <ep_root> with your path. - Repeat this with all other files.
| Switch to the directory where the XSL file is placed (normally this is: <ep_root>\axalant\lay\notifier).
| Preparation of the input file Normally the workflow source code generates this input file from the current active objects. In the running system it exists only in the memory and isn't visible for the user. Here we want to test our own changes and want to check how they will look later when we set them active for the running system. So we have to prepare an "input file" by our own. For this approach, as an example, one input file is added to the system which we have to set up correctly for this test. The file "MailGenerated.xml" is not used by the system and exists only for test approaches. It can be found in the directory "<ep_root>\axalant\lay\notifier". The file looks like: