How to pass value of business object attribut in the body of REST API

Hello,


I am a beginner on Bonitasoft and I am looking to do a fairly simple exercise: make a POST call to a REST API by passing in the body of values ​​that I can retrieve from my business object (item) outstanding


So I use a REST connector and I would like to put a body like:
{
                "id": "item.getId ()",
                "actionCode": "item.getActionCode ()}",
                "status": "item.getStatus ()"
 }

How to do ?

Thank you

For information, i am using communauty version

Hello,

 

I think i found how to do.

I used a script to fullfill the body with this code and I think i works

 

import groovy.json.JsonOutput

Map json = new HashMap();
json.put("id", orderItemPassed.getId());
json.put("actionCode", orderItemPassed.getActionCode());
json.put("status", orderItemPassed.getStatus());
return JsonOutput.toJson(json)

 

Regards