The Mobilengine mobile app is the primary user interface of the workflow solutions that you build. Installing it for yourself is the easiest way to test the functionality of your mobile forms.
The Mobilengine Build Tool (mebt
) is the single most important part of the
Mobilengine SDK: without it, your solution artifacts you create would never add up to an
actual workflow solution that runs on mobile devices. The mebt
is a command
line tool that you use to compile your solution artifacts, package reference data to them,
and publish them to the Mobilengine Cloud as complete workflow solutions. Through the
Mobilengine Cloud, your users' Mobilengine mobile apps can access the workflow solutions
that you assign to them.
Install the mobile app
After you sign up for a Mobilengine developer account, your Developer Dashboard will list links to install the Mobilengine workflow app on both Android and iOS mobile devices.
If you're using an iPhone or iPad, all you need to do is go to the App Store link provided, and follow the instructions there.
If installing on an Android device, there are two options to
choose from: you either can download the .apk
-extension Android application
package directly, or, if the device you're installing on is able to receive text messages,
you can send yourself a text with a link to the same .apk
file. If you
don't have an Android device, you'll need to use an Android smartphone emulator - there's a
larger installation overhead, but you won't have a problem trying out workflow solutions for
yourself.
Installing on iOS
-
Use your device's browser to log in to your Developer Dashboard, and tap the App Store link in the app section.
Alternatively, you can open the App Store app on your iOS device and search for the Mobilengine app to navigate to the app download site.
-
When the download is finished, tap the
icon to install the Mobilengine workflow app on your device.
-
When you open the app for the first time, you'll be prompted to prompted to log in with the email address and password that you provided. Next, enter the URL from the service URL section of your Developer Dashboard on the login screen. This is the address of the server instance generated for you, that your app will be syncing solution artifacts and form submissions with.
-
After all this hard work, the app greets you with a very anti-climactic blank screen. Time to change that by installing the Mobilengine Build Tool (
mebt
), and populate your mobile app with some sweet forms of your own.
Installing on Android
-
If you don't have an Android device, download and install the Android SDK, which includes a mobile device emulator. Read the guide and set up a virtual device.
-
Log in to your Developer Dashboard. If you'd like to download the application package directly, to a tablet without a SIM, or your emulator, use the device's browser to access the webpage.
-
If you're downloading the application package directly, tap or click the Apk link to start the download. When the download is finished, run the installer.
-
If you'd like to access the application package through a text message, click the Send install SMS link to send yourself a text message with a download link.Tap the link in the text message that you receive, and download the application package.
Figure 23. The text message that newly signed-up developers get. Take note of the username: the tutorials assume that this is the username that you'll be using throughout.
-
-
At the end of the app installation, review the app permissions, open the app, tap or click the Login button, and enter your authentication details to log in.
-
Success. It's a bit lonely, though, with the No forms message and the empty dashboard, wouldn't you say?
Go on and install the Mobilengine Build Tool (mebt
) to start populating your mobile workflow app with mobile forms.
-
Log in to your Developer Dashboard, and click on the SDK deployment package link to download and run the installer file. The installer wizard will take care of everything for you.
-
For ease of use, it is recommended to set up your
mebt
publishing options as environment variables on your machine:To add new environment variables in Windows 7, enter the Start menu, right-click Computer, and click through to Properties → Advanced System Settings → Environment Variables...
When you've got the dialog, click New under the User variable for... panel, and enter the following variable names with their appropriate values:
-
MEBT_USER: [the email address line of your Mobilengine Developer account]
-
MEBT_PASSWORD: [the password of your Mobilengine Developer account]
-
MEBT_SERVICEURL: [The https-protocol URL of the Backoffice site]
For the URL, use the web address listed as Service URL on your Developer Dashboard. The URL in the screenshots below is an illustration and will not work for your specific instance.
When you've done all that, click OK to save your changes.
This might have seemed quite a lot of fuss, but you have in fact saved yourself tons of time: From now on, all you need to enter when you run the
mebt
tool is the command and the folder that you want to access.You can try it out for yourself with this very simple mobile form - the very first one you'll be writing in the next tutorial. Save the file in its own folder, navigate to it in the command line, and enter the
mebt run .
command:c:\RockyJupiter>
mebt run .
mobilengine srv 28.0 (Release) v28.0.38.19272 Executing run (compile and deploy to server): Service url: https://tutorial.outdoor.mobilengine.com/comex/v1/ User: petar.hoyt@gmail.com adding 'vehicleInspection.form.xml' Reset integration settings No changes for form 'vehicleInspection' Done.You might be wondering what on earth
c:\RockyJupiter>
is meant to be at the top of the screenshot: it's the name of the fictional transport company this series of tutorials uses as an example.Petar Hoyt
, the user named in the screenshot is also just a placeholder name, and not a real person at all. -
Integrate solution artifact creation and publication
If you are using Notepad++ to code your mobile forms, you can use a plugin called NppExec
to run pre-written batch files from inside the editor. You can exploit the plugin's
functionality to make Notepad++ run the mebt
tool on the folder of the
solution artifact file that is currently open, with a single keyboard shortcut of your
choosing. How awesome is that?
-
Save the following batch file as
mebtRun.bat
in themebt
folder (most probablyC:\Program Files(x86)\Mobilengine SDK
, but do double-check):The batch file as it is written above requires a
reftab.xlsx
file to be present inside the folder that you are compiling and publishing. In order for this little piece of magic to work, you will always need to make sure that there is a reference table inside your solution artifacts folder, and that it's namedreftab.xlsx
. -
Download and install the NppExec plugin, and then set it up to run
mebtRun.bat
with a keyboard shortcut:In Notepad++, select the Plugins → NppExec → Follow $(CURRENT_DIRECTORY) option.
Select Plugins → NppExec → Execute..., type
C:\Program Files\mebt
\mebtRun.bat $(CURRENT_DIRECTORY) into the Command text box, entermebtRun
as the script name, and click Save.Figure 28. Notepad++'s Plugins → NppExec → Execute.. dialog with the Command(s): text box and the Script name: drop-down showing your input
-
Select Plugins → NppExec → Advanced Options: type
mebtRun
into the Item name text box, choose mebtRun in the Associated script drop-down, and click Add, then OK.
-
Select Settings → Shortcut Mapper.. → Plugin commands, find mebtRun in the list, click the Modify button at the bottom of the dialog, set the shortcut for the script, and click OK.
Figure 30. Notepad++'s Settings → Shortcut Mapper.. → Plugin commands dialog, with the mebtRun script highlighted
-
Select Plugins → NppExec → Console Output Filters → HighLight, enable two lines, and set up highlight masks to match
%FILE%(%LINE%,%CHAR%):*
and%FILE%:*
(see screenshot below).Figure 31. Notepad++'s Plugins → NppExec → Console Output Filters → HighLight dialog, showing your input
These settings make sure that the console that Notepad++ opens to run
mebt
will indicate any errors thatmebt
encounters in unmistakable red. What's more, if you double-click on a red bit, the file will open and the cursor will blink at the exact spot with the error. You are free to change any of these settings to your own preferences, of course. -
You're all set: from now on, whenever you press
Ctrl+F5
in Notepad++, a console window withmebt.exe
running inside it will appear at the bottom of your screen, and the folder that your current file is in will be compiled and published to the cloud.Figure 32. This is what you'll see when you press
Ctrl+F5
(or your custom associated keyboard shortcut) while an artifact solution file is open in Notepad++