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>",
    "asynchronous": <boolean>,
    "includeAllAssociations": <boolean>,
    "delete": <boolean>,
    "allowWriteToFrozenBranches": <boolean>
}

Examples

Sync nodes to another branch in the same project

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

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
}

Sync nodes with frozen branch

If you have a frozen branch (ex. Your master branch is frozen when "Master Branch can ONLY be updated via Releases" is enabled), you will not be able to sync nodes to this branch by default. For this you would need to enable allowWriteToFrozenBranches:

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