Maximo

 View Only
Expand all | Collapse all

Integration ArcGIs and Maximo Spatial

  • 1.  Integration ArcGIs and Maximo Spatial

    Posted Mon February 19, 2024 06:26 AM

    Greeting,

    I need advice.

    We are integrating Maximo Asset Management with ArcGIS. We currently have Maximo Spatial Asset Management 7.6.1.0 installed. So far we have created the following in Map Manager:


    1. The "Site" option is filled in:

    2. In Map Security we have the following:
    3. In Map Services we have the following:
    The display of these assets on the map is correct, everything works as it should. I can see all the listed assets on the map properly.
    The problem occurs when I need to transfer data from ArcGis to Maximo, for example, a field is filled in on the assets in ArcGIs and that value must be transferred to Maximo. Concretely for this case, they are numbered 9 Stupovi.
    Added Inbound JSON Mapper.
    With JSON mapping, the only thing unusual for me was that when I add via URL, I get an error:
    {
      "error": {
       "code": 499,
       "message": "Token Required",
       "details": []
      }
    }
    So, I found somewhere on the net that if I copy the entire structure in Jason Data and paste it, then everything works in JsonMapping, but still the fields are not copied from ArcGis to Maximo.
    This is a cron task with filled parameters:
    Can anyone help me, do I need anythin else to configure, or I did something wrong?
    Thank you


    ------------------------------
    Dario Stjepanović
    ------------------------------


  • 2.  RE: Integration ArcGIs and Maximo Spatial

    Posted Tue February 20, 2024 09:45 AM

    Hi,

    You did the right thing with JSON mapping...just copy and paste the JSON data into that box.

    In your Cron Task Instance History - is there an Action?  Are there any errors?

    Are your queues set up? Do you have Message Tracking enabled on the ARCGISASSET External System so that if you do have an Action on your cron task you can see the status of the message received?  It could be erroring out.

    Few housekeeping items:

    1)change all your URLs to https in Map Manager

    2) Do you have a Geometry Service on the Services tab in Map Manager?

    3) Double check that your GIS Object in Map Manager is the same as your Cron Task Instance parameter - I have typos sometimes and that causes it not to work

    4) Clean up the URL in your Cron Task Instance parameter to simplify it.  Here is an example...basically everything past your where clause can be deleted and replaced with this: &outFields=*&f=pjson

    https://services1.arcgis.com/xyz/ArcGIS/rest/services/xyz/FeatureServer/0/query?where=FID='2'&outFields=*&f=pjson



    ------------------------------
    Lacey Lurges
    ------------------------------



  • 3.  RE: Integration ArcGIs and Maximo Spatial

    Posted Wed February 21, 2024 06:13 AM

    Hi Lacey,

    Thank You for your time.

    This is the preview of my cron task history, I do not have any errors, as you can see:

    Message Tracking is enabled but in Publish Channels, because ARCGISASSET I do not have in External System, only in Publish Channel:

    Do you have any docomentation about setting queues  up, what I need to set up, because I did something, maybe I forgot something.
    1) I changed all http to https
    2)This is Geometry Services:
    3) Check
    4) I changed to this:

    https://??????????/arcgis/rest/services/MaximoProd/MXprod/FeatureServer/9/query?where=FID='2'&outFields=*&f=pjson

    I'm sorry for preview, because they are on my native language, if You did not understand something, I'm here to translate.
    Once again, thank You for Your time.


    ------------------------------
    Dario Stjepanović
    ------------------------------



  • 4.  RE: Integration ArcGIs and Maximo Spatial

    Posted Fri February 23, 2024 10:02 AM
    Edited by Lacey Lurges Fri February 23, 2024 10:06 AM

    Hi,
    I have a few more troubleshooting questions.
    1) In Map Manager, if you set your Initial and Full Extent for your site, does the map load with the layers properly?  Note: make sure you have the Service Address Options for Coordinates set to X,Y in the Organizations application before setting your Initial and Full Extent in Map Manager.

    2) Do you have your External System enabled and queues defined on it?

    3) Are the Enterprise Services enabled and Message Tracking enabled

    4) If you past your query in a web browser, are GIS records returned?
    5) Are there any messages for the ARCGISASSET Enterprise Service in Message Tracking? 

    6) Is your Record Identifer for your Feature Class ObjectID and not something like FID? 



  • 5.  RE: Integration ArcGIs and Maximo Spatial

    Posted Mon February 26, 2024 06:22 AM

    Hi,

    1) In Map Manager, if you set your Initial and Full Extent for your site, does the map load with the layers properly?

    Yes, everything is working properly, and everything is set up in Organization.

    2) Do you have your External System enabled and queues defined on it?

    Yes, I think that everything is set up:

    3) Are the Enterprise Services enabled and Message Tracking enabled
    This option was't enabled, so I enabled it now.
    But, nothing happend.
    4) If you past your query in a web browser, are GIS records returned?
    I copeid my link
    https://??????????/arcgis/rest/services/MaximoProd/MXprod/FeatureServer/9/query?where=FID='2'&outFields=*&f=pjson 
    from Cron Task, and I get this:
    {
     "error": {
      "code": 499,
      "message": "Token Required",
      "details": []
     }
    }
    This is the same error that i get in JsonMapping. Can this be problem? Maybe we have problem on ArcGis side, not on Maximo side?
    5) Are there any messages for the ARCGISASSET Enterprise Service in Message Tracking? 
    No, I do not have any message:

    6) Is your Record Identifer for your Feature Class ObjectID and not something like FID? 

    Please can You explain what did you mean with this, what FID means. I'm using IDGIS ( type: esriFieldTypeString, alias: IDGIS, length: 30 )  from ArcGIs to have relationship with Maximo:

    If you need anything else from my system, any information or any screen, please just ask.

    And, thank you very much for everything.



    ------------------------------
    Dario Stjepanović
    ------------------------------



  • 6.  RE: Integration ArcGIs and Maximo Spatial

    Posted Mon February 26, 2024 09:18 AM

    3) Now that you have enabled Message Tracking, can you run your cron task instance again and see what message comes into Message Tracking?  There should be a status of Received, Error or Processed.  Perhaps your message is sitting in Received or Error status and that is why no records are being created.

    4) As long as you have token security enabled and the correct user name and password in Map Manager, then you should be fine. 



    ------------------------------
    Lacey Lurges
    ------------------------------



  • 7.  RE: Integration ArcGIs and Maximo Spatial

    Posted Tue February 27, 2024 05:21 AM

    Hi,

    3)Yea, now I have some message in Message Tracking. Because my cron task is set on 5 minute, I have a lot of message. This is preview:

    Still my field is not populated from ArcGis.


    ------------------------------
    Dario Stjepanović
    ------------------------------



  • 8.  RE: Integration ArcGIs and Maximo Spatial

    Posted Tue February 27, 2024 09:34 AM

    The status of the message is Processed meaning an asset was successfully created. What do you mean that your field isn't populated?  If you perform a search in the Assets application where plussisgis = 1 you should find asset records that were created. You can also see the content of the Message in Message Tracking by clicking the pencil icon to the far right on the list view.  Then you can see what records specifically have been created and search that way as well. 



    ------------------------------
    Lacey Lurges
    ------------------------------



  • 9.  RE: Integration ArcGIs and Maximo Spatial

    Posted Wed February 28, 2024 04:29 AM

    Hi,

    Sorry for late answer.

    Now I have content in my Message in Message tracking:


    {
       "JSONMAPIN": "STUPOVIFEATURE",
       "features": [
          {
             "attributes": {
                "BrojOdcjepa": null,
                "DionicaID": null,
                "DionicaIDMX": null,
                "DocUpdate": 1671112662000,
                "Elevation": 0.0,
                "GlobalID": "{1E4B5AA1-CA57-41E4-BF15-D1393AE5E926}",
                "IDGIS": "2",
                "IDMX": null,
                "Izvor": "0",
                "Lat": "N44\u00b0 20' 37.67745223\"",
                "Layer": "situacija",
                "Lon": "E017\u00b0 21' 33.04413130\"",
                "NaponskiNivo": "SN",
                "Naziv": null,
                "OBJECTID": 2,
                "Opis": null,
                "Podbroj": null,
                "Poslovnica": "41",
                "Rbroj": null,
                "RefName": "sit1",
                "Status": 1,
                "TS_SCADA_IME": null,
                "Tip": null,
                "V_BROJ_DT": "1",
                "V_BROJ_VODA": null,
                "V_KOTA": "508.79",
                "V_RED_BR_STUPA": null,
                "V_TIP_STUPA": null,
                "X": 6449308.84,
                "Y": 4911235.18,
                "created_date": null,
                "created_user": null,
                "last_edited_date": null,
                "last_edited_user": null
             },
             "geometry": {
                "x": 6449308.844,
                "y": 4911235.177999999
             }
          }
       ],
       "jsonFeatureId": {
          "objectIdFieldName": "OBJECTID"
       }
    }

    Also,  asset have started to be created in the Asset application, but alway same asset. Is this problem with my link in JSON Mapping? Maybe my link only see one asset to create every time when cron task start.

    I mean this is great, asset start to create. I have progress.



    ------------------------------
    Dario Stjepanović
    ------------------------------



  • 10.  RE: Integration ArcGIs and Maximo Spatial
    Best Answer

    Posted Wed February 28, 2024 10:14 AM

    Yes, you need to write the query in your Cron Task Instance parameter (URL) to find the assets that you want to create or update.

    There are several ways to write this query.  You can write it to find all records for initial data loading.  Although it may be more efficient to just do a traditional data conversion / data loading exercise if you have hundreds of thousands or millions of records you are trying to create.  As long as you populate the fields that define the relationship and PLUSSISGIS and PLUSSFEATURECLASS then the records will be linked.

    For a production ready URL, you can write it in two ways. 

    1) you can use an edited attribute such as MXCREATIONSTATE. The GIS editor or a trigger could set this field to a value such as 1 on a feature when it's ready for Maximo to process.  You write the query on the Cron Task Instance parameter to find all records where MXCREATIONSTATE=1.   You use either the parameter on the cron task instance (PROCESSEDFLAG) or a Response JSON Mapping to immediately send a value like 2 back to the MXCREATIONSTATE attribute on the GIS Feature so that it no longer matches the query and won't be processed again until the GIS editor makes a change on it.  Note: MXCREATIONSTATE is an example, you could use any attribute you define on the feature class for this purpose.  The intent is to find records that match the query to process and then immediately update the record after its processed so it no longer matches the query.

    2) You can write the query to compare an edited date/time stamp on the GIS Feature to the last successful run time of the Cron Task Instance in Maximo.  We find last successful run time by find the Start Time with an Action on the cron task history.   This approach doesn't require a special attribute like MXCREATIONSTATE on the GIS Feature.

    Here is an example of a query that compares dates

    https://services1.arcgis.com/xyzI/ArcGIS/rest/services/xyz/FeatureServer/0/query?where=lastupdate>=:LASTSUCCESSFULSTARTTIME&outFields=*&f=pjson



    ------------------------------
    Lacey Lurges
    ------------------------------



  • 11.  RE: Integration ArcGIs and Maximo Spatial

    Posted Wed February 28, 2024 06:14 AM

    Hi,

    I made it, everything is working. Thank you very much for all, for your time, your advice and patience.

    Best regards



    ------------------------------
    Dario Stjepanović
    ------------------------------



  • 12.  RE: Integration ArcGIs and Maximo Spatial

    Posted Wed February 28, 2024 08:31 AM

    Great work!  Let me know if you have any questions.



    ------------------------------
    Lacey Lurges
    ------------------------------



  • 13.  RE: Integration ArcGIs and Maximo Spatial

    Posted Mon April 15, 2024 05:26 AM

    Dear Lacey,

    I want to thank you once again for everything.
    I managed to insert over 1000 assets from GIS into Maximo and set the cron task to work properly. All attributes are transferred to me properly from GIS. However, I have one question. I have a situation with a client, when the client in ArcGis changes the value of an attribute on an asset that has already been inserted into Maximo, a new asset is created for me in Maximo, instead of just updating that attribute in Maximo on an existing asset that has already been inserted by integration . And then I end up with two of the same assets, just the difference in that updated attribute, and different assetnum of course. Is there a possibility, that my asset is only updated by changing the attribute value, instead of creating a new asset?

    Best regards, Dario



    ------------------------------
    Dario Stjepanović
    ------------------------------



  • 14.  RE: Integration ArcGIs and Maximo Spatial

    Posted Thu April 18, 2024 11:06 AM

    Hi,

    Based on your screenshots, you are using a custom field called IDGIS in the relationship to link the GIS Features with Maximo Assets.  This is okay and probably preferable over using the assetnum.  If you use assetnum, then you can never unlink the Maximo asset record with the GIS feature since the assetnum is our unique database key.  If you would never need to unlink then using assetnum is okay.

    If your scenario, you need to add a new Index to the Asset object and then associate that Index as the Alternate Key on the ARCGISASSET Object Structure.  After you do this, then after the cron runs, if it finds an Asset record where the relationships is true, it will update that record.  If it does not find a record, it will create a new one.

    I set up an example where I am using EXTERNALREFID in my relationship.  I created a new Index on the Asset table. Note: you most likely cannot enforce uniqueness on this index as there will be null values for Assets that are not linked with GIS features. This is okay, you don't need to enforce uniqueness.  After you create the index, run a DB Config. Then go to the Object Structures application, find the ARCGISASSET Object Structure and associate the Alternate Key with the top level object, e.g. ASSET in this scenario.

    Note: you should be strategic about using the same field(s) from the Maximo object in every relationship between that Maximo object and any GIS feature classes.  

    Shout out to @Steven Shull for pointing me in right direction with the Alternate Key to document this. 



    ------------------------------
    Lacey Lurges
    ------------------------------



  • 15.  RE: Integration ArcGIs and Maximo Spatial

    Posted Fri April 19, 2024 04:34 AM

    Hi,

    It's working perfect. I don't know how I'd make it without you, again.

    Thank You, again.



    ------------------------------
    Dario Stjepanović
    ------------------------------



  • 16.  RE: Integration ArcGIs and Maximo Spatial

    Posted Tue February 20, 2024 10:02 AM

    Hi Dario,

    Because you are using Feature Services, you'll likely need to enable Token Security.  It's sort of hidden in the Map Manager.  If you expand the section, you'll see the token security option, as shown below.  You'll need to obtain a username and password from your ArcGIS administrator.  Try that and let's see if you get any further.



    ------------------------------
    Andy Stewart
    Director| Business Development
    activeG
    Mesa AZ
    602-814-1204
    ------------------------------



  • 17.  RE: Integration ArcGIs and Maximo Spatial

    Posted Wed February 21, 2024 06:16 AM

    Hi Andy,

    Thank You for aswering.

    Yes, this is enabled from begininng.



    ------------------------------
    Dario Stjepanović
    ------------------------------