/ Development  

Unlock hidden "admin" power; Instantly add a homepage featuring PIM, CIM, and config layout

Hi there AppWorks fans,

Welcome to a new installment of AppWorks tips.

A colleague showed an interesting feature/trick in runtime which we can extend with an extra tab showing even more configuration parts of a solution. This way of implementation exposes administrative tasks into runtime which the administrator normally accesses via the design time artifacts or the /app/admin path of our beloved AppWorks platform. Time to turn tides and explore the way of doing things differently…


Let get right into it…

Boot up the VM you’re working on and dive into your favorite URL. The designer should open a workspace with a basic project structure like below. When you’re new to the party squat, read this old post to boost your basic knowledge first.

This post will not create any “regular” entities, but we start with a simple homepage first (nicely saved in the homepages folder of the project):

admimhp_001

Give it the name hp_administration with a proper label and dive into the first configuration parts:

admimhp_002

Notes on this homepage document:

  1. You see a URL which you can use in ‘Web Content’ panels of a layout, or forward dynamically from an action type of ‘Rule’ BB.
  2. A homepage normally requires a ‘Runtime security’ from the context menu of the document in your project; Like we also do for BPMs. We use a developer account for now with sufficient privileges by default!

Stack three panels of type ‘Web Content’ on each other to introduce a “Tabbing” structure and provide a label for each tab. This is the first result which we can publish into runtime:

admimhp_003

The panels in runtime are empty now (see the URL field in the previous screenshot). Go into design time again, show all the artifacts and make a copy of the URL behind the PIM:

admimhp_004

It points to something like this (where I removed all the URL parameters at the end): http://192.168.56.107:8080/home/appworks_tips/com/cordys/bpmengine/monitoring/choosedefaultview.caf

We can now reuse this URL in the ‘Web Content’ panel of the PIM-tab, but as we don’t want to depend on a “hard coded” server name, it’s better to do it like this:

../../../com/cordys/bpmengine/monitoring/choosedefaultview.caf

Or like this:

./../../../com/cordys/bpmengine/monitoring/choosedefaultview.caf

Orrrrr…even like this:

{system.baseURL}com/cordys/bpmengine/monitoring/choosedefaultview.caf

And yes, there is no extra / behind that variable {system.baseURL}!

This is a quick list of links for the most used artifacts available:

Artifact URL
Process Instance Manager ./com/cordys/bpmengine/monitoring/choosedefaultview.caf
Case Instance Manager ./com/cordys/bpm/casemanagement/cim/cim.caf
Application Deployer ./com/cordys/deploy/runtime/PackageDeployer.caf
Audit Viewer ./com/cordys/audit/auditView.caf
Deployed Process Models ./com/cordys/bpmengine/deployedprocesses/deployedprocesses.caf
LDAP Explorer (CARS) ./com/cordys/ldap/explorer.caf
License Viewer ./licensemanager/spslicensemgmt.caf
Log Viewer ./logviewer/CALViewer.caf
System Resource Manager ./sysresourcemgr/sysresourcemgr.caf
Web Service Interface Explorer ./methodsetsmanager/methodsetexplorer.caf

You can also open these CAF file URLs directly in a browser, but some don’t work standalone; I guess it depends a bit on the context where they load. Interesting also is the URL behind the ‘Workspace Documents’ which end with ./home/appworks_tips/cws/framework/applications/environment.htm, but a closer look with <F12> tells me it loads ./home/appworks_tips/com/cordys/cws/runtime/types/workspace/views/workspacedocuments/workspacedocuments.caf, but that’s not loading standalone in a separate tab…It would be tooooo good to be true! 🥳

I assume you figured out the CIM-tab yourself with URL {system.baseURL}com/cordys/bpm/casemanagement/cim/cim.caf.
Next step is the solution configuration…


Solution Config

“Solution configuration”? Yes, I mean the ‘Application configuration’ entity creation from the context menu of a project:

admimhp_005

It looks like the creation of the entity, but this one pops up in the /app/admin layer of the solution after creation. I add one property cfg_key and generate all the rest; I use the property later! 🤪

Now you have something like this where you need to take notion of the URL:

admimhp_006

You might have noticed the saving of this entity happens in the root of the project with a not so friendly name. To change this, get the properties of the document and update these values (nicely in the configs folder of our project!):

admimhp_007

I know!?…Don’t shoot the messenger here!

Publish it all into runtime and move to /app/admin:

admimhp_008

Open the link and take note of the last part of the URL: ./home/appworks_tips/app/start/web/item/080027f2140da1ef9690e33ef075be6e.2/080027f2140da1ef9690f5ab0e15b826/334bc67252da3db2b2b6ce2490f8cbe2

Looks familiar…correct?

Convert it to {system.baseURL}app/start/web/item/080027f2140da1ef9690e33ef075be6e.2/080027f2140da1ef9690f5ab0e15b826 and guess where we can use it!? Indeed, the final ‘Web Content’ panel with name Solution config!

BUT…There is one thing we need to adjust here! And that’s the .2 “KEY”…Ahaaaa…NOOO…Would it?

Yes, my friend…Update the key value of property cfg_key of solution config to value 2 in /app/admin. With this change we can now make our ‘Web Content’ URL smarter like this: {system.baseURL}app/start/web/item/080027f2140da1ef9690e33ef075be6e.{config.prj_generic.Properties.cfg_key}/080027f2140da1ef9690f5ab0e15b826

It’s a party (where you can extend it with other interesting solution settings)! 🎉 ✨ 🎊 🎈

admimhp_009

How about the flexibility of the layout IDs across environments? Great question! Who raised their hands? We should have a chat; Have a comment!
The answer is simple; The IDs are fixed in the CAP files and will not change after deployment to a next environment. The “KEY” might, but we can update it via the administration people of the solution in app/admin.


A genuinely nice “DONE” where we exposed the PIM, CIM, and even the solution configuration parts into runtime for your administrators. Sometimes you craft things simply be reusing the components of the platform. Collaborating about it extends it to new levels and sharing it all via this channel to you, brings joy to the world of OpenText AppWorks. Have a great weekend and I CU next week; Greetz!

Don’t forget to subscribe to get updates on the activities happening on this site. Have you noticed the quiz where you find out if you are also “The AppWorks guy”?