<div style="display:inline;"> <img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/1066880148/?value=0&amp;label=4oTQCMyJzwQQlJnd_AM&amp;guid=ON&amp;script=0">

By: Martin Nichol on August 12th, 2019

Print/Save as PDF

Using Ant to Deploy Work Flows Scripts

Blog

A while ago, I wrote an article on my personal blog on how Use Ant to Deploy Automation Scripts. In the article, I walked through configuring a Publish Channel to export and an Enterprise Service to import Script and LaunchPoint information. I then provided an Ant script that could post data to the Enterprise Service.

The reason for this script is to make it easy to deploy Automation Scripts from a source control repository like SVN or Git. While Migration Manager make it easy to migrate changes from one environment to another, it does not integrate nicely with a source control tool.

The same script to deploy Automation Scripts, can be extended to deploy Work Flows.

Integration Changes
Building on the Integration object created in the original blog post, deploying Work Flows will require new Object Structure, Publish Channel, and Enterprise Service.
Start by creating a new Object Structure by duplicating the DMWFPROCESS object structure used by Migration Manager. Call the new Object Structure IS_WORKFLOW.
Navigate to the Publish Channel application and create a new Publish Channel for the IS_WORKFLOW object structure. I called mine ConfigWORKFLOW.
Navigate to the Enterprise Service application and create a new Enterprise Service for the IS_WORKFLOW object structure. I called mine ConfigWORKFLOW.
Navigate to the External Systems application and load the Config record. Associate the Publish Channel and Enterprise Service created above.

Ant Script Changes
The Ant script remains unchanged.

Property File Changes
Add the following section to the deploy.properties file:

deploy.3.name=WorkFlows
deploy.3.dir=${maximo.base.directory}/Config/workflow
deploy.3.files=*.xml
deploy.3.url=${maximo.base.url}/IS_WORKFLOW

Add the new deployment to the deploy.list property like this:
deploy.list=1,2,3

Building and Deploying Work Flows
My development process starts by building the work flow through Maximo’s user interface. Once the work flow is complete, I export it using the Data Export button on the Publish Channels tab of External Systems application.

The xml file that is extracted will begin with a tag named PublishIS_WORKFLOW. Rename the opening and closing tag to SyncIS_WORKFLOW. Commit this file into your source control system. In my project, and in the property file above, work flows are stored in a directory called Config/workflow off the root of the Maximo project.

To deploy the work flows, run the ant script. It will still be necessary to log in to Maximo and manually Enable and Activate the work flow.

About Martin Nichol

Martin Nichol has a computer science degree from Western University (formerly University of Western Ontario). He has been with Interloc for 10 years. He has created a Maximo testing framework based on JUnit that permits running unit tests in a Maximo instance within Eclipse. He also created a Maximo/Twitter integration that can send tweets and create Service Requests from tweets.