Accept Reject Scenario Not working

1
0
-1

Hi,

I have accept/reject bonita flow. In the accept scenario, I have given the below mentioned code as javascript expression.

return {"isManagerApproved":true};

In the reject scenario, I had given the below mentioned code as javascript expression.
return {"isManagerApproved":false};

But I get the below mentioned error. Pls let me know how to fix it. What am I doing wrong here. Pls let me know how to fix it.

org.bonitasoft.engine.log.technical.TechnicalLoggerSLF4JImpl log
INFO: THREAD_ID=266 | HOSTNAME=TNJ0267ALKVTAHF | TENANT_ID=1 | The user <walter.bates> has started the process instance <14> of process in version <1.0> and id <7551121355591624217>
2016-04-01 11:45:43.209 -0400 org.restlet.Component.BonitaSPRestletApplication org.restlet.resource.ServerResource doCatch

**WARNING: Exception or error caught in server resourcecom.fasterxml.jackson.core.JsonParseException: Unrecognized token 'onAccept': was expecting ('true', 'false' or 'null') ** at [Source: org.restlet.engine.io.UnclosableInputStream@3448b897; line: 1, column: 17]
at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1419)
at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:508)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._reportInvalidToken(UTF8StreamJsonParser.java:3201)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._handleUnexpectedValue(UTF8StreamJsonParser.java:2360)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._nextTokenNotInObject(UTF8StreamJsonParser.java:794)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken(UTF8StreamJsonParser.java:690)
at com.fasterxml.jackson.databind.ObjectReader._initForReading(ObjectReader.java:1346)
at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1252)

Thanks
Dhaya

Comments

Submitted by santhoshi.mullapudi on Mon, 12/12/2016 - 23:42

hey , did this problem was solved , i was stucked in the same problem , i was understand that it was with the json parsing issue.
can u please respond on this!..

1 answer

1
0
-1

JSON as I know doesn't accept just false or true

You have to specify it as 'false' or 'true' with the quotes

regards
Seán

PS: If this reply answers your question, please mark a resolved.

Notifications