The Execute On action (see screenshot below) explicitly specifies where the action's sub-actions must be executed: on the server or the client.
The screenshot above displays how the Execute On action is typically used:
1.A Let User Choose Image action prompts the user to select an image from a gallery and save the image as Base64 to the current node (which is located, say, with //image/base64).
2.If the image is successfully transferred to the current node, the On OK condition uses the Execute On action to transform the user-selected image on the server (with the Altova XPath extension function mt-transform-image) and then update the sibling jpg node. The node is updated on the server, and, when the processing of actions is completed, is transferred to the client.
Transformation on client or server
The function mt-transform-image will be executed on the client if not explicitly specified otherwise. This could create memory problems on some clients. When the transformation is started, the image is unpacked from the format of its Base64 encoding to a BMP format, which could be very large. After the transformation is completed, the transformed file is stored back to the original format. The large BMP format could create memory problems on some clients, and you should be aware of this.
To avoid the possibility of memory problems on the client, explicitly specify that the transformation must be carried out on the server. Do this with the Execute On action, specifying that the child actions be performed on the server. All the child actions of this Execute On action will then be carried out on the server. You can use an action such as Update Node to update a node with the result of a transformation. The target node will be updated with the transformed image. MobileTogether automatically transfers the results to the client when action handling is complete or when the workflow switches back to the client.
MobileTogether extension functions
MobileTogether provides a range of XPath extension functions that have been specifically created for use in MobileTogether designs. Some functions can be particularly useful with specific actions. For example, mt-available-languages() returns the languages in which the solution is available and could, for example, be used with the Message Box action. If a function is especially relevant to this action, it is listed below. For a full list of extension functions and their descriptions, see the topic MobileTogether Extension Functions.