1 - Process Overview

What are processes?

Process

A Process is an interactive dialogue which allows you to compute things and guide the dialogue with the user by defining conditions which control the flow.. Finally, it also lets you update the database.

Using an expression to calculate Body Mass Index (bmi)

Five tabs

So you can see from the example that a Process is defined using five tabs!

It sounds like a lot, but it is precisely the clear separation of things, most importantly the clear separation of Declarative Logic and Procedural Logic, which makes it possible to achieve complex results from seemingly simple steps.

The central Tab, labelled “Process” is where you land by default, and this is where the main Procedural logic is defined - the Steps of the Process.

Process Steps

Processes are step-by-step interactive dialogues with users, and at any time, you can test out the interactive dialogue you are creating, using the Debug Tab

Many steps define interactions such as yes/no questions, but it is also possible to have other steps which execute background actions such as updating a variable.

Steps can be grouped in sections.

So, there are three kinds of Process elements which you can add to the sequence.

Difference between Process tab and Updates tab

Process steps can be added in the Process tab. There is also an Updates tab where you can also add actions.

The reason for the separation between Process and Updates between the two: within the interactive dialogue, it is important that the user can go backwards instead of forwards,

We also want to have the ability for a Process to do things like make database updates and send mail notifications.

It would be unfortunate to have the user go forwards and backwards over a send mail action - the mail action would be executed more than once.

The same is true of database changes : it would be very difficult to handle the user going forwards, executing a database update action, only to want to go back (and have the database change undone).

So, the action steps in the Update tab are all executed once the User has completed the steps under Process.

The Update tab contains no interactions, so from the User’s point of view, the Process has completed once the steps in the Process tab have completed.

Once the steps in the Process tab have completed, the User cannot go backwards. After Process, the Update actions, if there are any, are executed.

Updates tab Summary

  • contains no Interactions, only actions and groups
  • are executed once User has completed Process steps
  • Once User has completed Process steps, the Process is over as far as the User is concerned
  • User cannot go back

Logic tab: steps can be protected by preconditions

It is possible to define conditions in the Logic tab, and in the Process and Update tabs, to set these conditions as pre-conditions for an interaction, an action, or a group of them, to be executed.

Values tab

Some conditions can be defined on values.

The Values tab provides an overview of all values available in the Process.

There are four sources of values, but they can all be used in defining conditions.

Debug tab

At any point, you can test out the steps and the logic you’ve defined by using the step-by-step debugger.

The debugger has sub-tabs which show the current values at each step, and also the evaluation status of all conditions.

2 - Logic

Logic

2.1 - Declarative Logic

Declarative Logic

What is declarative logic?

Declarative logic is the kind of logic we are most familiar with as human beings - it is reasoning about states of affairs.

Jim is 17 years old
Driving is permitted from 18 years of age
Jim cannot drive yet

These are three declarative statements.

Statements are things which can be evaluated to be true or false.

If the first two statements are true, we can conclude the third statement is true.

Declarative Logic in Logiak

If the above is easy to understand (which of course it is), that is good because, as you will see, Logiak lets you do a huge amount of computation simply by creating declarative statements like this.

The separation between declarative and procedural thinking is one of the core selling points of Logiak

We call these statements: conditions

We refer to these statements are Conditions, because of one primary role they play in Logiak Processes, and that is as pre-conditions for Process steps.

But definitions would also have been a good name for them, as would statements.

There are three kinds of Conditions you can define

2.2 - Value Condition

Condition dependent on a Value

Value Conditions

A Value Condition is a statement which can be true or false.

Suppose we have a value called age-in-years.

A Value Condition is something like this:

This is true if the value of age-in-years is less than 5, false otherwise.

Condition names

Conditions in Logiak have names.

It is good practice, because these conditions are statements which can evaluate to true or false, to give them statement-like names.

That is, sentences or sentence-like texts which make clear what state of affairs the condition describes.

So, for example, you might use the name “Child is an infant” could be an appropriate name for the condition :

define a condition Child is an infant

2.3 - Select condition

Condition dependent on user selections

Select Conditions

A Select Condition is a statement which can be true or false.

Its truth depends on how the user has responded to a question which required a selection: either a Yes/No question, or a Select question. .

Example yes/no

Here we create a yes/no question for the user

Does the child have any known allergies?

Then we define a condition Child has no allergies by simulating a possible user response (in this case user selects “no”) and giving a name to the state of affairs described by that response.

define a condition Child has no allergies

2.4 - Meta condition

A condition defined from other conditions

Meta Conditions

A Meta Condition is a statement which can be true or false.

Its truth depends on the truth of the sub-conditions it contains.

Example: Defining child is an infant with fever

Suppose we have a value condition “Child is an infant”;

And suppose we had a second value condition “Child has fever”;

We could define a meta-condition with both of these conditions as sub-conditions, and choosing to require ALL sub-conditions to be true.

We might name this meta-condition: “Child is an infant AND child has fever” or “Child is an infant with fever”

define a condition Child is an infant with fever

Note that named condition which are defined but nowhere used are in a light font.

When conditions are in use (e.g. as subconditions of a meta condition), their names are presented with a regular font weight.

Meta Conditions can be sub-conditions

Meta conditions are conditions like any other, so they can be used as sub-conditions in defining other meta-conditions.

Once you have defined “Child is an infant with fever”, you can simply select that as a sub-condition in defining a further meta-condition

2.5 - Preconditions

Using the logic defined

How to use the logic defined

When we have defined conditions, we can use them to affect the execution of the Process.

We can set any condition to be a precondition for a step.

If a step has a precondition, it is only executed if the precondition evaluates to true.

Example: “prescribe paracetamol”

  1. create prescribe message - 2. set precondition on message - 3. debug to show message appearing - 4. debug to show message not appearing

