Developing a generic RESTful Service Workflow Extension for ISIM
Requirements
- Generic ISIM Workflow extension that can send data to any URL. The same extension can be re-used to call different REST services.
- Extension will be capable of operating in Synchronous or Asynchronous modes.
- Extension will take 3 parameters Person Object, URL string and Form Parameters string (the data being posted).
- Extension will interpret HTTP 200 as success (synchronous) and HTTP 202 as wait (asynchronous).
- Workflow script will prepare the data to be sent and process the response.
- A sample TDI AssemblyLine to act as the REST service will be implemented.
Limitations
The intention was to return JSON data from the Web Service which would make passing objects much easier but unfortunately the ISIM Javascript engine does not seem to have a JSON parser. So the data is currently a string and you will have to parse in a script node as appropriate.
Overview

Configure Eclipse
- Install eclipse IDE.
- Create a new workspace which is an empty directory to hold your projects.
- Create a new Java project.
- Import the WorkflowExtension examples from
$ISIM_HOME/extensions/6.0/examples/workflow/src/examples/workflow. - Configure the build path by adding itim_api.jar, itim_server.jar and itim_server_api.jar.
- A sample TDI AssemblyLine to act as the REST service will be implemented.
The video below shows the setup of the eclipse IDE and should be viewed in full screen: -
The REST Extension
The code demonstrates: -
- Receiving Parameters from ISIM.
- Using the ISIM API within the extension.
- Making HTTP requests to a Web Service.
- Returning data to ISIM in the returned ActivityResult object.
TDI AssemblyLine
A TDI AssemblyLine is included in the package to download. The AssemblyLine consists of a HTTPServer Connector implementing an example REST service. Depending on the URL received the AssemblyLine returns a HTTP 200 or 202 response code and dummy data. It is for you to amend and configure the AssemblyLine to perform any other operations and return more useful data.
Installation
The tasks to install the extension are : -
- Copy the jar file to $ISIM_HOME/lib directory.
- Add the following lines to workflowextensions.xml in $ISIM_HOME/data before the last line: -
- Add the jar file to the ISIM Application's Classpath using the WebSphere Administration Console.
Figure: ISIM Shared Library
- Restart the IBM WebSphere Server.
- Add the extension to your ISIM workflow and use appropriate Script Nodes to call the extension and validate responses.
The video below shows the steps to configure the extension:-
ISIM Workflow
The REST Extension can be added anywhere in your workflow. You determine the information you want to send and process the response in script nodes before and after the extension.
- Script node (setRestParameters) sets the urlSting and urlParameters:-
- Rest Extension is configured with Relevant Data Items: -
Figure: Rest Extension RDIs
-
Script node (getResults) retrieves the data response from the REST Service being called:-