I'm still learning many basic steps in Bonita, so sorry if this is a stupid question ...
In order to do some automation in processes, I call the REST API of another application, which returns a JSON encoded string with three values, one or two of which I'd like to store in a BPOject in Bonita for further use.
I have the connector set up correctly to do the REST call, with a some sample data for now.
I assume to feed in some of the BPOject data I have gathered in a set of data, I will need to define a process variable first, create the JSON string which I put into that variable, then use the "{{someVariable}}" syntax in the body (or I guess I probably could just use the 2-3 input variables inside the body as part of the complete JSON string). This part I guess I have covered.
Problem is reading the information I get back. I found one post here that speaks of how to get the data back, by adding the process variable name to one of the five result fields on the REST definition. Anyway, I need some help with plucking the JSON result string apart and reading the desired values, as well as storing them in the BP Object ... how do I define the script, and how does the script need to look? The JSON string is something like this:
{"TicketID":"375275","TicketNumber":"10213414","ArticleID":"725602"}
I need at least the TicketNumber and possibly the TicketID field read and stored ...
Help appreciated!