Friday 19 June 2020

Using Navigation Option for OUAF Integration (Screen Pop)

This blog is to demonstrate screen population integration using navigation option in OUAF products. This is used when you need to pop up an OUAF product screen from some third party application screen.

The URL used is in the below format

https://<host>:<port>/<context>/cis.jsp?location=<navoption>&<key>=<val> 

  • host – hostname where OUAF product is deployed
  • port – port on which OUAF product is active
  • context – OUAF web context
  • navoption – Navigation option of the screen you want to open
  • key – name of the context key to be used in case any parameter is to be passed to Navigation option
  • val – Value of the key


For demo purposes, I am using the Premise screen of CCB/C2M application. 
The url for the same is

https://localhost:6501/ouaf/cis.jsp?location=premiseMaint&PREM_ID=6148457052

  • Update the URL as per your host:port and use a premise id that is present on the system
  • Navigation option: premiseMaint
  • Key: PREM_ID
  • Value: Premise Id

Below the the premise screen navigation option for reference.


Have used a python application integrated with Microsoft IIS server (CGI) for demonstrating a third party application trying to access OUAF screen.

In case you need more details on how to link a python script for IIS CGI, refer this link.

https://support.sisense.com/hc/en-us/community/posts/115007362727-Installing-Python-on-IIS

The python script queries the C2M database and gets first 10 premise records and displays it. (This is only for demo, an actual third party application would not have direct access to C2M database and will have a reference of premise id in its own application database). Have configured the python script to dynamically create the ‘CCB link’ column with the following value.

<a href="https://localhost:6501/ouaf/cis.jsp?location=premiseMaint&PREM_ID=8555465030">8555465030</a>


Accessing the python CGI application from browser. As seen below the screen displaying premise details is displayed. The last column is a clickable link that has the href link value configured to CCB premise url mentioned above.



Right clicking on the link and opening link in new window. As seen C2M screen opens up. Enter the username and password. There is no direct option to pass the username password information in URL in browser. If SSO integration is present on your application, then login screen won’t come up and you will be redirected directly to the premise screen. Also the login screen will come only once till the browser is closed so it is not much of a nuisance.

As seen below the premise screen opens up with the premise id value populated


Opening multiple links in multiple tabs

As seen have opened two tabs for different premise id links

As seen below each tab is opened with the CCB premise screen with different premise ids





Thus we have successfully integrated an OUAF product screen into a third party application.

The critical part of this integration on the OUAF product side is the navigation option. If an out of box navigation option is not present for a screen, you can create a custom one and point it to a BPA script that opens an UI map to your desired screen.

Configure your third party application in such a way that the main CCB url excluding the navigation option, is configured at one place (similar to feature configuration in OUAF products). This will reduce maintenance when new environments are created.

The main objective of this kind of integration is to reduce the navigation time taken to reach an OUAF product screen from an external application.

You can also use this to bookmark any frequently used OUAF product screen on your browser for immediate access.
As an example, I have used Service Order Operational Dashboard screen in C2M product for bookmarking.

Below is the navigation option of the same


In this case the URL will be 

https://localhost:6501/ouaf/cis.jsp?location=d1somopTabMenu

Creating a bookmark on browser with this value



Clicking on the bookmark. As seen below, the service order operational dashboard screen opens up.


Attaching the python script used above for reference.

import cx_Oracle


def query_mysql(query):

dsn_tns = cx_Oracle.makedsn('localhost', 'port', 'sid')

cnx = cx_Oracle.connect(user='username', password='password', dsn=dsn_tns)

cursor = cnx.cursor()

cursor.execute(query)

#get header and rows

header = [i[0] for i in cursor.description]

rows = [list(i) for i in cursor.fetchall()]

#append header to rows

rows.insert(0,header)

cursor.close()

cnx.close()

return rows


#take list of lists as argument

def nlist_to_html(list2d):

print("<html>")

print("<body>")

print("<table border=2>")

for i in list2d[0]:

print("<th>" + i + "</th>")

print("<th>" + "CCB Link" + "</th>")

list2d.remove(list2d[0])


for row in list2d:

print("<tr>")

a = row[0]

for x in row:

print("<td>" + x + "</td>")

print("<td><a href=\"https://localhost:6501/ouaf/cis.jsp?location=premiseMaint&PREM_ID=" + a + "\">" + a + "</a></td>")

print("</tr>")


print("</table>")

print("</body>")

print("</html>")

return ""


def sql_html(query):

return nlist_to_html(query_mysql(query))

query = "select prem_id, address1, city from ci_prem where rownum < 10"

print('Content-Type: text/html')

print('')

print(sql_html(query))


No comments:

Post a Comment

OUAF Oracle Utilities WAM / ODM 2.4.0.0 installation on Windows

  This blog is for anyone looking to install Oracle Utilities WAM or ODM 2.4.0.0 (Oracle Utilities Workflow and Asset Management) or (Orac...