Copy Node
Type: copyNode
This handler copies nodes that are part of a workflow's payload to a target folder. The target folder can be identified either by a node ID or a node path.
The config
for this handler is as follows:
{
"targetNodeId": "<target node id>",
"targetOffsetPath": "<target path>"
}
If targetOffsetPath
is specified, then targetNodeId
is the root node to calculate the offset against. If targetNodeId
is not provided, the default repository root is used.
Here is an example where we copy a node to the /Archive/Workflow Documents
folder.
{
"targetOffsetPath": "/Archive/Workflow Documents"
}
This is equivalent to:
{
"targetNodeId": "root",
"targetOffsetPath": "/Archive/Workflow Documents"
}
We can also move to a specific node identified by it's node ID or it's QName:
{
"targetNodeId": "ABCDEFGH123456"
}
Or:
{
"targetNodeId": "custom:workflow_documents"
}
Finally, you can do relative offsets. Suppose the /Archive
folder has node ID XYZABC1234987
:
{
"targetNodeId": "XYZABC1234987",
"targetOffsetPath": "/Workflow Documents"
}
The Copy Workflow Handler can also copy to other projects, repositories and branches.
Either identify the repository and branch:
{
"targetRepositoryId": "",
"targetBranchId": "",
}
Or the target project (and optional branch):
If you are copying to a target branch, you can also specify includeFolders
to indicate that all parent folder paths should be included.
{
"includeFolders": true
}