Transition form

This feature adds a form at the top of the standard Transition UI which must be completed by the actionable user before the pending transition can take place. The document from the form is then saved in the timeline entry upon transitioning.

This provides an alternative place to place forms that do not necessarily require an entire Document store definition but that may still be essential to certain parts of a workflow.

Using transition forms

EgWorkflow.use("std:transition_form", {
    selector: { state: "wait_supervisor" },
    transitions: ["progress"],
    form: P.form({
        specificationVersion: 0,
        formId: "exampleForm",
        formTitle: "Example form",
        elements: [
            // ...
    onTransition: function(M, document) {
        // called just before transition


use() the std:transition_form feature, passing in the specification object, which has keys:

key selector

A selector for the transition form.

key transitions

The list of transitions for which the form is required.

key form

The FormDescription to display on transition UI.

key prepareFormInstance

function(key, instance)

Allows preparation of the form instance, such as setting up dynamic form choices. See prepareFormInstance() for usage examples.

key onTransition

function(key, document)

If this function is specified, it will be called just before the transition is committed.


Error messages are rendered at the top of the form if the form is left incomplete. The text for these can be easily customised using the Workflow text system.