Sync Node

Type: syncNode

This handler "syncs" nodes that are part of a workflow's payload to a target branch. This handler can be used to have workflow payload nodes automatically copied to or deleted from a target branch.

The full config for this handler is as follows:

{
    "targetProjectId": "<projectId>",
    "targetRepositoryId": "<repositoryId>",
    "targetBranchId": "<branchId>",
    "includeAllAssociations": <boolean>,
    "delete": <boolean>
}

Examples

Sync nodes to another branch in the same project

{
    "targetBranchId": "<branchId>"
}

Sync nodes to the master branch in a different project

{
    "targetProjectId": "<projectId>"
}

Sync nodes to the specific branch in a different project

{
    "targetProjectId": "<projectId>",
    "targetBranchId": "<branchId>"
}

Sync nodes to the specific repository and branch

{
    "targetRepositoryId": "<repositoryId>",
    "targetBranchId": "<branchId>"
}

Sync nodes and copy optional associations

At times, you may want to copy any a:linked or optional associations to the target location. The sync handler can be told to scan for optional associations and make them part of the copy operation. In this case, if the target location already contains the referenced nodes at the other end of the association, they will be linked in within the content graph.

{
    "targetBranchId": "<branchId>",
    "includeAllAssociations": true
}

Sync nodes with deletion in target

At other times, you may want to cause an existing node in the target location to be deleted. In effect, you can say "remove nodes like these from the target".

{
    "targetBranchId": "<branchId>",
    "delete": true
}