IBM Support

Configuring IBM MobileFirst Studio for Maximo Anywhere 7.6.1

Technical Blog Post


Abstract

Configuring IBM MobileFirst Studio for Maximo Anywhere 7.6.1

Body

I was recently asked for some detailed documentation regarding setting up and using the MobileFirst studio to preview\demo Maximo Anywhere 7.6.1 applications.  Other then the Knowledge Center which gives a basic guideline, there isn't much out there that goes over the process in detail. So in this blog I'm going to go through the configuration of MobileFirst Studio in eclipse, importing the Maximo Anywhere application in to the eclipse workspace, building the applications as well as some of the configuration tasks required.  This is a step by step, so please read the entire blog,  as it is quite long. 

 

Before we start this document assumes you have the following downloaded and installed. 

 

1.  Eclipse Kepler SR2

2 . Maximo Anywhere 7.6.1 is installed and the MobileFirst install components still extracted in the Anywhere install folder.

3.  Java 1.7 or 1.8 is installed and the JAVA_HOME environment variable is set.

 

So lets get started !

 

1. Before we start up eclipse,  one issue you may run in to when using Studio is java heap errors,  the reason for this is the OOB maximum heap is 256 MB and needs to be increased.  From the root of the eclipse folder open the eclipse.ini and change the -Xmx256m to -Xmx1024m as you see in the screenshot below. 

 

image

 

Once the file is updated and saved, run the eclipse.exe that is the same directory.

 

2. You will first be prompted to create a workspace, the default folder name is workspace and goes to your user folder, as I have multiple instances on this machine, I've created and named my workspace 'MaximoAnywhere761' as seen below, you can also change the root path of the workspace if required.

 

image

 

 

3.  Once your work space is opened you will see a blank project,  select 'Help' and then click on 'Install New Software'.

 

image

 

4. You will now be brought to the install prompt, you will see no current packages.  Click on the 'Add'  button to point to the MobileFirst Studio package repository. 

 

image

 

5.  Click on the 'Archive' button.

 

image

 

6.  This will open a File Explorer window,  you will browse to the MobileFirstStudio.zip.  This zip should be in your Maximo Anywhere install folder, it is copied over with the MobileFirst component.  Use the path below as a guide. 

 

image

 

7.  Give the repository a name, this can be anything and click ok.

 

image

 

8.  The MobileFirst Platform Studio Development tools should now show, ensure all options are selected and click next and finish.  The tools will install and you will be prompted to restart the Eclipse application.

 

image

 

9. Once eclipse is re-opened, you will see the MobileFirst Development server in your project.  You now want to bring your ant view to the main screen.  You can do this by clicking on 'Window' then select 'Show View' and then click on 'Other'

image

 

10. Click on the 'Ant' icon and click OK.

 

image

 

 

11.  Now that we have set up the Ant view we want to import the Maximo Anywhere project in to the workspace.  From the 'File' menu select 'Import'.

 

image

 

12. Select 'Existing Projects into Workspace'.

image

 

13.  On the import screen, click on 'Browse' and point to the root Anywhere folder, this will then display the projects underneath. Select the MaximoAnywhere checkbox which is your Maximo Anywhere build folder.  You will also want to check the 'Copy projects into workspace' box.  The reason to do this, is to keep this folder separate from your live build folder and prevent development changes from being pushed directly to a running application.  The files will copy to the workspace folder we created when opening eclipse. Click Finish.

 

image

 

14. Once complete you will now see the Maximo Anywhere project above the MobileFirst Development Server,  expanding this will show the Maximo Anywhere build structure.

 

image

15.  To be able to access the build scripts from eclipse and run them, we can copy the build.xml over to the Ant view as seen below.

 

image

 

16. After this we will want to deploy the OSLCGenericAdapter to the MobileFirst Development Server.  The OLSC Adapter contains your Maximo connection and adapter time out values.  Expand 'adapters' then right click on the 'OSLCGenericAdapter' folder,  move to 'Run As' in the menu and select 'Deploy MobileFirst Adapter'.

 

image

 

17.  Once the deploy is finished you will see the following message, this will deploy to the development MobileFirst server which runs on port 10080.   The address would be http://localhost:10080/worklightconsole .  To log in to the admin console that deploys with MobileFirst studio the password is admin\admin.

 

image

 

18.  We can now build one of the Anywhere applications in a similar way, lets do Work Execution on Android for this example.   Expand the 'apps' folder, then 'WorkExecution' and right click on the 'Android' folder. Once it completes successfully, you will now see the Work Execution application deployed to the MobileFirst Development console. 

 

image

 

 

19.   To log in to the console, you can access via the hostname externally or localhost on the server with the following address; http://localhost:10080/worklightconsole .  The log in will be admin\admin.  You will see your application deployed as shown below, as well as the adapter previously deployed. It is recommended you access the application via a Chrome incognito window, click on the folder icon to bring up the preview menu.

 

image

 

20.  Click on 'Preview Version' and your application will launch,  assuming your security groups are setup correctly you can log in to the application with a user added to the ANYWHERE_TECHNICIAN group.

 

image

 

You will see the log in screen in the browser as shown  below.  Remember the preview mode limits the amount of data downloaded as the chrome browser can only store so much data.

 

image

 

Now for some other information. 

 

1. As this is a copied folder from the original Maximo build, you will want to ensure your your applications do not build to the worklight server you are using for your live development or production applications.  Changes should be pushed and built from the original folder after development and testing to ensure changes are working correctly before introduction to users. Open the build.properties from the eclipse tree and modify the port to 10080,  you can update he user and password as well to admin\admin and running the ant scripts will then build and deploy to the development server. 

 

image

 

2.  Application screens can be modified and tested via eclipse, to modify resources and fields you can open the app.xml for the associated application from the Maximo Anywhere project tree under apps/WorkExecution/artifacts, replace WorkExecution with the application you are modifying.  You can find more information on basic modifications in our Knowledge Center.

 

image

 

3. From the output window you can stop and server the MobileFirst Development sever, click on the 'Servers' tab then right click on 'MobileFirst Development Server' for available stop, start and restart options.

 

image

 

4. If using Java 1.8,  you will need to update the ant home to point to the ant directory in the Anywhere folder which supports this version of Java.  Click on 'Windows' -> 'Preferences' and expand 'Ant' and click on 'Runtime'.  Select the 'Ant Home' button and point to the Maximo Anywhere ant folder.  e.g Anywhere\MaximoAnywhere\build\tools\ant\bin.

 

image

 

 

I know this was a long read, but this should help users get eclipse and MobileFirst Studio running for Maximo Anywhere 7.6.1, the steps are also very similar for previous versions.  For Maximo Anywhere 7.6.1 it is required to use the MobileFirst Studio if you wish to preview and demo applications outside of the device.  As always please advise if there are any questions, comments or concerns.

 

 

 

[{"Business Unit":{"code":"BU005","label":"IoT"}, "Product":{"code":"SSLKT6","label":"Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]

UID

ibm11130415