IBM TRIRIGA Application Platform Version 3.5.1

Custom classes and custom tasks

When you create a ClassLoader record, you can add custom Java™ classes to the class path of the application server. These classes can be accessed from a Custom task in a workflow.

You can add custom Java classes to the class path of the application server in one of three ways: Parent First, Parent Last, and Isolated. These classes can be accessed with a Custom task in a workflow for programmatic interaction or can be extended to work as a Java servlet. Either method extends the form capabilities for portal sections and form tabs.

To access your classes from a Custom task that is loaded through the ClassLoader, you must observe the following rules:
  • Start your class packages with one of the following three structures: com.tririga.ps, com.tririga.appdev, or com.tririga.custom. Any other structure is blocked.
  • Specify the ClassLoader name followed by a colon in the ClassName field in the workflow Custom task. For example, if you have a ClassLoader record that is named MyClassLoader and your entry class is com.tririga.custom.myclassloader.Hello, then the value in your ClassName field is MyClassLoader:com.tririga.custom.myclassloader.Hello. When you use this naming convention, workflow can search for your class within the context of the specified class loader.
  • Implement one of the com.tririga.workflow.pub.CustomTask objects available from the as-delivered TririgaCustomTask.jar file in the InstallationDirectory/tools/BusinessConnect folder. For development, you must include the TririgaBusinessConnect.jar file and the TririgaCustomTask.jar file in your IDE class path. If you include these libraries in the ClassLoader business object, they are ignored.

For information about how a Custom task is implemented and what it offers you, see Application Building for the IBM TRIRIGA Application Platform 3. The ClassLoader object provides an easy handle to conduct a hot deployment and safely manage your Custom task implementations. It does not add to or change the function of a Custom task.

Application Building for the IBM TRIRIGA Application Platform 3 instructs you to put your files into the application server lib directory. You can skip this step, which can get complicated when you have multiple servers. Instead, add the class loader to the database and have the container intelligently extract and use the classes.



Feedback