1. Tasks
  2. Morph Stub

Tasks

Morph Stub

The morph stub task is used to morph the program of the stub to another program. A program is the combination of a template, branch and context.

Use cases

  • Have a customer stub morph between different templates for different processes (marketing, support etc.).

Basic usage

Morph a stub to another context.

editor
        {
    "tasktype": "morph_stub",
    "params": {
        "templateuuid": "~~stub.program.templateuuid",
        "branch": "~~stub.program.branch",
        "context": "_manage"
        "state": "administer-stubs"
    }
}

      

Parameters

templateuuid

optional
string

The UUID of the template to morph the stub to.

Default: ~~stub.program.templateuuid


branch

optional
string

The branch of the template to morph the stub to, live or draft.

Default: ~~stub.program.branch


context

optional
string

The context to morph the stub to, eg _manage, default, _create, _all.

Default: ~~stub.program.context

state

optional
string

The state of the stub to morph to, active or inactive. The state has to exist in the new program to morph to.

Default: ~~stub.program.state

Result

loading...
NOTE

The stub will trigger a lifecycle action _morph after the morphing is complete.

Properties

from_program

integer

The program the stub was morphed from. Contains the templateuuid, branch, context of the old program and the state of the stub.


to_program

string

The program the stub was morphed to. Contains the templateuuid, branch, context of the new program and the new state to change to.


Examples

Merge a stub to another context.

Stay on the same branch and and template, but change contexts

loading...

Merge a stub to another template

Change the template, but stay on the same branch and context.

loading...