You need to develop your prototype in a method in Java, not Python, then port the Java method into a script in Maximo. In Maximo, you have all of the Java libraries that Maximo does to do all of its wonderful stuff, but you don't have the Python ones. Rather than fight to get all of Python into Maximo, you should grab a coffee and go with Java libraries accessed from the sleek syntax of Python.
------------------------------
Jason Uppenborn
Cohesive
------------------------------
Original Message:
Sent: 07-13-2023 13:28
From: Rick Viera
Subject: Automation script to retrieve WorkItem data from RTC using OSLC REST from Python
I'm attempting to retrieve WortkItem data from RTC making calls my REST calls from Python in an automation script. Knowing nothing about RTC or REST I've managed to get a working prototype working in Visual Studio Code using Jupyter to test my code as I go along. I've gotten the roughed in fundamentals and I'm getting back the workitem JSON object. Before I moved on to making the code presentable I decided to place the code into an automation script and have it launched from an action for ease of testing. Unfortunately I'm getting errors on both of the import statements:
import requests
import json
ImportError: cannot import name requests in <script> at line number 1
ImportError: No module named requests in <script> at line number 1
I'm thinking that there may be a jar file that I need to add to "C:\IBM\WebSphere\AppServer\lib\ext" but I don't know what that would be or where I would get it.
Any help/guidance would be so gratefully appreciated.
#Customizations
#Integrations
#MaximoApplicationSuite
------------------------------
Rick Viera
General Dynamics Mission Systems
------------------------------