3 - Interactions

User interactions

You can choose to make an interactive dialogue with any number of these interactions

3.1 - Process Interactions Overview

What are process Interactions?

Interactions

Interactions are Process Steps which, if executed, engage the user.

By default, each Interaction appears on its own screen, but it is possible to display multiple interactions together by defining screens

Interaction Types

3.2 - Question Texts

Applies to all interactions: how to construct texts

Plain Text

The message can be plain text.

Welcome to the BMI calculator..

Include values

The message can incorporate the presentation of some Process values to the user, by using braces

You have chosen to review case {case_id}

Include HTML Markup

You can include HTML tags.


<h1>Attention</h1>
This is a <b>severe</b> situation

Include Markdown

Or you can switch to use Markdown within the text instead of HTML

## Attention 
This is a **severe** situation

Include Media

You can include images, audio, video..

3.3 - Text/Markup Display Only

Display text etc

Display Only

This is an interaction which does not request an input from the user.

Therefore, the documentation on Question text explains most of what you need to know.

Value is true/false

You could think that because this interaction yields no response, it cannot have an associated value.

However, this interaction does generate a value of type true/false.

(The user might not see the message because conditional logic can be deployed to make hundreds of thousands of paths through a Process possible)

3.4 - Yes/No Question

Asking the user to make a binary decision

Yes/No

A yes/no question is the simplest of interactions: you pose a question and the user can give two possible responses : yes or no.

ADDING a YES/NO Question

Altering project words for yes and no

The words “Yes” and “no” are not completely hardcoded - they are System Symbols.

This means you can alter the text associated with them at the Project level:

  • go to the Project Level
  • Select to edit Symbols
  • Find yes and no under System symbols and amend their display names.

Please note: this will alter the presentation of ALL yes/no questions in the Project

Can I completely customize the yes/no options?

Alternative yes/no controls

If you don’t want the vertically arranged radio buttons, you can select a different kind of interaction.

The Value of a yes/no question is true/false

The user’s response to a yes/no question yields a value with DataType true/false.

If the user selects “yes”, the value is true, otherwise false.

3.5 - Select Question

User chooses one or more options

Select question

A select question is where you ask the user a question, and a set of **options++.

The question could be a single select, where you are asking the user a question such that only one option could count as a valid response.

OR it could be a multi-select in which the question you have posed admits of more than one possible option selection in response.

How to ADD a select question

  • Enter question text
  • Decide: do you want the user to be able to choose a Single option, or Multiple?
  • Enter the initial text of options, one per line (can be modified later)

How to RE-ORDER options

  • Edit the question by clicking on the edit icon
  • Click on the Options tab
  • Click on the two-bars icon against an option and drag vertically to re-order.

How to DELETE an option

  • Edit the question by clicking on the edit icon
  • Click on the Options tab
  • Expand the option you would like to delete.
  • Click on the trash icon at the bottom of the Option card (The icon might not be there: see below)

How to choose different input controls

If you don’t want to use radio buttons/checkboxes, there are other options such as toggles, switches..

  • Edit the question by clicking on the edit icon
  • Click on the Input Controls tab

select-input-controls

  • You define a select question by defining a number of options.
  • Each option is represented by a symbol
  • The user selects one or more (if the question is a multiple select) options in responding to the question.
  • The user’s selection is represented in the data by the symbols associated with the options selected. It is a set.

Using Project-level symbols

The options in a Select question might involve concepts which have relevance not only in a single Process but across the whole Project.

You can ensure that you represent such concepts consistently across Projects by defining symbols at the Project level and choosing to use them within the Process as option values.

Using project level symbols

You will need to have defined an Object type, with a symbol set field.

Under Updates, you can include an action to create an instance of that object, and in that action you can map the select question to that symbol set field.

3.6 - Barcode/QR Code reader

User reads a bar/QR code

Barcodes and QR codes reading

This is another interaction making use of the device camera (i.e. for devices only with cameras).

It makes it possible for the user to scan in Barcodes and QR codes within a Process.

The Response Values of both of these can be mapped to a Text field of an object.

Showing in Object View

Unlike Signatures, when viewed in an Object View, we don’t reproduce the codes of course, but the values which have been read from them.

These are in text form. They may or may not be URLs. If they are URLs, we endeavour to present them as active links.

With a barcode, the value is likely to be a number. It will be stored in a text field. We assume it to be an identifier rather than a number to calculate with.


User scans a QR code

User scans a barcode

3.7 - Dynamic Select Question

User selects from options which may be dynamically determined

Dynamic Select - select from a set

A Dynamic Select question is very much like a Select question, except that it has no options defined - the options come from elsewhere.

Sources of Options

There are two possible sources for options -

  • You can use any set value within the Process (e.g. the value of a preceding Select question)
  • Or you can use a Symbol Set defined at the Project level

Using a Process value as source

Options chosen by user are the choices in subsequent question

Using a Project-level Symbol Set as source

Options are symbols defined in a set at the Project level

3.8 - Text/Number/Date Input Questions

User enters some text

Input Questions

These input questions are straightforward to understand - we can request text,number or date input from the user.

Text Input question

How to ADD a Text Input question

Using an input mask with a text-input question

Build up a mask to format the value entered, and let the user just enter numbers/letters

How to define placeholders in the mask:

  • Use “#” for numbers

  • Use “A” for letters

  • Use “?” if a position can hold either number or letter

Input modes

  • email
  • credit card
  • phone

Number Input Question

Defining upper and lower bounds

Input controls


Date Input Question

Defining upper and lower bounds

Input controls

  • Calendar (default)
  • Spinners

3.9 - Object Select Question

User selects an object instance

Object select

