IBM Support

Cloning a Maximo Anywhere 7.6.1 application.

Technical Blog Post


Abstract

Cloning a Maximo Anywhere 7.6.1 application.

Body

 I've recently been asked by multiple clients if we can provide some documentation on cloning a Maximo Anywhere application with step by step instructions going through the process.  If you have MobileFirst Studio setup the process is fairly simple as we do provide Ant scripts to complete this task.   If you haven't set up MobileFirst studio you can head on over to my blog  Configuring IBM MobileFirst Studio for Maximo Anywhere 7.6.1 for the walk through.  This will need to be completed before you can start the cloning process. 

 

So lets launch eclipse and get started. 

 

1.   The first thing you need to do is create your new Mobile application,  you can do this by right clicking on the Maximo Anywhere project,  select 'New' and then choose 'MobileFirst Hybrid Application'

 

image

 

2.  Once selected you will be prompted with a pop up showing the project name and asking you to enter your Application name.  You can call your application whatever you want,  I've just called ours WorkExecutionClone to keep it simple

 

image

 

You will now see your WorkExecutionClone application showing under 'apps' in your Maximo Anywhere project tree with an index.html showing Hello MobileFirst as you see below. 

 

image

 

3.  Our next step will be to add your device platforms and JSON store for your data, you do this by expanding your cloned application and clicking on the application-descriptor.xml. The file should open on the right hand side and show your cloned application with no features.  Ensure Application "WorkExecutionClone" is selected and then click on 'Add'

 

image

 

4.  You will now see a list of device platforms you can add,  I will add the follow three.  
 

  • Android phones and tablets
  • iPhone
  • Windows8 - Universal

     Select each one and click on as seen below. 

 

image

 

5. Now back on the application-descriptor.xml design screen click on 'Optional Features'  then in the pop up we want to add the 'JSONStore', once done click 'OK'

 

image

 

In the end your descriptor should look similar to what you see below. 

 

image

 

 

6.   Now that we have our descriptor set up, we want to run the Anywhere App Clone ant script. From the root of the Maximo Anywhere project drag the anywhere-app-clone.xml over to the ant view then run the clone-app[default] script as seen below.

 

image

 

7.  You will now be prompted to enter the name of the application you want to clone and where you are cloning to. 

 

For the source application I am using Work Execution,  you can clone any of the out of the box applications if you do not want Work Execution. 

 

image

 

Then for the target application I've entered my WorkExecutionClone application.

 

image

 

8.  Removed step regarding platform update, does not appear to be required.

 

9.  Once the platform update completes, you will need to refresh the Maximo Anywhere project, right click on Maximo Anywhere and choose 'Refresh'

 

image

 

10.  The next step is to update the Maximo Anywhere build artifacts and trigger, again right click on the Maximo Anywhere project and choose 'Properties' at the bottom of the list. 

 

image

 

11.   In the properties menu select 'Builders then choose 'Anywhere Build (Artifacts, Build Configuration) and click on 'Edit'

image

 

12.  At the end of the edit screen you will see a menu item of 'Build Options',  click on it. 

 

image

 

13.   Now click on 'Specify Resources'

 

image

 

14.  Select the artifacts folder and app-feature.properties as you see in the screen shot below and click on finish.

 

image

 

15.  The next step is optional, but I'm adding this to the document so we can see this is our cloned application.  From the Maximo Anywhere project expand your WorkExecutionClone application - > artifacts and open up the app.xml.

 

Search for the following line. 

 

<message defaultMessage="Maximo Anywhere Work Execution" id="applicationName"/>

 

Replace with the following

 

<message defaultMessage="Maximo Anywhere Work Execution Clone" id="applicationName"/>

 

This will change the name on the log in screen of the application,  save and close the file. 

 

16.  The next step is Android specific and for barcode scanning,  open the AndroidManifest.xml from WorkExecutionClone - > native folder and update the application name from WorkExecution to WorkExecutionClone in the barcode activities as seen below. 

 

image

 

 

17.  We can now save our file and test out the application. 

 

From the Maximo Anywhere project right click on the 'WorkExecutionClone' application and choose preview. 

 

 

image

 

 

Launch the preview in chrome and your application should display as you see below. 

 

image

 

Another thing to note, if you are building for Windows using the ant scripts from eclipse after cloning your application, ensure you have updated the certificate used to sign the application to one that is valid. 

 

I hope this helps with your Maximo Anywhere development and deployment tasks,  as always any questions or concerns please comment below. 

 

 

 

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

UID

ibm11129671