How To Create Child or Related Objects On IBM Maximo AnywherePaperv1.0

September 13, 2022 | Author: Anonymous | Category: N/A
Share Embed Donate


Short Description

Download How To Create Child or Related Objects On IBM Maximo AnywherePaperv1.0...

Description

 

How to create Maximo child/related objects on IBM Maximo Anywhere  Author: Ana Ana Biazetti In my previous blog post,  post, “How to add a Maximo related object to IBM Maximo Anywhere” , I provided an example for adding a Maximo related objectlog into a Maximo user interface (UI). The example added the communications object, whichAnywhere is related app to the work order, to the Maximo Anywhere Work Execution app. This included:   A view to show show the list of of communication logs that are related to the work order   A view to show the details of each communication log •



This document will build upon that scenario by allowing new communication log records to be created through the Work Execution app and saved to Maximo, as expected. This exercise includes:   a new view for the user to input the values for the new commlog   a button on the Work Order Detail View as well as on the CommLogList View to add new new commlog records   a javaScript handler class to to include all the handler methods for initializing and validating the views 





  a javaScript business object class to initialize and validate new commlog instances



The sections below cover the steps needed to accomplish this. Make sure you have the previous exercise (“How to add a Maximo related object to IBM Maximo Anywhere” Anywhere”)) working before you start the steps below. Step 1. Make changes in Maximo to allow OSLC to work properly with commlog as a record that can be created by Maximo Anywhere

Step 1.1 In Maximo, add anywhererefid to the commlog object Maximo Anywhere requires a new attribute to be added to the related/child object in Maximo such that it can identify and relate that new record in the response from Maximo with the one recently created locally (which does not have the Maximo assigned id yet). This attribute is called anywhererefid. 1. In the Database Configurat Configuration ion application, open the commlog object 2. Add an attribute for anywhererefid with BIGINT type. Save. Save.

 

  3. Apply configuration changes (Admin mode on, Apply config Changes, Admin mode mode off)

Step 2.1 Some related records might need adjustments on the OSLC Object Structure This step is not required for all types of related records/child records. It is only required for objects that have autokeys that are also keys on the record. In this example, commlogid is a required key for commlog records, and it should be restricted (meaning, not copied from OSLC requests) when creating new records. To restrict the commlogid: 1. Go To To > Integration Framework > Object Structures 2. Find oslcwodetail oslcwodetail 3. Select Action > Inbound Setting Restrictions Restrict ions

 

  4. Filter on commlog. Override and mark the commlogid commlogid f  field ield as restrictedfield. .

 

  This step is required because when Maximo Anywhere sends transactions to create commlog records as children of a given workorder, OSLC must receive the commlogid (because it is a required key)., It then must restrict it to allow Maximo to autokey its value on the record.

Step 2. Import the updated OSLC Resource into the Maximo Anywhere environment   /AnywhereWorkManagement/anywhere /AnywhereW orkManagement/anywhere-rdfs-pull -rdfs-puller.xml er.xml should already have commLog as a resource to be downloaded.   Run AnywhereWorkManager/anywhere-rdfs AnywhereWorkManager /anywhere-rdfs-puller.xml -puller.xml with parameters (make sure you specify section..  user/password). For more details, see  see this KnowledgeCenter section   Make sure the commlog shape doc under: /AnywhereWorkManagement/oslc /AnywhereWorkManage ment/oslc-docs/resources/rdf/oslc/shapes/oslcwodetail/commlog/commlog is updated and includes the new attribute.







Step 3. Update the app.xml artifact for the WorkExecution App

 

Step 3.1 In the View section, at the end of WO Details View, add the button to create new commlogs by replacing the Communications Log groupitem with the following: >  >  >  >  />    class        

Step 3.2 In the View section, CommLogListView, add the action to create new CommLog records: >  action   label label= ="Create Comm Log Entry"  Entry" transitionTo transitionTo= ="WorkExecution.NewCommLogView"   >  image >  />    class    

Step 3.3 In the View section, define NewCommLogView:   -->   view   id id= ="WorkExecution.NewCommLogView"  label label= ="Comm Log Entry"  Entry"  "false" >  showOverflow >  >  requiredAttribute   name name= ="commloglist" "commloglist"   />  />    >  groupitem> >      >  />      >  text   label label= ="Message" "Message"   resourceAttribute ="message"  "message" editable editable= ="true"  "true"   

Make sure of the case for the “anywhereRefId” attribute. The Maximo Anywhere platform depends on this attribute being defined with this case. The commlogid is only needed because we will be creating commlog records that have this id as a required attribute. Other related/children records may not need an id to be added.

 

  Step 4. Create the CommLogHandler and CommLogObject javaScript classes 1. Copy the provided CommLogHandler.js to: /AnywhereWorkManager/apps/WorkExecution/common/js/application/customerExtensions/Com mLogHandler.js 2. Copy the provided to CommLogObject to: /AnywhereWorkManager/apps/WorkExecution/common/js/application/customerExtensions/CommL ogObject.js Results  After rebuilding rebuilding the Work Execution Execution app, you you should should see the new new “+” buttons on both the WorkOrder Details view as well as on the CommLog List View, and you should be able to add new commlogs by clicking on them:

 

 

In summary, you can create Maximo related objects in Maximo Anywhere through the use of configuration and customization. For more information on this and other Maximo Anywhere configuration examples, please see this  this link. link.  In my next posts, I will cover additional examples of configurations in Maximo Anywhere. I look forward to hearing about your own configuration scenarios and suggestions. Connect with me here or on Twitter  @abiazett. @abiazett . 

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF