1. Concepts
  2. Template Structure

Concepts

Template Structure

How templates are structured

Overview

Templates are the container for defining a unique process in Stubber.
Templates are the top-level of the process definition.

Templates are broken down into components in a tree structure.

template components

Component Description
Template The top-level container for the process definition.
Branches A version of the template that can be referenced.
Contexts The viewpoint or aspect into the template. Each context has a single flow and layout.
A Flow The states and actions of the context
A Layout The visual layout of a stub in the context

Example

Here is an example of what a template structure would look like to define a "sales enquiry" process.

template example

There are 2 default branches namely draft and live.
The publish action on the editor will copy the draft branch to the live branch.

Template Context

Basics

The context is the viewpoint or aspect into the template.
Some default contexts are create and manage.
You would define how a new stub is created in the create context.
You could define actions that are used to manage all the stubs in the manage context.

Clarification

This means a stub actually follows the definition contained in the context of the template.
The stub is a unique instance of the template and follows the specific definition of the context that it is created from.

Conceptual Example

template context

Practical Example

For a "sales enquiry" template we might have many stubs that are created using the default context, these specify how a sales enquiry works.
We also have a context called create that specifies how a someone would create a new sales enquiry, this context would contain the fields that are required to create a new sales enquiry.
We also have a context called manage that specifies how a someone would manage a sales enquiry, this context would contain the actions that are required to manage a sales enquiry.

template context example

Flow

Basics

The flow is where you define the states and actions of the context.
This is most important part of the Stubber Framework and where the most of the defining happens.

context flow

States and Actions

The states and actions are the building blocks of the flow.

context flow example

The states and actions are explained in this conceptual page.