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.
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
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
Merge a stub to another template
Change the template, but stay on the same branch and context.