Enable automated synchronization of Work Order data from IBM Maximo to IBM TRIRIGA or vice versa.
In this code pattern, learn how to synchronize a Work Order created in Maximo with TRIRIGA using an AppConnect Designer flow.
- When a Work Order is created in Maximo Asset Management, it triggers the flow to populate the request in TRIRIGA. (There is also a flow that works in the reverse direction, that works in a similar way.)
- App Connect sends a request with the new information through the flow towards the target system (TRIRIGA).
- A JSON Parser sifts through the request and converts it to an object.
- This object from the JSON Parser goes through Steps 5-8.
- The data from the object is mapped to the corresponding fields in the target application (TRIRIGA).
- The newly mapped data is sent to the target application (TRIRIGA) where the request is then created.
- This record is then validated with the original application (Maximo Asset Management) via another Post request.
- An ID is created within the original application (Maximo Asset Management).
At the end of this process, a Work Order can be created within Maximo and sent to TRIRIGA and vice versa.
This configuration assumes the completion of the pre-requisites and steps outlined in the Maximo <-> TRIRIGA code pattern. See here for those steps.
Maximo
Within Maximo, some initial changes to the database and Work Order application need to be completed in order for the integration to work properly. Errors may arise if these steps are not completed.
Domain | Description | Domain Type | Data Type | Length |
---|---|---|---|---|
PLUSILOCPATH | Tririga location path details | ALN | ALN | 10 |
PLUSIORG | Primary organization path | ALN | ALN | 10 |
These domain will need to be populated in order to send a Work Order out of Maximo. This will be completed in a later step.
Go to 'Attributes' and create a new row:
Attribute | Description | Type | Length | Required | Domain |
---|---|---|---|---|---|
PLUSILOCPATH | Tririga location path details | ALN | ALN | No | Select the PLUSILOCPATH Domain from the previous step |
PLUSIORGPATH | Primary organization path | ALN | ALN | No | Select the PLUSIORG Domain from the previous step |
** Make sure the length of this attribute has the same length as the domain that is linked
Save the attribute. Apply the configuration changes to the database by switching on Admin mode and Apply Database Configuration
Navigate to Integration -> Publish Channels
- Search for 'MXWOInterface' under the Publish Channel field. Click on the channel and from the left side of the screen select 'Duplicate Publish Channel'
- Rename the channel PLUSIMXWO
- Click on 'Enable Event Listener' on the left side under More Actions
- Make sure Publish JSON and Retain MBO's are checked, the Operation should default to Publish and the Adapter should default to MAXIMO.
- Click 'Save Publish Channel' on the left under Common Actions
Navigate to Integration -> Enterprise Services and click on the blue plus button at the top of the page
- Under the System name fill in PLUSIWO and in the Description fill in "Work Order"
- Select 'MXWO' under Object Structure which will populate the Object Structure Sub-Records table
- Click 'Save Enterprise Service' on the left under Common Actions
Repeat this sequence for PLUSIORGDOMAIN and PLUSILOCDOMAIN. In Description fill in "Organization records from Tririga" & "Location path records from Tririga" respectively and select 'MXDOMAIN' for both Object Structures.
Navigate to Integration -> End Points and click on the blue plus bitton at the top of the page
- Under End Point fill in PLUSIWO and in the Description fill in "AppConnect Work Order outbound to TRIRIGA"
- Select 'HTTP' for Handler
- Click on 'Save End Point' on the left side under More Actions which will populate the Properties for the End Point
- Until the flows have a destination url, we can only fill in certain fields:
- HEADERS: "Content-Type: application/json"
- HTTPMETHOD: POST
- Save the End Point
Navigate to Integration -> External System and open up the 'PLUSITRIRIGA' external system that was previously set up. Associate the Publish Channel and Enterprise Services to the External System
- Add a new row in Publish Channel with the newly created PLUSIMXWO and link the PLUSIWO End Point as well
- Add three new rows with the newly created Enterprise Services.
** Make sure all are enabled
Go to DB Config -> WORKORDER object -> Relationships. Add a 'New Row' and enter the following values:
Relationship | Child Object | Where Clause | Remarks |
---|---|---|---|
PLUSILOCATIONPATH | ALNDOMAIN | domainid='PLUSILOCPATH' and value=:plusilocpath | Relationship to PLUSILOCPATH Alndomain |
PLUSIORGANIZATIONPATH | ALNDOMAIN | domainid='PLUSIORG' and value=:plusiorgpath | Relationship to PLUSIORGPATH Alndomain |
Go to System Configuration -> Platform Configuration -> Application Designer
Search for 'WOTRACK'
Switch to the Work Order Tab and scroll down to the Work Order Details section
At the top, click the icon labeled Control Palette and drag the respective controls into the first main section on the right of the screen. Add these values within the properties of the control.
** Be sure that the PLUSIREQCLASSID Attribute is taken from the WORKORDER Object. **
Type of Control | Label | Attribute | Attribute for Part 2 (If Multipart Textbox) | Lookup | Input Mode for Part 2 (If Multipart Textbox) |
---|---|---|---|---|---|
Multipart Textbox | Tririga Location Path | PLUSILOCPATH | PLUSILOCATIONPATH.DESCRIPTION | VALUELIST | Readonly |
Multipart Textbox | Tririga Primary Organization | PLUSIORGPATH | PLUSIORGANIZATIONPATH.DESCRIPTION | VALUELIST | Readonly |
Textbox | External Ref ID | EXTERNALREFID (From the WorkOrder Object) | N/A | N/A | N/A |
Click 'Save Definition' after the changes are added.
AppConnect
The configuration of AppConnect from the previous code pattern should provide the 'mxtririga' and 'trimaximo' accounts within AppConnect needed for the flows to work properly.
Download and import the .yaml files and keep the urls handy for a later step. Use the following table for the parameters of the flows:
Parameter Name | Value |
---|---|
mxUrl | http://[host]:[port]/meaweb/esqueue/PLUSITRIRIGA/PLUSIMXWO |
triUrl | http://[host]:[port]/oslc/so/triAPICWorkTaskCF |
mxDomain | PLUSILOCPATH (For Loc Path flow) / PLUSIORGPATH (For Org Path flow) |
TRIRIGA
Go to Tools -> System Setup and select Integration Object under the Integration heading
Select Organization - APIC - HTTP Post from the table. Fill in the required sections:
Field Name | Value |
---|---|
Http URL | [the PLUSITRIOrgPath2MX url from AppConnect with the correct parameters outlined in the AppConnect section] |
Request Method | POST |
Content-Type | application/json |
**If the AppConnect instance is based on cloud, include the api key in the Headers. If the instance is on-prem, include your basic authorization in UserName and Password
Once the correct values are filled in, click Execute at the top of the window. The process will take a few minutes since there is a large amount of files, but once it is completed you can check that the batch processed correctly under the specified domain.
Repeat the process with triBuilding, triProperty, & triFloor using the PLUSITRILocPath2MX url and parameters.
Verify the data is in sync by checking the corresponding Domain in Maximo. The populated table should look like this:
Maximo to TRIRIGA
Go to Work Orders -> Work Order Tracking and click on the blue plus sign to create a new Work Order.
Input the desired name/number of the WO along with the description and assign the corresponding Primary Org and Location Path. Click 'Save Work Order' and the flow should fire.
The flow also supports the cost calculation of associated actuals within a Work Order. Costs can only be transacted against a Work Order with a valid GL Account. Once the proper GL Account is associated, navigate to the 'Actuals' tab within the desired Work Order to assign costs. The supported actuals are 'Labor', 'Materials', 'Services', and 'Tools'.
Select the correct Labor record to associate with the Work Order. Enter in the required Start and End Time fields and 'Save' the Work Order. The flow will update the Tririga application with the correct cost associated with the Labor based on the time entered.
Select the correct Material record to associate with the Work Order. Enter in the required 'Storeroom' field and 'Save' the Work Order. The flow will update the Tririga application with the correct cost associated with the Material.
The Service actual will only populate if a PO is received, and the PO has a Service line associated with the Work Order. In order to initialize this, create a new Purchasing Order and add a new PO Line. Select 'Service' as the Line Type and enter the Line Cost. Associate the desired WO for this Service to be charged and approve the PO.
In the 'Receiving' application, select the approved PO and switch to the 'Service Receipts' tab at the top. Click on 'Select Ordered Services', select the created Service, and click 'Save Receipt' on the left-hand side of the screen.
The Service will then appear as an actual in both Maximo and Tririga via the flow.
Select the correct Tool record to associate with the Work Order. Enter in the required Bin field and 'Save' the Work Order. The flow will update the Tririga application with the correct cost associated with the Material.
A full breakdown of costs can be found by going to View -> Costs from the left side of the screen under 'More Actions'
TRIRIGA to Maximo
Go to Tasks -> Manage Tasks -> Work Tasks and click the 'Add' button on the top right.
Fill in the required fields and click 'Submit' at the top right of the newly opened window. The flow should fire upon submission.
Common Errors and their resolutions:
Maximo
Common errors found in the Maximo system
Error | Cause |
---|---|
401: Bad Request | This usually means an aspect of the request was not sent correctly- double check what is being sent as well as the flow in AppConnect to make sure everything is correct and running. |
AppConnect
The best way to troubleshoot with AppConnect is to use the logging function. While the flow is stopped, add a 'Log' node into the flow from the 'Toolbox' tab.This will allow mapping of any field to the 'Logging' section of the application. Select Info for the Log level and then map the field that needs debugging. In this example the Request Object has been mapped to see what is being sent through the flow. Click the icon to the right of the Message Detail filed to map the desired field.
The Log node will compile the message and read out here:
Diagnose the response that shows up in this section to learn what might be causing the issue.
TRIRIGA
Common errors found in the TRIRIGA system
Error | Cause |
---|---|
ERROR: Requested For Does not Exist | No People record exists with the triIdTX value mentioned in triRequestedForTX field of the payload |
ERROR: Building Does not Exist | No Building record exists with the triNameTX value mentioned in triBuildingTX field of the payload |
ERROR: Location Does not Exist | No Location record exists with the triNameTX value mentioned in triParentLocationTX field of the payload |
ERROR: Organization Does not Exist | No Organization record exists with the triPathTX value mentioned in triCustomerOrgTX field of the payload |