An Object select question presents the user with a collection of instances of a particular object, and the user selects one of them. (Imagine showing the user a spreadsheet and asking the user to pick a row).

Value is an Object Instance

So the response value of this question is a whole object instance - a collection of fields with values, and you can access those individual values within the instance in other steps of the Process, by using dot notation

two presentation modes of Object select

There are two modes:

  • User selects from a table
  • User selects via successive drop-downs

1. User selects from a table

The Object selected must be a Data Object or a Table Object (Profile Objects and State Objects have only one instance each).

User selects an instance when presented as a table by selecting a row:

Configuration

  • To configure this, you must select fields of the Object. Each field becomes a column of the table displayed
  • You can add filters so that not all of the instances of the Object are displayed, rather only a selected sub-group.

2. User selects via successive drop-downs

The other mode lets you choose and order any number of fields, and then the user is presented with drop-downs which successively narrow the search, until the user ultimately identifies a single instance.

This is typically used with addresses, for example, where a large geographical region can be selected at first, followed by the selection of all sub-regions within that region…

Example

If we look at the uk-500 data (modified for illustration).

The data is a table of customers.

We select three fields and order them: county, city, company

The first drop-down presented to the user contains an alphabetical list of all unique entries in the county column

Once the user has selected county, this narrows down the search.

So the next drop-down presents an alphabetical list of all unique entries in the city column where the county column contains the user’s selection

Once the user has selected county and city, this narrows down the search further.

The final drop-down presents the user will all company which have county = and city =

3.10 - Objects Table

Display only: user is shown some data in a table

User views data in a filtered table

3.11 - Recording Photo, Video, Audio

How to take photos, record videos, record sounds

Record media and store in database

Your project might deal in regular data, but also you might have a need for your users to record photos - of building problems, of people, or whatever.

Similarly, you might need to record video, or audio.

Logiak Processes has interactions for these tasks. Of course, the device on which the App is running has to be suitably equipped with camera and microphone.

The media is recorded by the device, and then pushed by Logiak to the backend Storage, so that it can be shared by other users if required, and retrieved if the device is re-initialised.

Adding interaction

Adding the interactions is straightforward.

Like all others, you specify question/prompt text and can assign a meaningful response value name.

Sample interactions on a mobile device

Here are some videos showing what the photo/video/audio recording interactions look like for a user on a device.

Taking Photo

Recording Video

Recording Audio

3.12 - Signature Input

User signs name

Signature

This interaction allows you to ask the user to provide a signature, with the assumption of course that the user is using a touch screen device, such as Android or iPhone/iPad.

It is really simple: the user is presented with a canvas on which they can write with hand/pen.

Of course, you might make other uses beyond signature. It could be used to permit the user to describe a shape by drawing.

Storing signature

The signature has to be mapped to a Text field in an object.

The field should also be given the appropriate content tag:

Viewing in Object View

A field with the signature content tag will be displayed correctly as a signature in an Object View

Caveat

This is not what is meant by an electronic signature and certainly has no legal status.

User signs name

3.13 - Text recognition

User scans in some text

Text Recognition

There can be situations where information on cards, badges, or written on pieces of paper, is really information you need in your data processing.

For example, maybe you are in a situation where your clients each has a badge containing their ID, and you want to introduce a system of recording information about their visits, but you want also record the client ID for each visit.

If the ID is a barcode or QRCode, then you can use the code reader interaction , but if it is just printed in text form, then your users would have to enter it, which could be time-consuming, or error-prone.

OR, you could try using this Text Recognition interaction.

Text Recognition interaction

This interaction gets the user to take an photo containing the text which needs to be scanned in.

Logiak is able to make a good fist of extracting the text values from an image.

Examples

Reading text of the label of a medicine bottle

Reading the text on a fridge magnet

Edit option for corrections

The scan might not always produce the target text perfectly, which is why there is an edit option once the text is scanned in, which allows users to correct errors.

But as the videos shows, the scans can be good, and practice in getting the camera focussed on the text you want, and only that, can improve the quality a lot.

Uses

This is used typically to scan in small amounts of text, rather than long chunks.

It may be used for scanning labels, or text from information cards, ids…

4 - Values

Values can be from variables, fields of input instances, etc.

4.1 - Values

Basic building blocks of Process Logic

Values

What are values?

Values can be simple or complex

Simple values

Simple values are numbers, truth-values (true & false), bits of text. Examples:

4389
true
Billy Bunter

Complex values: Object instance

Logiak also allows values to be Object instances which is a record made up of several fields, each of which have (simple) values.

Value names

In a Logiak Process values have names.

These are usually short and “symbolic” (i.e. lowercase, no spaces or hyphens ..), but should seek to be mnemonic (remind you what value they represent).

For example, the “simple” values above might have names such as:

invoice_id
invoice_is_paid
customer_name

Referring to simple values

Names let us refer to values, even when we don’t actually know what the values are.

Everyone is likely familiar with maths at school where values get associated with names: “let x equals 5…”

For simple values, surrounding the value name with braces gets us the value

{x}

This expression might represent the value 5

{customer_name}

This expression might represent the value Fred Bloggs.

Read more about how to refer to values, including how to refer to field values within object instances´values

Four sources of values in Logiak

User Inputs

User responses to questions in the Process are named values


User Inputs

Variables

Variables are named values which may be updated within the Process


Variables

Functions

Functions have an associated calculation to yield their value


Functions

Input instances

Object instances can be inputs to a Process, and they bring a value for each field_


Input instances

4.2 - Values Convention

How to use values - braces

Simple values

Surround value names with braces (squirly brackets) to access the current value.

Example: if you have a value called age-in-years (could be a variable, or a user-input value), this expression represents the value represented by the name:

