Configuring IBM MobileFirst Studio for Maximo Anywhere 7.6.1
Shane Howard 270000C70V Visits (16544)
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.
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.
3. Once your work space is opened you will see a blank project, select 'Help' and then click on 'Install New Software'.
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.
5. Click on the 'Archive' button.
6. This will open a File Explorer window, you will browse to the Mobi
7. Give the repository a name, this can be anything and click ok.
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.
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'
10. Click on the 'Ant' icon and click OK.
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'.
12. Select 'Existing Projects into Workspace'.
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.
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.
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.
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 'OSL
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
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.
19. To log in to the console, you can access via the hostname externally or localhost on the server with the following addr
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.
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.
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.
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
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.
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 Anyw
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.