Change Type

ID: changeType

Changes the type of a node.

Configuration

Property Type Required Default Description
type text The QName of the type to change the node to (for example, custom:thing).

The configuration for this action is described using JSON Schema like this:

{
    "title": "Change Type",
    "properties": {
        "type": {
            "title": "Type QName",
            "type": "string"
        }
    }
}

Example

Here is a configuration that changes the type of a node to custom:thing:

{
    "type": "custom:thing"
}

You can also fire this action from a server-side script using the actions scripting API:

actions.execute("changeType", {
    "node": node,
    "type": "custom:thing"
});