-
Motivation
Since you are going through this training, you would also know what a Workflow is. It is a flow diagram that describes what happens on the wearable device. It also defines what is shown to the user, which actions they can take, and what happens based on those actions. In the previous training, you learned how to create a…
-
Component Structure
In the following lessons, we will discuss the different elements of a component. Here you will find a short introduction to the general structure of a workflow. A component is a kind of workflow that can consist of multiple screens/steps. Any workflow that can be modeled using various components and UI steps, can also be…
-
Scopes and Referencing
In this lesson, we will talk about scopes and references. Knowledge of these will help you make rules and actions reusable also to access and manage data throughout your component. There are two scopes in which you can declare rules, actions, and data: step: Each step of a component has its own scope. Rules, actions, and…
-
Context Variables
Any data in a component is saved as a <context> variable. Variables can be declared and initialized in the workflow or step scope of the component, depending on where you need them: <context> <param name="Title" type="string">Please choose one</param> </context> Available data…
-
Rules and Expressions
In this lesson, we will concentrate on how to implement a component's behavior with rules and actions. We have already learned that when creating your own components, you will write rules consisting of an expression and one or more actions. The action(s) will be executed if the expression is true. Rule A rule consists of…
-
JavaScript & Functions
Sometimes during workflow development, the tools we have discussed up to this point will not be enough to implement the required logic. Typically, this occurs whenever you need to manipulate the raw input data, e.g. before comparing it in an expression or before saving it in a context variable. In these cases, the option…
-
Layouts and Mapping
So far we have only discussed how to implement the behavior of the application, but not how it looks. In this chapter, we will focus on this topic. Layout structure and basics Similar to the workflow, the layout of your application is also defined in XML. Layouts consist of a LayoutPage which defines a reusable frame for…
-
Component Configuration
At this point, we have a pretty neat component. However, if we want to pass it on to others (especially non-developers), its utility is very limited. It will only offer a choice between Apples and Pears. While this was perfect for our first customer (probably a fruit cake factory), the automotive company we are working on…
-
Handlers
After all the previous lessons, you should now be able to implement most components. However, there is still a workflow element we haven't covered: Handlers. Handlers encapsulate more complex logical modules (compared to actions). They run in the background while the workflow is executed and listen for certain events which…
-
Translations
One final thing: It is possible to add multi-language support to components using translation files. Create a new translation file for each language you want to support under the resources tab of the advanced editor. Note that these files (like media files) are saved in the workflow, not the component. This means that all…