app.xml lives. The shortest way through it is to look at what the shipped apps actually do.MAS 9.2 series framework 3.2.8xx the app.xml root
Two posts on this site already touch app.xml. Understanding Your First Maximo Mobile App is the map: it shows the forty-line manifest and where the rest of the application went. Anatomy of a Maximo Mobile App is the cross-section, and it names the manifest as one of seven parts. This post opens the file itself and walks it from the top. It covers the root element, the attributes on it, the sections under it, and the references that reach out to other files.
The patterns come from the src/app.xml of the apps that IBM ships with a 9.2-series install. Some of them are built for the phone and the others run in the browser. The split matters, because the root of a mobile app looks different from the root of a web app. Where a command can show you the fact, it is printed beside it, so you can rerun it over the apps of your own system and disagree with us. Details move with each release, and the shape holds.
The root element#
There are two root elements to choose from, and the choice is simpler than the reference makes it look. <maximo-application> is the one for an app that talks to Maximo. It provides the header and the side navigation, and it reads what it needs from MAS to render them. <application> is the plain entry point, and IBM’s own guide for a new app says to change it to <maximo-application> as soon as the app needs Maximo data.
The shipped apps follow that advice almost without exception, and nearly all of them use <maximo-application>. The few on <application> are easy to explain. NAVIGATOR is the mobile shell and has no Maximo data of its own. COMMONLIB and MAFOFFLINECACHE are library apps with a single placeholder page each. VISUALINSPECTIONMOBILE is a mobile app that carries type="mobile" on a plain root, and it is the only app in the set that does.
cd IBM-MAF-Apps
rg -l -N '^<application' */src/app.xmlTwo attributes are required on the root, and both are easy to get wrong. id names the app, and the reference says it must match the application id in the MAXAPPS and MAFAPPDATA tables. Most shipped apps write it in lower case and a handful write it in upper case, so both spellings ship. The <pages> element needs an id as well. The reference is explicit that ids must be unique across every XML file in the project, which becomes important once pages live in their own files.
The attributes IBM actually sets#
The reference documents a long list of attributes on <maximo-application>. Only a fraction of them are in use in the shipped apps, and only a few appear on nearly every app. The rest are set by very few apps each, and a large group is set by none.
Across the app.xml of the apps of the 9.2 series, mobile and web. The table shows where each attribute turns up. The detail moves with each release; the shape of the table is what lasts.
| Attribute | Seen on | What it does |
|---|---|---|
id | every app | the app id, matching the registration on the server |
version | every app | the released version of the app, usually written as four numbers |
title | nearly every app | the name shown in the header after the product name |
product-name | nearly every app | the product the app belongs to, localizable |
controller | every mobile app, most web apps | the application controller class |
default-log-level | every mobile app, about half of the web apps | the log level the app starts with |
mas-id | most mobile apps, some web apps | the MAS application the app belongs to, usually manage |
theme | nearly every mobile app, hardly any web app | touch on every mobile app that sets it, default on the one web app that sets it |
product-name-adaptive | most mobile apps, hardly any web app | the product name shown by the touch theme |
nav-initial-open-state | most mobile apps, no web app | whether the navigator opens at start |
user-menu-enabled | most mobile apps, hardly any web app | whether the default user menu appears |
navigator-tile-order | most mobile apps, hardly any web app | the position of the tile on the NAVIGATOR home screen |
mas-enabled | about half of the mobile apps, few web apps | whether the MAS menu is enabled, false on every mobile app that sets it |
type | a few apps of each kind | a label for the kind of app, read by the framework for two values |
Read the mobile and web entries against each other and the mobile signature falls out. theme="touch" is on all but one of the mobile apps and on none of the web apps. The one mobile app without it is the smallest in the set. nav-initial-open-state is on most mobile apps and on no web app at all. navigator-tile-order sets where the app’s tile sits on the NAVIGATOR home screen, and it has meaning only there. So most mobile apps carry it and hardly any web app does. When a root you are reading carries theme="touch" and a tile order, you are reading a mobile app.
Our own Components Explorer is built twice, once for the phone and once for the browser, from the same pages. Here are its two roots as the properties panel of our MAF editor lists them, with only the attributes that are set. The mobile root on the left carries the signature: theme="touch", navigator-tile-order, product-name-adaptive, user-menu-enabled and nav-initial-open-state. The web root on the right carries none of them. The editor also marks two of the mobile ones as “set, same as default”, so they could be left out with no change in behaviour.

