1. Contexts
  2. All Context

Contexts

All Context

All context is merged into all other contexts of a template, allowing shared functionality.

Any functionality (actions/states etc) defined in the all context will be available in all other contexts of the template.

Stubber uses the All context as a place to define anything that should be in ALL contexts, anything in All will be copied to the other contexts upon template forging and building

Default All Context Flow

The all context gives you access to the editor canvas and a flow as usual.

This means you can add any of the usual functionality such tasks, fields, notifications, etc.

The default flow for the all context doesn't contain any actions, fields, tasks or notifications.

The above flow just has an action with no fields, tasks or notifications.
Thus by default, the all context doesn't add any additional functionality to the other contexts.

Examples

Adding a shared action to the all context

Let's say you want to add a notify_stakeholders action to all contexts of a template.

You can define a

notify_stakeholders
action in the all context like this:

loading...

The above action will send an email to the stakeholders list whenever the notify_stakeholders action is triggered in any context of the template.

See contact-lists on how to create a stakeholders list.

Since this action is defined in the all context, it will be available in all other contexts of the template.

So if we create a notify_stakeholders action in the flow of the default context:

using-shared-action

Even though the notify_stakeholders action in the default flow has no notifications defined, it will still send an email to the stakeholders list because the notify_stakeholders action defined in the all context does have a notification configured, and these action definitions will be merged together.

See Template Inheritance for more info on merging, as the merging of the all context into other contexts is a form of inheritance.