{age-in-years} 

Showing values in Process Interaction

Named values can be presented to the user in Process steps by surrounding the value name is braces.

Example: if you have defined a variable named age-in-years, you can inform the user about this value in an interaction, by including something like the following in the interaction text:

Client is {age-in-years} years old

Using values in calculations

One of the actions available is Update variable action.

To use this action you need to specify an expression to calculate a new value for the variable you are updating.

Example variable update

For example, suppose you have a value called amount and you want to update a variable tax so that its value is 16% of the invoice value, you can give the following expression to an Update Variable action to update tax

{amount} * 16/100

  1. create tax variable - 2. add amount input question - 3. add Variable Update action - 4. show user tax amount

Object instance data type

Values can be “simple” - which means a number, some text, a date, etc.

They can also be “complex” because a whole Object instance can also be a value.

An Object instance, because it has several fields, has several values.

Dot notation : instance-name.fieldname

How do you refer to a specific value within the instance?

EXAMPLE:

Suppose you have the following:

  • you have defined an object type called invoice containing three fields (invoice_date,amount, customer)
  • you have a Process which has an instance of invoice with the value name inv1

You can refer to the value of the customer field of inv1 like this:

{inv1.customer}

4.3 - Variable Values

Values which can be updated with a Process

A Process can make use of variable values (we can also just refer to them as variables).

Variables

Variables are named values which have an initial value, and can be updated at any point within a Process.

To define a variable is to :

  • choose the type (numerical, date, etc)
  • give a name (must be symbolic)
  • give an initial value
  • optionally give a description / comment to help remember the meaning of the variable

Using variable values

Presenting values to the user

The value of a variable can be presented to the user in Process steps by surrounding the variable name is braces.

Example: if you have defined a variable age-in-years, you can inform the user in some step:

Client is {age-in-years} years old

Using values in calculations

One of the actions available is Update Variable.

You can define an Update Variable action and specify an expression to calculate a new value for a given variable.

For example, suppose you have defined a variable invoice-value and you want to update another variable tax so that its value is 16% of the invoice value, you can give the following expression to an Update Variable action to update tax

{age-in-years} * 16/100

How to DELETE a variable

A Variable can be deleted only when there are no references to it.

When that is true, the variable will appear in lighter colors, and moving the mouse over it will expose a trash icon

Deleting a variable

How to view the USES of a variable

When a variable is not deletable, it is because it is in use.

You can see where it is used.

Viewing where variable is used

4.4 - Functions

Values dependent on other values

Calculated Values (functions)

Some values are input by the user.

Some values are variable values which can be updated.

One can also define functions, which are values dependent on other values

You can also think of functions as variables which are updated at every step of the Process.

Example: defining a tax function

In Convention, we show an example defining a variable called tax, and using an update variable action to give it a new value after the user enters an amount.

Here we can see a different way of achieving the same thing: defining a function called tax which is dependent on amount

  1. Assume user is asked for an amount (a number) 2. Define function called tax to calculate value based on amount 3. Present the result to the user

4.5 - User inputs

Values also come from the user

User inputs

If you have a number input question in the Process, that has an associated value name which is initially generated for you (the generated names are like v1, v2, etc), but which you can edit to be something more meaningful at any time.

4.6 - Object Instances as Inputs to a Process

Object instances as inputs to a Process

Input instances

Object instances are structures usually containing several fields with values. Think: row in a spreadsheet, or row in a database table.

In the Values tab, you can configure a Process so that it has an Object instance as input.

That is, you can say that this Process has access to an instance of a given type.

Example

Let us illustrate with a simple example.

Declare input instance in Process

Suppose you have defined a patient object with just three fields (uid,name,age):

Now let’s look at creating a Process, and the first thing we will do in the Process is go to the Values tab and say that this Process has a patient as input

Access value of instance

What can you do in the Process with the input?

You can access the values in the patient record which has been passed in in both actions and interactions of the Process by using the Logiak convention for variables:

Presenting a value from the input instance to the user

Defining condition on input field value

Defining variable with input field value

5 - Actions

Actions

Process Actions

Process actions are steps which can be included in a Process.

Like all steps, they are executed unless they are nullified by some precondition being false.

5.1 - Update Variable Action

Update variable action

Variables

Variables are values which can be updated.

They are created within the Values tab, and can be used and updated within Process steps.

1. Updating a Number Variable

To update a Number Variable, you

  • choose the Variable you want to update
  • then you provide an expression which will give the new value

Body mass index (BMI) example

  • Underweight = <18.5
  • Normal weight = 18.5–24.9
  • Overweight = 25–29.9
  • Obesity = BMI of 30 or greater

Body Mass Index formula

In the video below,

  1. we have set up two number input questions to ask the user for weight in kg and height in m.

  2. We introduce a number variable bmi.

  3. We add an Update variable action with the BMI formula. When this executes, the value of the bmi Variable is updated.

  4. We add a text display where we include the bmi variable to inform the user of the value of bmi which has been computed on the basis of the input values.

  5. Then we debug to test it out.

Using an expression to calculate Body Mass Index (bmi)

Calculating a number of periods (months, weeks, etc.) since/until …

Another way of calculating a new value for a number Variables you might want to use is by determining a number of periods- how many months/weeks since/until from one date to another date.

Imagine you are creating an App to advice pregnant women.

As an approximation to gestation date, you may take the date of last-known menstrual period (LMP).

Then, to give good advice, your App may need first to figure out how many weeks along any particular woman is.

This is how we can compute this in Logiak:

Using an expression to calculate weeks since a certain date

2. Updating a Date Variable

We can use the example of pregnancy here too to illustrate one way we might want to calculate a new date value.

