How to replicate the default UX Demo app

What is the best way to replicate the default UX demo model with a different name?

Option 1

  1. Manually copy UX_Dev, ContentStore instances and UX_Demo webapp folder
  2. Change all the necessary parameters
  3. Start the app

Option 2

  1. Create a blank app via the installer
  2. Export and import all the apps from the default demo to the target app

In both options, I do have to change instance selection manually in every view/dashboard/wizard.
In some cases changing the instance is not enough I have to reconfigure the cube view.

Is there a parameter I can change so app redirects to the new instance? Or a better/faster way to replicate the demo app?

Cheers
Ulas

Included in the content store there is a utility TI called }APQ.UX.Dim.App.ReplaceInstanceReference
You can use this to do a find/replace from one instance name to another either globally or within the scope of a specific app or view.

1 Like

In my case the instance was blank in the attribute of APQ UX app dimension so I had to comment out the parameter validation of pInstanceFrom parameter.

After running this successfully, TI replaced all the blank instances with the correct instance name. However, all the cube selections are now changed to first cube in the model.

All the view definitions are now corrupted. I can copy them from the old model but is there a better way?

Instance name can’t be blank. This means something was done already that corrupted the content store!

There’s nothing in the find/replace code which changes cube name. It only replaces instance name. But if the cube doesn’t exist in the new instance then the view won’t load. If you are ending up with first cube in DB stored as cube name I guess this is because the front end is looking for the specified cube and when it ca’t find it this is what it defaults to.

It might be helpful if you tried to describe more what you are trying to do. Why not start with WHY do you want to duplicate the demo model? (but then point it somewhere else?)

We have tried to make it as easy as possible to duplicate objects and find/replace references but the cubes, dimensions, subsets, elements, etc have to exist in the instance the page is referencing. Otherwise it’s just not going to work.

I need a) Demo app which is the UX_Dev from the installer b) Demo Dev: where I can mess around with the defaults so it has to have the same data but different instance/app name c) I may need more of b

Essentially I am not pointing to somewhere else, I am still pointing to the same database but with a different name.

I followed the steps in option 1 and once logged into the app, the instance selection was blank in every lowest level app. What did I do wrong?

Option 1

  1. Manually copy UX_Dev, ContentStore instances and UX_Demo webapp folder
  2. Change all the necessary parameters
  3. Start the app

Well I think your “option 1” is wrong. Why do you need to change anything in the content store? The only thing you need to edit is the instances.json of the new webapp instance (ports only, not names).

The only real fixed requirement is 1 content store instance per 1 webapp instance
All I think you need to do is:

  1. copy webapp folder and give it whatever name e.g. UBDemo
  2. copy content store TM1 instance and give it a new name, port and http port. Start it up.
  3. make sure in instances.json in UBDemo that the rest port for content store is what you sent in 2. then restart Tomcat

Then under the UBDemo URL you will have an exact replica of UX_Demo. In this case both UX_Demo and UBDemo will be pointing at the same TM1 sample database. But I think this is fine right? You said you wanted the data to be identical. Here you could diverge the UX_Demo and UBDemo front end applications but they would always be looking at the same model data.

Say you wanted the sample data to also be a copy and not the same, well you still don’t have to make any changes in the content store to do this! If this is what you want just also take a copy of the UX_Dev instance and also fire the copy up with a new name and ports. All you need to do is update the rest port in the instances.json for UBDemo. That’s all! No need to do any renaming of any instances.

Ping me on Teams if you’re not sure.

1 Like

Ok got it. I was reflecting the name of the app as in creating a new app.
Yeah this works, thanks!

I used Option 2 to create a blank app (new URL) using the installer to be able to do the handson exercise, however the installer forced me to re-install UX.
It would be nice to have a utility available, similar to the cognos config, to manage the webapps. Or does something like this already exist?