Maximo Workflow to BPMN
Updated: Jun 24
Maximo Workflow to BPMN
Workflow is one of IBM Maximo flagship features. Maximo Workflow is a mean to automate repetitive tasks and to document the progress. Using workflows, a greater level of efficiency and accountability is achieved within the organization.
Maximo Workflow and Business Process
Using the integrated Workflow applications to model, plan, design, build, test, implement, and manage Workflows, we must pay a close attention to the Business Process.
A Business Process may span one or more Workflows and covers manual tasks which can/should not be automated. There are many tools to model a Business Process but, generally speaking, the majority provide Business Process Model and Notation (BPMN) support. From specialized tools like IBM Blueworks Live and IBM Rational Software Architect Designer to general-use applications like Microsoft Visio, the importance of clean and easy to read diagrams is essential for business and technical users.
Present Process Differently?
Since Maximo Workflow enforces specific rules to render Workflow, many users and especially business users find it quite difficult to go through those complicated mesh of lines. In this post we will try to free up the workflow “presentation” and use, for this article, free tools to refactor and present our process in a clearer and concise diagram.
Business Process Model and Notation BPMN
BPMN is a graphical representation of business process. It has been in development for many years so far and being maintained by the Object Management Group (OMG). A limited set of Elements can be used to construct a valid BPMN model. Those elements are:
Flow objects: Events, activities, gateways
Connecting objects: Sequence flow, message flow, association
Swim lanes: Pool, lane
Artifacts: Data object, group, annotation
Each element has a graphical representation (distinct graphics).
BPMN Serialization using XML
<?xml version="1.0" encoding="UTF-8"?> <definitions id="Definition" targetNamespace="http://www.example.org/MinimalExample" typeLanguage="http://www.java.com/javaTypes" expressionLanguage="http://www.mvel.org/2.0" xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:tns="http://www.jboss.org/drools"> <process processType="Private" isExecutable="true" id="com.sample.HelloWorld" name="Hello World" > <!-- nodes --> <startEvent id="_1" name="StartProcess" /> <scriptTask id="_2" name="Hello" > <script>System.out.println("Hello World");</script> </scriptTask> <endEvent id="_3" name="EndProcess" > <terminateEventDefinition/> </endEvent> <!-- connections --> <sequenceFlow id="_1-_2" sourceRef="_1" targetRef="_2" /> <sequenceFlow id="_2-_3" sourceRef="_2" targetRef="_3" /> </process> <bpmndi:BPMNDiagram> <bpmndi:BPMNPlane bpmnElement="Minimal" > <bpmndi:BPMNShape bpmnElement="_1" > <dc:Bounds x="15" y="91" width="48" height="48" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="_2" > <dc:Bounds x="95" y="88" width="83" height="48" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="_3" > <dc:Bounds x="258" y="86" width="48" height="48" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge bpmnElement="_1-_2" > <di:waypoint x="39" y="115" /> <di:waypoint x="75" y="46" /> <di:waypoint x="136" y="112" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_2-_3" > <di:waypoint x="136" y="112" /> <di:waypoint x="240" y="240" /> <di:waypoint x="282" y="110" /> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </definitions>
Maximo Workflow Tables
All, or rather majority, of Maximo Workflow tables starts WF prefix. Here is a list of those WF-prefixed tables:
Generating XML Data from the Database
Oracle provides comprehensive set of tools to generate and construct XML data from relational database tables. Check out the complete list of tools in Oracle XML DB Developer’s Guide.
This is the syntax for XMLElement and XMLAttributes functions:
Oracle XML Element Function
Oracle XML Attributes Function
Exporting Maximo Workflow into valid BPMN 2.0.2 XML file
In this section I will go over an overly simplified example to explain the concept.
Note: The output illustrations provided towards the end of the post are done using a more involved code which are not covered in this post, but I can share some details if you expressed interest via email.
To put the pieces together we need to abstract the topics covered earlier in this post into a simplified algorithm:
Map Maximo Process to BPMN Elements
Map Maximo Workflow Node Types into BPMN Elements
Provide BPMN properties such as width, height, X, Y, and some additional drawing artifacts
Use Oracle XML tools to generate valid BPMN XML
Optional: Provide some configuration
Optional: Try to slim it down to a single query
Here is a sample code of converting Maximo Workflow Nodes into BPMN Flow Objects:
SELECT XMLAgg(XMLElement (EVALNAME TM.XMLIDENTIFIER ,XMLAttributes ( WFN.PROCESSNAME||'_'||WFN.NODETYPE||'_'||WFN.NODEID AS "id" ,WFN.TITLE AS "name" ) ,( SELECT XMLAgg(XMLElement("bpmn:incoming",TM.NODETYPE||'_'||WFA_OUTCOME.ACTIONID) ORDER BY WFN.NODEID) FROM WFACTION WFA_OUTCOME ,TYPE_MAPPING TM WHERE 1=1 AND WFN.NODEID=WFA_OUTCOME.MEMBERNODEID(+) AND WFN.PROCESSNAME=WFA_OUTCOME.PROCESSNAME(+) AND WFN.PROCESSREV=WFA_OUTCOME.PROCESSREV(+) AND TM.NODETYPE='ACTION' ) ,( SELECT XMLAgg(XMLElement("bpmn:outgoing",TM.NODETYPE||'_'||WFA_INCOME.ACTIONID) ORDER BY WFN.NODEID) FROM WFACTION WFA_INCOME ,TYPE_MAPPING TM WHERE 1=1 AND WFN.NODEID=WFA_INCOME.OWNERNODEID(+) AND WFN.PROCESSNAME=WFA_INCOME.PROCESSNAME(+) AND WFN.PROCESSREV=WFA_INCOME.PROCESSREV(+) AND TM.NODETYPE='ACTION' ) ) ) FROM WFNODE WFN ,TYPE_MAPPING TM WHERE 1=1 AND WFN.PROCESSNAME=WFP.PROCESSNAME AND WFN.PROCESSREV=WFP.PROCESSREV AND WFN.NODETYPE=TM.NODETYPE(+)
Here is another sample code which converts Maximo Workflow (very basic) coordinates into BPMN Edges:
SELECT XMLAgg( XMLElement("bpmndi:BPMNEdge" ,XMLAttributes ( WFA.WFACTIONID AS "id" ,WFA.ACTIONID AS "bpmnElement" ) ,XMLElement ("di:waypoint" ,XMLAttributes ( (WFN_OWNER.XCOORDINATE*WFP.X_MULTIPLIER)+TM_OWNER.WIDTH AS "x" ,WFN_OWNER.YCOORDINATE*WFP.X_MULTIPLIER+(TM_OWNER.HEIGHT/2)+TM_OWNER.YDISPLACEMENT AS "y" ) ) ,XMLElement("di:waypoint" ,XMLAttributes ( (WFN_MEMBER.XCOORDINATE*WFP.X_MULTIPLIER)+TM_MEMBER.XSHIFT AS "x" ,WFN_MEMBER.YCOORDINATE*WFP.X_MULTIPLIER+(TM_MEMBER.HEIGHT/2)+TM_MEMBER.YDISPLACEMENT AS "y" ) ) ) ) FROM WFACTION WFA ,WFNODE WFN_OWNER ,WFNODE WFN_MEMBER ,TYPE_MAPPING TM_OWNER ,TYPE_MAPPING TM_MEMBER WHERE 1=1 AND WFA.OWNERNODEID=WFN_OWNER.NODEID AND WFA.PROCESSNAME=WFN_OWNER.PROCESSNAME AND WFA.PROCESSREV=WFN_OWNER.PROCESSREV AND WFA.MEMBERNODEID=WFN_MEMBER.NODEID AND WFA.PROCESSNAME=WFN_MEMBER.PROCESSNAME AND WFA.PROCESSREV=WFN_MEMBER.PROCESSREV AND WFA.PROCESSNAME=WFP.PROCESSNAME AND WFA.PROCESSREV=WFP.PROCESSREV AND WFN_OWNER.NODETYPE=TM_OWNER.NODETYPE(+) AND WFN_MEMBER.NODETYPE=TM_MEMBER.NODETYPE(+)
Of course the resulted outcome is a valid BPMN 2.0.2 XML.
Modeling Exported BPMN
There are many tools out there to model and present BPMN beautifully, but for this post we will use a free online tool named yworks.com, you can use Microsoft Visio as well. Being “Free” and “Online” doesn’t mean an inferior product, in fact, yworks.com is one my favorite and very capable tools out there and it does much more than what we are going to use for in the post.
Now, let’s have a look at our real-life Workflow “before” and “after”:
Maximo Workflow 1 Before
Maximo Workflow 1 After BPMN
Maximo Workflow 2 Before
Maximo Workflow 2 After BPMN
Maximo Workflow 3 Before
Maximo Workflow 3 After BPMN
There is no comparison to be done here, the difference is clear!
Once Maximo Workflow is activated, Workflow instances are created for each record. Maximo provides tools to manage Workflow Instances and Assignments using Workflow Administration application, but it doesn’t cover creating new assignments. Check out this post: https://adijaradat.com/recreate-workflow-assignments/
What about the other way around?
We managed to get Maximo Workflow exported into BPMN 2.0.2 XML and used that export to represent process professionally and concisely, but can we apply changes to the business process in, say Visio, and import it back into Maximo? The short answer is YES, but the long answer is: with enough time, interest, and support it can be done and it will for sure add big value to any enterprise.