If we know a woman’s LMP (Last known menstrual period), we can also know the EDD (expected delivery date) by figuring out what the date is 40 weeks after the LMP date.

Here we create a variable edd to represent Expected Delivery Date, and calculate a value for that by explicitly saying we want the date which is 40 weeks after LMP (Last known menstrual period)

Logiak builds an expression for us.

Using an expression to calculate EDD

3. Updating a Symbol Set Variable

The following video shows creating and updating of a set Variable.

Please checkout Reasoning with Sets for explanation

Calculating a new set and updating set variable

5.2 - Fetch Object Instance

Fetch Instance from the database

Fetch Instance

This action fetches an object instance from the database which becomes the value of this action.

The fetch instance action needs to know which instance you want.

We describe this by

  • thinking of which instances we might want to consider (= defining filter conditions)
  • then thinking how we might sort that collection of instances so that the one we want is first.

In fact, there are three steps to configuring the fetch, and they appear in this order:

  1. You specify how to sort the objects 2.Then you say which you want to pick from the sorted list (normally the first, but you might want second, third etc)
  2. You can also add field conditions to narrow down the selection to a specific collection

Example

Suppose we needed to

Fetch the invoice with the largest amount from the past 12 months

you would configure it like this:

  1. sort by the amount field
  2. pick the first instance from the sorted list
  3. and add a field condition on invoice date so that list you are picking the instance from contains only invoices from past 12 months

Fetch Specific Instance

If you know the primary key of the instance you want to fetch from the database, you configure like this:

  1. choose to sort by any field
  2. pick the first instance from the sorted list
  3. set a field condition on the unique field, specifying that the value of that field must include

5.3 - Fetch Aggregate Number

Calculating an aggregate number from the database

Fetch aggregate number

This action allows you to query the database to find out things like:

  • What’s the largest invoice amount we've had so far?
  • What’s the average score students have gained on this test?

You can also add conditions and narrow the query

  • What’s the average score female students have gained on this test?

The numerical result will be stored as the value of this action

5.4 - Stop

Stop

Stop Action

This is a simple action which, when executed, stops the execution of the Process.

No subsequent Steps are executed.

5.5 - Jump

Dreaded goto

This is the dreaded GoTo

5.6 - Expressions and the Expression Wizard

Expressions

Expressions

To update a number variable with a new value, you can provide a new value directly, or you can define an expression from which the new value can be calculated.

The expressions you can define are the normal arithmetic expressions such as

(3 * 4)

Simple expressions, but no operations, blocks of code, control flow statements.

It supports a syntax that is common to most programming languages, including systems such as Excel.

Of course, what makes this useful is that you can calculate a new value for a variable with an expression which includes other values from the Process.

The way you do this is by building the expression as normal, but quoting other values which you want to include.

So if you have a variable called amount and you want an expression to calculae 16% tax, you could use the expression:

({amount} * 16/100)

Expression Wizard

As you are editing an update expression, you may well have forgotten exactly what name you gave to a particular value in the Process.

Instead of having to quit the editor to find out, you can make use of the Expression Wizard.

Ths formulates expressions for you, and then offers you the ability to copy and paste them in.

So you don’t need to remember:

Anything really - because this is a 100% no code system, and to remember lots of arbitrary things is not fun.

Math Functions

To build expressions use the familiar operators for multiplication,division, addition and subtraction:

You can also make use of some mathematical functions.

We will list them below, but please note they are also available for reference via the Expression Wizard

available functions

Examples

To calculate the value of amount to the power of 10, we could have the following expression:

pow({amount},10)

Expression to round the value of amount to the nearest integer

round({amount})

Constants available

Constant ´ Notes
e Base of the natural logarithms 2.718281828459045
ln2 Natural logarithm of 2 0.6931471805599453
ln10 Natural logarithm of 10 2.302585092994046
log2e Base-2 logarithm of e 1.4426950408889634
log10e Base-10 logarithm of e 0.4342944819032518
pi The PI constant 3.1415926535897932
sqrt1_2 Square root of 1/2 0.7071067811865476
sqrt2 Square root of 2

Division by zero and NaN (Not a number)

When you are calculating numbers based on other numbers, sometimes you get unfortunate situations.

One of them is when you are wanting to divide x by y, but the y has the value zero. Division by zero_ is impossible and yields infinity, which is most likely not what you intended

To avoid a crash, for cases of division by zero, we arbitarily / pragmatically assign the result to be 0.

Similarly, if there is a division by zero with a multiplication (e.g. (0/0)*100)), the result is NaN which is Not A Number.

In such a case, we also arbitarily assign the result to be 0.

6 - Sections

_Sections-

6.1 - Grouping Sections

Grouping steps is important for structuring large processes

Grouping steps into Sections

Grouping is not a UI concept, but an pretty essential tool for structuring Process steps as the Process grows large.

Preconditions

You can attach a Precondition to a Grouping section and all of the steps it contains, and all of the steps they contain (i.e. all of the section’s descendents) will NOT be used, unless the condition evaluates to true.

6.2 - Screens

A screen is where you can arrange more than one interaction

Screens

By default, every interaction you include in a Process will be shown to the user by itself, one after the other.

But you may well want to show some interactions together on the same screen.

For this, you can group them in a Screen.

Screens contain interactions only

Unlike a Grouping Section, a Screen cannot contain other screens, nor can it contain any Actions.

A Screen can contain only interactions.

Screens can have custom layouts

The way you arrange interactions together may be different for devices with narrow screens, as those with large screens.

You can define custom layouts for a Screen, and thus make it adaptive to display width.

7 - Updates

Updates are also Actions

Process Update Actions

Process update actions are steps which can be included in a Process.

Like all steps, they are executed unless they are nullified by some precondition being false.