The build target itself is set somewhere else: the graphite.platform key in package.json decides whether an app is built for the phone, and the anatomy post covers that fork. The root attributes are the tell you can see from inside the file, and theme="touch" is the reliable one.
The lower half of the reference is quiet in practice, because the remaining attributes are set by a handful of apps at most. Most of those are links into MAS pages, header configuration and side-navigation switches. Nearly every app that sets one is a web app, and NAVIGATOR is the main exception because it is the shell. mobile-online-only is documented and no shipped app sets it. is-connected is almost unused, and one of those uses is NAVIGATOR binding it to its own state. Learn the rows above and you can read any shipped root.
What type means#
A handful of apps set type, with five different values between them: shell, embedded, login, simple and mobile. The framework acts on two of them. The application object in maximo-js-api offers isShell() and isEmbedded(), and they answer true for shell and embedded. The mobile platform sets embedded on every app it hosts before the app’s own options are read. That is how an app running inside NAVIGATOR knows it has a shell around it.
The other three values are labels: login is on the login apps, simple on the library apps, and mobile on VISUALINSPECTIONMOBILE alone. They tell a reader what the app is and, as far as we can see, tell the framework nothing.
The sections under the root#
Every attribute above sits on one line. The rest of app.xml is a list of sections, and the shipped apps show which ones a real app has. Many different elements appear as direct children of the root across the corpus. One of them is in every app, a handful are common, and the rest are rare.
As direct children of the root, over the same apps.
| Section | Seen on | What it holds |
|---|---|---|
<pages> | every app | the pages, inline or as references to files |
<messages> | most apps | custom strings to localize, for use from JavaScript |
<states> | nearly every mobile app, about half of the web apps | application-level state, readable from every page |
<maximo-datasource> | most mobile apps, about half of the web apps | datasources shared across pages, mostly lookups |
<json-datasource> | most mobile apps, about half of the web apps | static or computed lists, the same scope |
<dialogs> | most mobile apps, some web apps | dialogs that any page may open |
<menu> | nearly every mobile app, a few web apps | the navigation menu, in the navigation-items slot |
<launch-contexts> | many mobile apps, hardly any web app | the ways another app may launch into this one at a record |
<templates> | about half of the mobile apps, one web app | reusable markup fragments, pulled in from a file |
<properties> | some mobile apps, a few web apps | Maximo system properties the app reads by name |
<custom-datasource> | a few apps | a datasource with its own data adapter |
<user-profile> | a few apps | the user profile panel, in its own slot |
<datasources> | a few mobile apps, no web app | a group of datasources pulled in from a shared file |
<custom-icons> | a few web apps, no mobile app | icons outside the known set |
rg -o -N '^ <[a-z-]+' */src/app.xml | sed 's/.*<//' | sort -uThat command lists the distinct names. It relies on IBM’s two-space indent for the root’s children, which every shipped file follows. A few more elements appear in only one app each: <css-override>, <nps>, <json-object> and <mobile-local-data>. The last one stops every datasource from downloading and turns DASHBOARDMOBILE into a local-only app.
Three of those rows carry the same mobile signature as the attributes. <menu> is in nearly every mobile app and in only a few web apps. In the browser the MAS side navigation does that job, so the app has nothing to declare. <launch-contexts> is in many of the mobile apps and in hardly any web app, and it is the section behind the chevron links the anatomy post traces. Each <launch-context> names a context of detail, list or custom, the pageid to open, and the datasource that loads the record. A verify flag says whether to check that the record exists first. <templates> follows the same pattern.
The two datasource sections are where the size of an app shows. TIMESHEET keeps a couple of lookups at the root, both of them filters for its list page. TECHMOBILE keeps many more, because a lookup declared at the root loads once and is shared by every page that uses it. In IBM’s apps, a lookup goes to the root when more than one page needs it and stays in the page file otherwise.
<states> scales the same way, and TIMESHEET declares one state object at the root, the names of the three apps it links into. TECHMOBILE and SRMOBILE each declare many. Application state has its own post, Understanding State Management. Here it is enough to know that the root is where a value lives when every page must see it.
The order of the sections varies from app to app. IBM’s mobile apps mostly run properties, states, templates, menu, the datasources, dialogs, pages, messages and launch-contexts, in that order. The web apps disagree with each other, and OPDASHBOARD opens with messages. Treat the order as a convention for readers and nothing more.
The root, the sections that sit under it, and the two places a file= attribute can point.
Three ways content comes in from other files#
The first post in the beginner series says that composition rides on the file attribute of <page>, and for TIMESHEET that is the whole story. Over the full set of shipped apps there are three shapes, and a reader of TECHMOBILE meets all of them early in the file.
A file attribute on a container, pointing into the app. The reference types this attribute as include and puts it on a number of elements. Among them are <page>, <dialog>, <dialogs>, <templates>, <datasources>, <panel> and its group, and <lookup>. The description on <page> says what all of them do: the attribute keeps the content in another file for cleaner code and does not change how the application behaves. A minority of the shipped apps use it on pages. TECHMOBILE uses it on many pages, on a handful of dialog groups and on its template files. It also keeps many pages inline in the same app.xml, so a modular app and a monolithic app can be the same file.
rg -o -N '<[a-z-]+[^>]*\bfile="\./[^"]*"' */src/app.xml | rg -o '<[a-z-]+' | sort -uA file attribute with a maximo: prefix, pointing into IBM’s shared library. IBM keeps common lookups, dialogs, datasources and templates in a package called @maximo/maximo-library. An app pulls one in with the same attribute and a two-part path. The prefix names the library and the rest is the path inside its src folder. The prefix is declared in package.json under graphite.sharedResources, and the element’s id has to match the id in the library file. Many of the shipped apps declare the library, and a smaller group reference it from app.xml. TECHMOBILE has references across datasources, overrides, hierarchical lookups, dialogs and templates.
<!-- authored to show the shape; the ids are IBM's own, from the library -->
<maximo-datasource id="maxlib_personGroupDS" file="maximo:common/datasources/person-group-datasource.xml"/>
<dialogs id="maxlib_meterReading" file="maximo:common/dialogs/meter-reading-dialogs.xml"/>
<templates id="lookup_adaptive_row_layouts" file="maximo:common/templates/lookup-adaptive-row-layouts.xml"/>The build resolves it. It finds the library through the package.json declaration, copies the referenced file into src/sharedResources/maximo/, and then processes it like any other include. When the declaration is missing it logs a warning that shared resource elements were not processed, asks you to check package.json, and skips them. That warning is one to grep for after any build of an inherited app. The copied files land in src/, which is why a downloaded TECHMOBILE carries a sharedResources folder it never authored.
rg -o -N 'file="maximo:[^"]*"' */src/app.xml | sort -uAn <include> element with a src. The third shape is an element in its own right. <include src="./…"/> drops the contents of another MAML file at that point in the tree, and it may pass a datasource and an item into the fragment. It is used inside pages for shared card layouts, and NAVIGATOR uses it often for its settings screens. A minority of the shipped apps use it, and it never appears as a direct child of the root.
All three are resolved when the app is built. The first post in the series explains the flattening, and the point to carry from it is unchanged. At runtime there is one bundle, and an id must be unique across every file that went into it.
An authored root, section by section#
The fragment below is ours, written to show the sections in the order IBM’s mobile apps use, with ids that appear in none of the shipped apps.
<maximo-application id="fitools"
version="1.0.0.0"
title="Field Tools"
product-name="Maximo"
product-name-adaptive="Maximo"
controller="./AppController"
default-log-level="error"
mas-id="manage"
theme="touch"
navigator-tile-order="800"
nav-initial-open-state="false"
user-menu-enabled="true">
<states id="fit_states">
<state name="selectedSite" value="" type="string" id="fit_site"/>
</states>
<maximo-datasource id="siteFilterDS"
object-structure="mxapisite"
lookup-data="true"
selection-mode="single">
<schema id="fit_site_schema">
<attribute name="siteid" unique-id="true" searchable="true" id="fit_siteid"/>
<attribute name="description" searchable="true" id="fit_sitedesc"/>
</schema>
</maximo-datasource>
<menu slot="navigation-items" id="fit_menu">
<menu-item id="mi_assets" page="fitAssetList" label="Assets" icon="carbon:asset"/>
</menu>
<dialogs id="fit_dialogs" file="./maml/dialogs/assetDialogs.xml"/>
<pages id="fit_pages">
<page id="fitAssetList" path="/assetList" file="./maml/pages/assetListPage.xml"/>
<page id="fitAssetDetails" path="/assetDetails" file="./maml/pages/assetDetailsPage.xml"/>
</pages>
<messages id="fit_messages">
<message id="msg_saved" text="Changes saved"/>
</messages>
<launch-contexts id="fit_launch">
<launch-context id="lc_asset" context="detail" pageid="fitAssetDetails" datasource="assetDetailDS" verify="true">
<launch-context-param id="lcp_assetnum" system="where:assetnum" param="assetnum"/>
<launch-context-param id="lcp_siteid" system="where:siteid" param="siteid"/>
</launch-context>
</launch-contexts>
</maximo-application>Read it top to bottom and every row of the two tables above is there. The first six attributes are the ones every app sets, and the next four are the mobile signature. <states> and the lookup datasource are the shared scope. <menu> and <launch-contexts> are the sections a web app would usually leave out. <dialogs> and <pages> reach into other files with the same attribute, and <messages> holds the one string a controller will want to show.
What to read next#
The root and its sections are the skeleton, and Pages and Navigation opens the <pages> section and follows navigation between pages. For the file layout and the ibm-config trap, read Understanding Your First Maximo Mobile App. For what the whole app is made of, from the Android package down to the object structure, read Anatomy of a Maximo Mobile App.
IBM’s own reference for every element and attribute named here ships with each MAS install. In the Application Configuration application, open the ? menu and choose Component Documentation. The same menu holds the Developer Documentation, whose shared-resources page describes the maximo: mechanism from IBM’s side.
