I can create my workflow_job_template and a pair of workflow_job_template_nodes via API calls, but I cannot make the second node a success_node of the first.
I am POSTing to: /api/v2/workflow_job_template_nodes/
First, I POST:
{
“type”: “workflow_job_template_node”,
“workflow_job_template”: 200,
“unified_job_template”: 196,
“success_nodes”: ,
“failure_nodes”: ,
“always_nodes”: ,
“all_parents_must_converge”: false,
“identifier”: “node2_success”
}
201 created, and I obtain the ID of the node as 15. Then I POST:
{
“type”: “workflow_job_template_node”,
“workflow_job_template”: 200,
“unified_job_template”: 195,
“success_nodes”: [
15
],
“failure_nodes”: ,
“always_nodes”: ,
“all_parents_must_converge”: false,
“identifier”: “node1_always”
}
Again, 201 Created and the new ID is 16. The two nodes are both “always” nodes linked directly to the Start button. I can subsequently link them in the visualizer just fine. Any attempt to repost the data gives me an “already exists” error, even when I supply the ID = 16.
I’m thinking there has to be some simple way to link these and I’m just missing it.