7.1 - Grouping Sections

Grouping Updates

Grouping sections within Updates

Grouping sections in the Updates tab function the same as Grouping sections in the Process tab

7.2 - Instance

A short lead description about this content page. It can be bold or italic and can be split over multiple paragraphs.

This is a placeholder page. Replace it with your own content.

Text can be bold, italic, or strikethrough. Links should be blue with no underlines (unless hovered over).

There should be whitespace between paragraphs. Vape migas chillwave sriracha poutine try-hard distillery. Tattooed shabby chic small batch, pabst art party heirloom letterpress air plant pop-up. Sustainable chia skateboard art party banjo cardigan normcore affogato vexillologist quinoa meggings man bun master cleanse shoreditch readymade. Yuccie prism four dollar toast tbh cardigan iPhone, tumblr listicle live-edge VHS. Pug lyft normcore hot chicken biodiesel, actually keffiyeh thundercats photo booth pour-over twee fam food truck microdosing banh mi. Vice activated charcoal raclette unicorn live-edge post-ironic. Heirloom vexillologist coloring book, beard deep v letterpress echo park humblebrag tilde.

90’s four loko seitan photo booth gochujang freegan tumeric listicle fam ugh humblebrag. Bespoke leggings gastropub, biodiesel brunch pug fashion axe meh swag art party neutra deep v chia. Enamel pin fanny pack knausgaard tofu, artisan cronut hammock meditation occupy master cleanse chartreuse lumbersexual. Kombucha kogi viral truffaut synth distillery single-origin coffee ugh slow-carb marfa selfies. Pitchfork schlitz semiotics fanny pack, ugh artisan vegan vaporware hexagon. Polaroid fixie post-ironic venmo wolf ramps kale chips.

There should be no margin above this first sentence.

Blockquotes should be a lighter gray with a border along the left side in the secondary color.

There should be no margin below this final sentence.

First Header 2

This is a normal paragraph following a header. Knausgaard kale chips snackwave microdosing cronut copper mug swag synth bitters letterpress glossier craft beer. Mumblecore bushwick authentic gochujang vegan chambray meditation jean shorts irony. Viral farm-to-table kale chips, pork belly palo santo distillery activated charcoal aesthetic jianbing air plant woke lomo VHS organic. Tattooed locavore succulents heirloom, small batch sriracha echo park DIY af. Shaman you probably haven’t heard of them copper mug, crucifix green juice vape single-origin coffee brunch actually. Mustache etsy vexillologist raclette authentic fam. Tousled beard humblebrag asymmetrical. I love turkey, I love my job, I love my friends, I love Chardonnay!

Deae legum paulatimque terra, non vos mutata tacet: dic. Vocant docuique me plumas fila quin afuerunt copia haec o neque.

On big screens, paragraphs and headings should not take up the full container width, but we want tables, code blocks and similar to take the full width.

Scenester tumeric pickled, authentic crucifix post-ironic fam freegan VHS pork belly 8-bit yuccie PBR&B. I love this life we live in.

Second Header 2

This is a blockquote following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.

Header 3

This is a code block following a header.

Next level leggings before they sold out, PBR&B church-key shaman echo park. Kale chips occupy godard whatever pop-up freegan pork belly selfies. Gastropub Belinda subway tile woke post-ironic seitan. Shabby chic man bun semiotics vape, chia messenger bag plaid cardigan.

Header 4

  • This is an unordered list following a header.
  • This is an unordered list following a header.
  • This is an unordered list following a header.
Header 5
  1. This is an ordered list following a header.
  2. This is an ordered list following a header.
  3. This is an ordered list following a header.
Header 6
What Follows
A table A header
A table A header
A table A header

There’s a horizontal rule above and below this.


Here is an unordered list:

  • Liverpool F.C.
  • Chelsea F.C.
  • Manchester United F.C.

And an ordered list:

  1. Michael Brecker
  2. Seamus Blake
  3. Branford Marsalis

And an unordered task list:

  • Create a Hugo theme
  • Add task lists to it
  • Take a vacation

And a “mixed” task list:

  • Pack bags
  • ?
  • Travel!

And a nested list:

  • Jackson 5
    • Michael
    • Tito
    • Jackie
    • Marlon
    • Jermaine
  • TMNT
    • Leonardo
    • Michelangelo
    • Donatello
    • Raphael

Definition lists can be used with Markdown syntax. Definition headers are bold.

Name
Godzilla
Born
1952
Birthplace
Japan
Color
Green

Tables should have bold headings and alternating shaded rows.

Artist Album Year
Michael Jackson Thriller 1982
Prince Purple Rain 1984
Beastie Boys License to Ill 1986

If a table is too wide, it should scroll horizontally.

Artist Album Year Label Awards Songs
Michael Jackson Thriller 1982 Epic Records Grammy Award for Album of the Year, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Selling Album, Grammy Award for Best Engineered Album, Non-Classical Wanna Be Startin’ Somethin’, Baby Be Mine, The Girl Is Mine, Thriller, Beat It, Billie Jean, Human Nature, P.Y.T. (Pretty Young Thing), The Lady in My Life
Prince Purple Rain 1984 Warner Brothers Records Grammy Award for Best Score Soundtrack for Visual Media, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Soundtrack/Cast Recording, Grammy Award for Best Rock Performance by a Duo or Group with Vocal Let’s Go Crazy, Take Me With U, The Beautiful Ones, Computer Blue, Darling Nikki, When Doves Cry, I Would Die 4 U, Baby I’m a Star, Purple Rain
Beastie Boys License to Ill 1986 Mercury Records noawardsbutthistablecelliswide Rhymin & Stealin, The New Style, She’s Crafty, Posse in Effect, Slow Ride, Girls, (You Gotta) Fight for Your Right, No Sleep Till Brooklyn, Paul Revere, Hold It Now, Hit It, Brass Monkey, Slow and Low, Time to Get Ill

