Updating Workflows
Workflows can be created or updated using the workflow metadata API
Example using curl
curl 'http://localhost:8080/api/metadata/workflowdef' \
-X 'PUT' \
-H 'accept: */*' \
-H 'content-type: application/json' \
--data-raw '[{"name":"sample_workflow","version":1,"tasks":[{"name":"ship_via_fedex","taskReferenceName":"ship_via_fedex","type":"CUSTOM"}],"schemaVersion":2}]'
Example using node fetch
fetch("http://localhost:8080/api/metadata/workflowdef", {
"headers": {
"accept": "*/*",
"content-type": "application/json"
},
"body": "[{\"name\":\"sample_workflow\",\"version\":1,\"tasks\":[{\"name\":\"ship_via_fedex\",\"taskReferenceName\":\"ship_via_fedex\",\"type\":\"CUSTOM\"}],\"schemaVersion\":2}]",
"method": "PUT"
});
Best Practices
- If you are updating the workflow with new tasks, remember to register the task definitions first
- You can also use the Conductor Swagger UI to update the workflows