0

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".

my expense report flow

i got this error while submitting thtask , below was my contract def: enter image description here

ramakri
  • 201
  • 3
  • 7
  • 20
  • When do you get this error message exactly? At the case creation or at the task submission? Also, what is your contract definition on the step where you get the error? – lio Dec 21 '16 at 19:34
  • I got this error while submitting the task , – ramakri Dec 23 '16 at 00:40
  • below was the link for my attached bos file , please check this by importing and let me know i am woirking on this issue from long time , but i did not got big help. https://drive.google.com/open?id=0Bw_FXgUTZb69UXFiaEw4bnNjMms – ramakri Dec 23 '16 at 00:57

1 Answers1

0

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 to onAccept1 means that the value sent will actually be onAccept1. 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 Constant
to expression

Second one is the definition of the onAccept1 value: you miss the return keyword and have quotes around $data value that should not be there. Here is the correct value: return {"comments1": $data.comments1, "isApproved1": true};

Antoine Mottier
  • 1,185
  • 1
  • 8
  • 13