i had created very simple flow i had attached the picture below.
flow description :
User sends the expense report and finally it gets reviewed and should be approved while i am clicking the approved button. but i was getting error as below :
com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'onAccept1': was expecting ('true', 'false' or 'null').
current json that i have on variable
onAccept1 : return {"comments1" : $data.comments1, "isApproved1":false};
can any body please what was the mistake in the json , that i have on the variable called "onAccept1".
i got this error while submitting thtask , below was my contract def:
Actually you got two different errors in the "Review report1" step form ("newForm12") that prevent successful submission of the form when clicking on "Accept" button.
First one is the way the
onAccept1
form variable is bind with the "Accept" button. In your version "Data send on click" property is set with a constant value instead of an expression. So with the current value set toonAccept1
means that the value sent will actually beonAccept1
. You need to switch from constant to expression by clicking on the "fx" icon on the right of the "Data sent on click" property.You will switch from
to
Second one is the definition of the
onAccept1
value: you miss thereturn
keyword and have quotes around $data value that should not be there. Here is the correct value:return {"comments1": $data.comments1, "isApproved1": true};