A HTML Portlet to display the OBS Tree.
Zip includes the html page and the nsql.
I checked couple of yours html portlets and there are great. Thank you for this work.
Unfortunately, I have a problem to display them inside of Clarity (in html portlet). When I place the html file in \webroot folder it works perfect.
I am not sure if the problem is with wrapping of the html code or if wsdl connection doesn’t work (I used the same browser but a different tab so the sessionId from cookie should be ok).
Any trick how to debug this issue?
I am in the OnDemand environment so no access to the \webroot folder.
I create the portlet like this (This post outlines the method: https://communities.ca.com/thread/116836359):
In my knowledge store, I created a HtmlPortlets folder and upload the html portlet.
Right click on the uploaded file and select Copy Link Location.
Paste the copied link into an editor:
Remove the filedownload url get variable.
Create your Html Portlet with an iframe using the edited URL as the src.
<iframe height="700px" width="1400px" src="https://cppm-test.ondemand.ca.com/niku/app?action=dms.viewFile&RhXm0r7tSeUqEr=true&fileId=5272201&fileName=ObsNetworkChart.html"/>
Do you still use this approach of html files in the Knowledge Store? Have you tested after 15.1.1? I am finding now CA PPM tries to download the file instead of executing the code. Please let me know if you observe the same behavior and if you have found a solution for that.
Thank you very much -- it works!!!
Have you tried to read the Clarity objects by your script (not by query)? I had a problem to get correct xml response in "xmlstr".
I used the input xml below (it worked with soapUI):
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:obj="http://www.niku.com/xog/Object">' +
'<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd">' +
'<Header version="6.0.11" action="read" objectType="project" externalSource="NIKU">' +
'<Filter name="projectID" criteria="EQUALS">project1</Filter>' +
I used your files, specified ID of the query in the html file, but nothing is generated in the portlet, but we have got several OBS structures, do I have to specify ID of the OBS somewhere?
The first thing I would suggest is to attach the ObsNetworkChart.nsql to a grid portlet to make sure it is returning a result set.'
The next this I would do is test the html portlet as a standalone page. To do this: just make the following edits:
Hard code the endpoint to your server.
queryCode = "Debug_Obs";
currentUrl = window.location.toString();
clarityUrl = currentUrl.substr(0, currentUrl.indexOf("/niku") + 5);
endpoint = clarityUrl + "/xog";
// Debug in Stand-alone using your server
endpoint = "https://cppm-test.ondemand.ca.com/niku/xog";
Update the soap Header to use name and password.
// Use login vs sessionCookie
//'<quer:SessionID>' + sessionCookie + '</quer:SessionID>' +
Open the edited obs html page in a browser.
I made a little modification and it's working now, I limited the query for one obs structure, see below:
WITH OBSQRY (
,obu.PARENT_ID ,'/' || obu.NAME AS FULL_NAME
FROM PRJ_OBS_UNITS obu
INNER JOIN PRJ_OBS_TYPES obt ON obt.ID = obu.TYPE_ID
WHERE PARENT_ID IS NULL and obt.unique_name='obs_struktura'
,obsqry.FULL_NAME || '/' || obu.NAME AS FULL_NAME
FROM prj_obs_units obu
INNER JOIN obsqry ON obu.PARENT_ID = obsqry.ID
rownum as UNIQUE_ID
FROM OBSQRY obs
INNER JOIN PRJ_OBS_TYPES obt ON obt.ID = obs.TYPE_ID
order by obs.DEPTH, obs.FULL_NAME
) X WHERE @FILTER@
It works great now, thank you for sharing this.
Is there a for Dummies or for Complete Idiots version available?
I tried to get that on r8.1 using MS SQL .
Modified the query so that it displays OK in a grid portlet and followed the instructions.
Does no display anything, not even the top node.
The stand alone does not display anything either.
At some point managed to get the top node.
Then tried to do that on v13.3 using Oracle.
Nothing to it displays OK after the first attempt.
Has the html coding or environment changed from r8.1 to v13 so that the script does not work in r8.1?
Is there more to the query than to get it display OK in a grid portlet?
That graphic were so nice, I am so tired trying to located random units whose level nor parents I do not know.
this is great. thank you for posting it.
One thing that might catch people out is that they need to name the query "Debug_Obs" or they will need to update the html so that the querycode has the ID of their query!
Although I've figured out how to make the this horizontal (change to Layout:"Horiziontal"). Do you know how we could make the lower levels vertical?
Retrieving data ...