Customizing Expiration Handler - EnterWorks_Process_Exchange_(EPX) - 10.5

EnterWorks EPX Process Modeling

Product type
Software
Portfolio
Verify
Product family
EnterWorks
Product
Precisely EnterWorks > EnterWorks Process Exchange (EPX)
Version
10.5
Language
English
Product name
Precisely EnterWorks
Title
EnterWorks EPX Process Modeling
Topic type
Administration
Configuration
First publish date
2007
ft:lastEdition
2023-07-28
ft:lastPublication
2023-09-20T03:37:01.911821

The custom expiration handler may be used to do anything that the user wants to on the expiration of the work item. Customizing the expiration handler allows the user to reassign the work item to someone else and set a new expiration datetime, but it is entirely up to the designer of the expiration handler what should occur on expiration of the work item.

A sample custom code is made available for your reference if you installed the EPX documents during EPX installation. The CustomExpiredWorkHandler.java and SampleCustomSendAction.java files are located in the <EPX>\examples\custom directory would be included in your EPX install. The sample program files aims to send the work item to the next activity according to the value set in the expireWaitPeriod variable located in the custom.properties file.

To customize your expiration handler, you need to:

  1. Edit the build.bat file. Change the values of the variables EPX_HOME and EXAMPLE_JDK_HOME.

Here is an example:

EPX_HOME=D:\Enterworks\EPX EXAMPLE_JDK_HOME=D:\jdk1.5

  1. If you want to edit the java files, you can do so by adding more conditions or tasks in it. If you do not want to edit the java file, compile the CustomExpiredWorkHandler.java and SampleCustomSendAction.java file by using the build.bat file on Windows.

  2. After compiling, the custom.jar file is created. You need to include this jar file in your application server and webtools classpath.

Note: Do not forget to add a semicolon at the end of the path.

If you are using JBoss as the application server:

  • Go to your JBoss directories <EPX>\jboss\bin and <EPX>\jboss\conf\default and edit the jboss.args and jboss.conf files respectively.

In the jboss.args file, find the CLASSPATH variable and add at the end the path of the custom.jar file. A sample path would be D:/Enterworks/EPX/examples/custom/custom.jar;

In the jboss.conf file, add the code below at the end of the file:

<MLET CODE = "examples.custom.SampleCustomSendAction" ARCHIVE="custom.jar" CODEBASE="D:/Enterworks/EPX/examples/ custom/"> </MLET>

  • On your Tomcat webtool go to the <EPX>\bin directory and edit the WebToolsServer.lax and WebServicesServer.lax files located in the directory. Add the classpath: lax.class.path=D:/Enterworks/EPX/examples/custom/custom.jar;

  1. After adding the custom.jar file on the application server and webtools classpath, you also need to change a variable key in the config.properties file located in the <EPX>\bin directory.

In the config.properties file, locate the control.expiredWorkitem.class key and change the value to examples.custom.CustomExpiredWorkHandler.