09-01-23 12:20 PM
Hi. Im having big problems getting a Web API to take data from af collection and sending a message.
My Template is like this.
{
"MessageBody": {
"LegalEntityId": "[LegalEntityID]",
"SourceSystem": "[SourceSystem]",
"JournalLines": [
{
"SourceSystemId": "[JournalLines_new.SourceSystemId]",
"Date": "[JournalLines_new.Date]",
"ProjectId": "[JournalLines_new.ProjectId]",
"EmplId": "[JournalLines_new.EmplId]",
"ICWarehouse": "[JournalLines_new.ICWarehouse]",
"ICLocation": "[JournalLines_new.ICLocation]",
"Qty": [JournalLines_new.Qty],
"ItemId": "[JournalLines_new.ItemId]",
"WorkorderId": "[JournalLines_new.WorkorderId]"
}
]
}
}
In the object i have two dataitems called "LegalEntityID", and "SourceSystem", and a Collection called "JournalLines_new"
It takes the LegalEntityID, and SourceSystem correctly, but the collection beings passed to the object that handles the API call is being ignored.
I have tried the Utility - JSON to convert the collection to a JSON string and skipping the internal collection completely, but the message being sent is always blank apart from LegalEntityID and Source system.
This is a grab of the RequestData output.
Content-Length: 362
Expect: 100-continue
Connection: Keep-Alive
{
"MessageBody": {
"LegalEntityId": "Test",
"SourceSystem": "RPA",
"JournalLines": [
{
"SourceSystemId": "",
"Date": "",
"ProjectId": "",
"EmplId": "",
"ICWarehouse": "",
"ICLocation": "",
"Qty": ,
"ItemId": "",
"WorkorderId": ""
}
]
}
}
Answered! Go to Answer.
11-01-23 07:52 AM
Hi Everybody.
I think i have fixed it 😄
Now at least the RequestData output fills in my data.
The fix was to send the Collection to the Object, use a MultiCalc step, to split it into single dataitems, and then pass those to the call.
Right now i am waiting for someone on the other end to veryfy that something has been recieved.
a week ago
Hi @zdenek.kabatek ,
I see that you have a "tags" attribute. Have you by any chance passed multiple values to this array as parameters to the Web API service? Blue Prism documentation does not clearly state how these must be passed in although it does say that leading square bracket must be escaped using "[[".
thanks