Tasks
Morph Stub
The morph stub task is used to morph the program of a stub to another program. A program is the combination of a template, branch, and context.
Use Cases
- Use this task to morph a customer stub between different templates for different processes (e.g., 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, e.g. _manage, default, _create, _all.
Default: ~~stub.program.context
state optional string
The state of the stub to morph to — active or inactive.
The state must exist in the new program being morphed to.
Default: ~~stub.program.state
Result
After morphing is complete, the stub will trigger a _morph lifecycle action.
Properties
from_program
The program the stub was morphed from. Includes the template UUID, branch, context, and state of the original stub.
to_program
The program the stub was morphed to. Includes the template UUID, branch, context, and the new state the stub changed to.
Examples
Morph a stub to another context
Stay on the same branch and template, but change the context.
Morph a stub to another template
Change the template, but stay on the same branch and context.