Code snippets like var foo = "bar"; can be shown inline.

Also, this should vertically align with this and this.

Code can also be shown in a block element.

foo := "bar";
bar := "foo";

Code can also use syntax highlighting.

func main() {
  input := `var foo = "bar";`

  lexer := lexers.Get("javascript")
  iterator, _ := lexer.Tokenise(nil, input)
  style := styles.Get("github")
  formatter := html.New(html.WithLineNumbers())

  var buff bytes.Buffer
  formatter.Format(&buff, style, iterator)

  fmt.Println(buff.String())
}
Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this.

Inline code inside table cells should still be distinguishable.

Language Code
Javascript var foo = "bar";
Ruby foo = "bar"{

Small images should be shown at their actual size.

Large images should always scale down and fit in the content container.

The photo above of the Spruce Picea abies shoot with foliage buds: Bjørn Erik Pedersen, CC-BY-SA.

Components

Alerts

Another Heading

7.2.1 - Create Instance Action

When a new record is written to the database

Creating a record

This is one of the most important aspects of of Logiak.

This is where your App creates a new record, a new Object instance, in the database.

It gets recorded on the device, and also pushed to the backend.

Object type

Of course, every record has to be of a specific type. So you need to choose one of the Data objects you’ve defined.

Mapping

The core of creating a new record is to assign values to its field.

The values are values in the Process.

We refer to this assignment of values-to-fields as a mapping.

Type mapping

There are some limits to the mapping to do with data types.

For all number fields in the object, you will need to map a number value from the Process.

You can though map numbers to text fields (we can convert the numbers to text).

Maybe most surprising is that you can map symbols to symbol sets (we can create a set with just that one symnbol).

Conditions can serve as true/false values

Yes, you can map not only true/false values from the Process to true/false fields of the object, but also any condition.

All conditions are statements which evaluate to true or false, so those evaluations can be used as values to be put into true/false object fields.

7.2.2 - Update Instance Action

Update instance

Updating an instance is quite similar to creating an instance, with the obvious exception that when you are updating an instance, you have to specify which one you are updating.

But the mapping dialogue is the same: the main task is to decide which fields you want to update, and which values from the Process you want to map to them.

7.2.3 - Delete Instance Action

Delete an instance from the database

As when you are Updating an instance, you of course have to specify which instance you want to delete.

7.3 - Database

A short lead description about this content page. It can be bold or italic and can be split over multiple paragraphs.

This is a placeholder page. Replace it with your own content.

Text can be bold, italic, or strikethrough. Links should be blue with no underlines (unless hovered over).

There should be whitespace between paragraphs. Vape migas chillwave sriracha poutine try-hard distillery. Tattooed shabby chic small batch, pabst art party heirloom letterpress air plant pop-up. Sustainable chia skateboard art party banjo cardigan normcore affogato vexillologist quinoa meggings man bun master cleanse shoreditch readymade. Yuccie prism four dollar toast tbh cardigan iPhone, tumblr listicle live-edge VHS. Pug lyft normcore hot chicken biodiesel, actually keffiyeh thundercats photo booth pour-over twee fam food truck microdosing banh mi. Vice activated charcoal raclette unicorn live-edge post-ironic. Heirloom vexillologist coloring book, beard deep v letterpress echo park humblebrag tilde.

90’s four loko seitan photo booth gochujang freegan tumeric listicle fam ugh humblebrag. Bespoke leggings gastropub, biodiesel brunch pug fashion axe meh swag art party neutra deep v chia. Enamel pin fanny pack knausgaard tofu, artisan cronut hammock meditation occupy master cleanse chartreuse lumbersexual. Kombucha kogi viral truffaut synth distillery single-origin coffee ugh slow-carb marfa selfies. Pitchfork schlitz semiotics fanny pack, ugh artisan vegan vaporware hexagon. Polaroid fixie post-ironic venmo wolf ramps kale chips.

There should be no margin above this first sentence.

Blockquotes should be a lighter gray with a border along the left side in the secondary color.

There should be no margin below this final sentence.

First Header 2

This is a normal paragraph following a header. Knausgaard kale chips snackwave microdosing cronut copper mug swag synth bitters letterpress glossier craft beer. Mumblecore bushwick authentic gochujang vegan chambray meditation jean shorts irony. Viral farm-to-table kale chips, pork belly palo santo distillery activated charcoal aesthetic jianbing air plant woke lomo VHS organic. Tattooed locavore succulents heirloom, small batch sriracha echo park DIY af. Shaman you probably haven’t heard of them copper mug, crucifix green juice vape single-origin coffee brunch actually. Mustache etsy vexillologist raclette authentic fam. Tousled beard humblebrag asymmetrical. I love turkey, I love my job, I love my friends, I love Chardonnay!

Deae legum paulatimque terra, non vos mutata tacet: dic. Vocant docuique me plumas fila quin afuerunt copia haec o neque.

On big screens, paragraphs and headings should not take up the full container width, but we want tables, code blocks and similar to take the full width.

Scenester tumeric pickled, authentic crucifix post-ironic fam freegan VHS pork belly 8-bit yuccie PBR&B. I love this life we live in.

Second Header 2

This is a blockquote following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.

Header 3

This is a code block following a header.

Next level leggings before they sold out, PBR&B church-key shaman echo park. Kale chips occupy godard whatever pop-up freegan pork belly selfies. Gastropub Belinda subway tile woke post-ironic seitan. Shabby chic man bun semiotics vape, chia messenger bag plaid cardigan.

Header 4

  • This is an unordered list following a header.
  • This is an unordered list following a header.
  • This is an unordered list following a header.
Header 5
  1. This is an ordered list following a header.
  2. This is an ordered list following a header.
  3. This is an ordered list following a header.
Header 6
What Follows
A table A header
A table A header
A table A header

There’s a horizontal rule above and below this.


Here is an unordered list:

  • Liverpool F.C.
  • Chelsea F.C.
  • Manchester United F.C.

And an ordered list:

  1. Michael Brecker
  2. Seamus Blake
  3. Branford Marsalis

And an unordered task list:

  • Create a Hugo theme
  • Add task lists to it
  • Take a vacation

And a “mixed” task list:

  • Pack bags
  • ?
  • Travel!

And a nested list:

  • Jackson 5
    • Michael
    • Tito
    • Jackie
    • Marlon
    • Jermaine
  • TMNT
    • Leonardo
    • Michelangelo
    • Donatello
    • Raphael

Definition lists can be used with Markdown syntax. Definition headers are bold.

Name
Godzilla
Born
1952
Birthplace
Japan
Color
Green

Tables should have bold headings and alternating shaded rows.

Artist Album Year
Michael Jackson Thriller 1982
Prince Purple Rain 1984
Beastie Boys License to Ill 1986

If a table is too wide, it should scroll horizontally.

Artist Album Year Label Awards Songs
Michael Jackson Thriller 1982 Epic Records Grammy Award for Album of the Year, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Selling Album, Grammy Award for Best Engineered Album, Non-Classical Wanna Be Startin’ Somethin’, Baby Be Mine, The Girl Is Mine, Thriller, Beat It, Billie Jean, Human Nature, P.Y.T. (Pretty Young Thing), The Lady in My Life
Prince Purple Rain 1984 Warner Brothers Records Grammy Award for Best Score Soundtrack for Visual Media, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Soundtrack/Cast Recording, Grammy Award for Best Rock Performance by a Duo or Group with Vocal Let’s Go Crazy, Take Me With U, The Beautiful Ones, Computer Blue, Darling Nikki, When Doves Cry, I Would Die 4 U, Baby I’m a Star, Purple Rain
Beastie Boys License to Ill 1986 Mercury Records noawardsbutthistablecelliswide Rhymin & Stealin, The New Style, She’s Crafty, Posse in Effect, Slow Ride, Girls, (You Gotta) Fight for Your Right, No Sleep Till Brooklyn, Paul Revere, Hold It Now, Hit It, Brass Monkey, Slow and Low, Time to Get Ill

Code snippets like var foo = "bar"; can be shown inline.

Also, this should vertically align with this and this.

Code can also be shown in a block element.

foo := "bar";
bar := "foo";

Code can also use syntax highlighting.

func main() {
  input := `var foo = "bar";`

  lexer := lexers.Get("javascript")
  iterator, _ := lexer.Tokenise(nil, input)
  style := styles.Get("github")
  formatter := html.New(html.WithLineNumbers())

  var buff bytes.Buffer
  formatter.Format(&buff, style, iterator)

  fmt.Println(buff.String())
}
Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this.

Inline code inside table cells should still be distinguishable.

Language Code
Javascript var foo = "bar";
Ruby foo = "bar"{

Small images should be shown at their actual size.

Large images should always scale down and fit in the content container.

The photo above of the Spruce Picea abies shoot with foliage buds: Bjørn Erik Pedersen, CC-BY-SA.

Components

Alerts

Another Heading

7.3.1 - Update Objects Action

General database update

Attention: power!

This action is very powerful.

You can achieve a lot with it, but equally, if you make a mistake with it, the consequences for your data could be very bad.

This is the because this action gives you extraordinary power to update the database.

It is not restricted to a single Object instance, but allows you to do a major update of all records of a given Object type.

Specify conditions to select which instances to update

Specify update mapping for all which satisfy conditions

7.3.2 - Delete Objects Action

General database delete

Attention: awesome destructive power!

This action is very powerful, and is a DELETE action, so this should be used with great caution.

It permits you to specify conditions to select a subset of all instances of a given Object type, and then to delete all of those instances.

7.4 - Mailing Actions

Mails can be sent at the end of a Process

7.4.1 - Send mail

Send an Email

7.4.2 - Send mail (DB)

Send an Email to email address within an Object

8 - Debug

Debugger

8.1 - Debug Overview

Debug Overview

Check your reasoning

The Debug tab of Process allows you at any time to interact with the Process while at the same time seeing information which makes clear why the Process is behaving as it is: it shows the logic and calculations defined within the Process in detail.

Left: Process, Right: Debug info

Within the debugger, the screen is partitioned into left and right.

On the left, you see the Process, pretty much as your users would see it.

You interact with the Process, while at the same time using tabs on the right to explore the details of what is happening as you interact.

Four debug tabs

The debugger has four tabs

Trace permits you step-by-step to view details of calculations and logical reasoning

Values lets you view the current values in the Process

Conditions shows all conditions defined, and indicates whether they are currently true or false

Shows a view of the Process you are executing

8.2 - Step by Step Trace

Trace shows a record of each step executed

The Trace tab of the debugger shows you each step as you complete them.

It shows the values you entered, and the results of actions, for example the new values for variables if you have an update variable action.

The Trace tab is activated by default when you start to debug a Process

Debugging a Process, tracing step by step

8.3 - Conditions

Viewing condition evaluations

The Conditions tab gives you an alphabetical list of all conditions defined in the Process along with their current evaluation - true or false.

8.4 - Values

Viewing the current values

The values tab gives you an alphabetical list of all values in the Process

This shows the current state, at each step, of these values.

It shows values you have entered, and also values of variables.

For true/false values, the check mark being green indicates true, grey false.