January 17, 2014

Screen recorder

Today my fellow colleague Andreas Dietrich has discovered a nice little utility that is shipped with Windows 7 which I think can help you guys in several ways.
The Windows 7 "Problem Step Recorder" can be used for example to document installations or to provide as best practise for ticket documentation.
This little utility (psr.exe) should be available on every Windows 7 installation and can be launched by typing "psr" on the Windows search


When started it appears as a nice little toolbar like this.


After you have finished recording, it saves a zip file containing a MHT file that can be opened with a web browser.
The output contains:
  1. A step by step recording of what you have done and clicked including screenshots.
  2. Additonal comments that you entered while recording
It is not a video but more a step-by-step series of pictures and comments.

January 13, 2014

Migrating a Maximo server

Checkout this great series of articles by Richard Lesses describing a step by step guide of the migration of his Maximo development environment.

Part 1
Part 2
Part 3
Part 4

January 10, 2014

How to launch Workflow

Today I want to show you all the possible ways (as far as I know) of starting a workflow in Maximo.


Interactive initiate

This is the most basic way of automatically start a workflow when an object is created through the user interface. This technique will not work for objects created by MIF, workflows or escalations.
To enable workflow auto-initiate open your workflow in Workflow Designer and select the Interactive Initiate checkbox.


Escalation

Another way of activating a workflow is through an escalation.


Go to the Actions application and create a new action like this:
  • Action: STARTWF
  • Description: Start TESTWF workflow
  • Object: WORKORDER
  • Type: APPACTION
  • Value: WFINITIATE
  • Parameter/Attribute:  TESTWF
  • Accessible from: ESCALATION

Now setup an escalation to trigger the STARTWF action:
  • Escalation: STARTWF
  • Applies to: WORKORDER
  • Condition:
  • Schedule: 5m,*,*,*,*,*,*,*,*,* (every 5 minutes)
  • Escalation Points
    • Escalation Point: 1
    • Repeat: false
    • Leave other fields empty
  • Actions
    • Action: STARTWF
Don't forget to activate the escalation.


Application Toolbar Button, Action Menu or pushbutton

If you wand to let the user manually trigger a workflow from an application you have several options.
Typically this is done creating a new button on the toolbar but you can also create a new action in the menu or add a pushbutton to the application itself.

Open your application in the Application Designer.
Add the control to which you want to attach the workfow start
Set the control properties as follows:
  • mxevent: ROUTEWF
  • value: [MYWF]

Obviously you have to replace [MYWF] with the name of your workflow.


Java

There are two useful methods that can be used to start and stop a workflow on an MBO. Both are located into psdi.workflow.WFInstance class.

initiateWorkflow(String memo, WFProcess wfProcess)
stopWorkflow(String memo)

This article has a nice example of it.

Another option is to use psdi.workflow.WorkFlowService class. The initiateWorkflow(String processName, MboRemote target) allows to easily start a workflow on a specific MBO.
The Java code should be something like this

MXServer mx = MXServer.getMXServer();
WorkFlowServiceRemote wfsr = (WorkFlowServiceRemote)mx.lookup("WORKFLOW");

MBORemote mbo = (MBORemote)getMbo();
wfsr.initiateWorkFlow("[MYWF]", mbo);


Script

Similarly to Java it is possible to use the above methods to start a workflow using TPAE scripting.

from psdi.server import MXServer
MXServer.getMXServer().lookup("WORKFLOW").initiateWorkflow("[MYWF]",mbo);


Integration Framework

In this IBM TechNote is described a new feature introduced in TPAE 7.1.1.6 to start a workflow with an HTTP call to MIF.
There is also another TechNote about this.

A more general approach would be to add a custom YORN field named STARTWF and set it to 1 through MIF. An escalation can then start the workflow for all the objects that has STARTWF=1 and then reset the STARTWF flag to 0.


REST

A REST call can also be used. An example URI is the following:

POST /maxrest/rest/mbo/po/6789?wfname=MYWF HTTP/1.1 x-http-method-override: "initiateWorkflow"

Replace PO with your MBO name, 6789 with the ID of the new record and MYWF with your workflow name.