cancel
Showing results for 
Search instead for 
Did you mean: 

Populating request mapping for Rest call task not working

chuck_irvine
Champ on-the-rise
Champ on-the-rise
I have a rest call task with a PUT endpoint. The request body needs to be:

{
    "data": {
        "id": <process_var_1>,
        "relationships": {
            "status": {
                "data": {
                    "id": <process_var_2>
}}}}}

Where <process_var_1> and <process_var_2> are populated at runtime. My request mappings are:

data.id -> process_var_1
data.relationships.status.data.id -> process_var_2

Instead of the request body shown above, the request body sent to the REST call is:

{
   "data.id": "1001",
   "data.relationships.status.data.id": "5"
}

So you can see that the syntax for JSON properties isn't working as hoped.

Is there a syntax that will work? If not, this seems like a bug, correct? Can anyone suggest another approach?

Thanks
2 REPLIES 2

jbarrez
Star Contributor
Star Contributor
So you mean the json has been slammed down into one line?

> Can anyone suggest another approach?

One way that always works is not to use that particular task but create a JavaDelegate that does a REST call itself (using httpclient for example).

chuck_irvine
Champ on-the-rise
Champ on-the-rise
The tool doesn't recognize data.relationships.status.data.id as a set of nested json properties. I just sees it as one property. Seems a fairly serious bug to me.

We aren't a Java shop though I have a lot of Java in my background. We may have to do something like that.