Hi,
I try to use the restapi_content 'ContextAccess-2.13.2.zip' in one of my projects but I encounter an error ' org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role'
(at org.bonitasoft.rest.context.RestContextHandleGet.doHandle(RestContextHandleGet.groovy:251))
The exception is raised in 'at org.bonitasoft.rest.context.RestContextHandleGet.doHandle(RestContextHandleGet.groovy:251)'
My case is very simple :I have a list of main objects which contains one composition and one aggregation.
My form list the main objects;
I select one and put the selected one in a processus variable and that's it.
I try to reproduce this error in the given example 'DemonstrateRestApiContext-2.7.bos' by creating in the 'testBDM' proc a simple process variable 'header1' which contains : "
def header = headerDAO.findByPersistenceId(1);
return header;
"
in this case I got an error ' Caused by: java.lang.ClassNotFoundException: br.com.bonita.ticket.Header'
I have the impression that the build of the context does not process correctly composition or aggregation relations (the call of the http://localhost:7256/bonita/portal/resource/taskInstance/testBdm/2.7/bdmGetAll/API/extension/context?taskId=40010 is on error 500).
What do you think ?
[ Update : I see in the code of the plugin that process variable in method completeValueProcessVariable of RestContextHandleGet - at the contrary of the biz variable (completeValueBdmData method of RestContextHandleGet) - are not serialized. Probably were the plugin is buggy as the reference of the object is sent in the context request. ]
Thanks for your help
Best regards
Genevieve