Hi, I'm trying a very simple workflow with one HTTP task and can't get through.
My workflow definition:
{
"name": "http_flow",
"description": "Simple http flow",
"version": 1,
"schemaVersion": 2,
"inputParameters": [],
"tasks": [
{
"name": "get_version",
"taskReferenceName": "get_version",
"type": "HTTP",
"startDelay": 0,
"inputParameters": {
"http_request": {
"uri": "http://localhost:9200",
"method": "GET",
"contentType": "application/json"
}
}
}
],
"outputParameters": {
}
}
Posting to /api/metadata/workflow returns an error:
{
"code": "INTERNAL_ERROR",
"message": "INTERNAL_ERROR - Can not deserialize instance of java.lang.String out of START_OBJECT tokenn at [Source: HttpInputOverHTTP@c02ed90[c=504,s=STREAM]; line: 14, column: 25] (through reference chain: com.netflix.conductor.common.metadata.workflow.WorkflowDef["tasks"]->java.util.LinkedList[0]->com.netflix.conductor.common.metadata.workflow.WorkflowTask["inputParameters"]->java.util.LinkedHashMap["http_request"])",
"instance": "server_id"
}
I've tried schemaVersion 1 and 2 with the same result.
Anything wrong I'm missing here? Should HTTP task be registered before using it in the workflow?
Appreciated!
/api/metadata/workflow takes a JSON array of workflow definitions. Wrap your json in an array and you should be fine.
e.g.
[{
"name": "http_flow",
"description": "Simple http flow",
"version": 1,
"schemaVersion": 2,
"inputParameters": [],
"tasks": [
{
"name": "get_version",
"taskReferenceName": "get_version",
"type": "HTTP",
"startDelay": 0,
"inputParameters": {
"http_request": {
"uri": "http://localhost:9200",
"method": "GET",
"contentType": "application/json"
}
}
}
],
"outputParameters": {
}
}]

It appears the the Swagger Spec does not show an array.
I have to say that the current state of the documentation is an impediment to adopting this product. The kitchensink workflow is huge and does nothing that is actually useful.
A step by step tutorial on how to do a hello world workflow that GETS a short series of simple WS would be a huge help.
@jeremyjjbrown I think that is a good feedback on having a step by step hello world workflow. Will update the documentation with the guide on creating a sample hello world workflow. Hope that makes it easier.
Will fix the issue with swagger.
Hey, wrapping in array produces different error now:
{
"code": "INTERNAL_ERROR",
"message": "INTERNAL_ERROR - Can not deserialize instance of com.netflix.conductor.common.metadata.workflow.WorkflowDef out of START_ARRAY tokenn at [Source: HttpInputOverHTTP@4066e9e2[c=531,s=STREAM]; line: 1, column: 1]",
"instance": "server_id"
}
Any ideas?
Thank you!
@esidorov there are two APIs, one that takes an array and another that takes a single object.

I have created https://github.com/Netflix/conductor/issues/78 to address this and streamline the APIs.
@v1r3n Thank you, but my original question refers the POST API that takes single, means my attempt to post a single definition was probably correct and the original deserialization error is still a problem, I get the same error if I try to PUT an array wrapped definition.
@esidorov Apologies for jumping too quickly - let me take a look at it. I think there is another issue here.
@esidorov I was able to use the JSON you posted and register the workflow. Here is the JSON I posted to POST method:
{
"name": "http_flow",
"description": "Simple http flow",
"version": 1,
"schemaVersion": 2,
"inputParameters": [],
"tasks": [
{
"name": "get_version",
"taskReferenceName": "get_version",
"type": "HTTP",
"startDelay": 0,
"inputParameters": {
"http_request": {
"uri": "http://localhost:9200",
"method": "GET",
"contentType": "application/json"
}
}
}
],
"outputParameters": {}
}
What version of conductor are you using? Do you have any server stack trace that you can share with?
@v1r3n I was using docker image at https://hub.docker.com/r/jcantosz/netflix-conductor-sample/ I've build official docker now and I can register my workflow.
Thank you for your time!
Closing the issue. Please re-open/create if there are other issues.
Most helpful comment
@jeremyjjbrown I think that is a good feedback on having a step by step hello world workflow. Will update the documentation with the guide on creating a sample hello world workflow. Hope that makes it easier.
Will fix the issue with swagger.