Document Lists...

Hi there,

I’m trying to use a document list as follows:

3 documents in the pool (d1, d2, d3)
1 documentlist docs in the pool
3 widgets all working ok for the three documents (d1, d2, d3)

in my submit action I have

list dl = new ArrayList();

dl.add(d1);
dl.add(d2);
dl.add(d3);

return dl;

where return is pointing at the docs documentlist in the pool.

But I get an error suggesting documetns cannot be mapped to a list the way I’m doing it…

So how should I as d1, d2, d3 are already documetValues…

2015-02-25 16:36:43 org.bonitasoft SEVERE: 2 Documents03getF newDocs: d1DocumentImpl{id=812, processInstanceId=19005, name='d1', author=-1, creationDate=Wed Feb 25 16:36:05 AST 2015, hasContent=true, fileName='Required_business_and_IT_capabilities.docx', contentMimeType='application/vnd.openxmlformats-officedocument.wordprocessingml.document', contentStorageId='816', url='documentDownload?fileName=Required_business_and_IT_capabilities.docx&contentStorageId=816', description='null', version='1', index=-1} 2015-02-25 16:36:43 org.bonitasoft SEVERE: 3 Documents03getF newDocs: dmyMultiDocs01DocumentImpl{id=810, processInstanceId=19005, name='dmyMultiDocs01', author=-1, creationDate=Wed Feb 25 16:36:04 AST 2015, hasContent=true, fileName='Approved_changes_to_baseline.docx', contentMimeType='application/vnd.openxmlformats-officedocument.wordprocessingml.document', contentStorageId='814', url='documentDownload?fileName=Approved_changes_to_baseline.docx&contentStorageId=814', description='null', version='1', index=-1} 2015-02-25 16:36:43 org.bonitasoft SEVERE: 4 Documents03getF newDocs: dmyMultiDocs02DocumentImpl{id=811, processInstanceId=19005, name='dmyMultiDocs02', author=-1, creationDate=Wed Feb 25 16:36:04 AST 2015, hasContent=true, fileName='Data_classification_guidelines.docx', contentMimeType='application/vnd.openxmlformats-officedocument.wordprocessingml.document', contentStorageId='815', url='documentDownload?fileName=Data_classification_guidelines.docx&contentStorageId=815', description='null', version='1', index=-1} 2015-02-25 16:36:43 org.bonitasoft SEVERE: 5 Documents03getF newDocs: Trace End 2015-02-25 16:36:43 org.bonitasoft.console.common.server.utils.BPMEngineAPIUtil SEVERE: A error occured while executing the command. org.bonitasoft.engine.command.CommandExecutionException: USERNAME=walter.bates | org.bonitasoft.engine.command.SCommandExecutionException: Error executing command 'Map ExecuteActionsAndTerminateTask(List, Map, long activityInstanceId)' at org.bonitasoft.engine.api.impl.CommandAPIImpl.executeCommand(CommandAPIImpl.java:214) at org.bonitasoft.engine.api.impl.CommandAPIImpl.execute(CommandAPIImpl.java:184) at org.bonitasoft.engine.api.impl.CommandAPIImpl.execute(CommandAPIImpl.java:173) at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:363) at org.bonitasoft.engine.api.impl.ServerAPIImpl$1.call(ServerAPIImpl.java:332) at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.executeInTransaction(JTATransactionServiceImpl.java:288) at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPIInTransaction(ServerAPIImpl.java:339) at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:274) at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeMethod(ServerAPIImpl.java:128) at org.bonitasoft.engine.api.impl.ClientInterceptor.invoke(ClientInterceptor.java:88) at com.sun.proxy.$Proxy16.execute(Unknown Source) at org.bonitasoft.console.common.server.utils.BPMEngineAPIUtil.executeCommand(BPMEngineAPIUtil.java:186) at org.bonitasoft.forms.server.api.impl.FormWorkflowAPIImpl.executeActionsAndTerminate(FormWorkflowAPIImpl.java:354) at org.bonitasoft.forms.server.provider.impl.FormServiceProviderImpl.executeActions(FormServiceProviderImpl.java:994) at org.bonitasoft.forms.server.FormsServlet.executeActions(FormsServlet.java:784) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:561) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208) at org.bonitasoft.forms.server.FormsServlet.processCall(FormsServlet.java:128) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248) at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:646) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.bonitasoft.console.common.server.login.filter.NoCacheFilter.doFilter(NoCacheFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.bonitasoft.console.security.SessionFixationValve.invoke(SessionFixationValve.java:77) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source) Caused by: org.bonitasoft.engine.command.SCommandExecutionException: Error executing command 'Map ExecuteActionsAndTerminateTask(List, Map, long activityInstanceId)' at org.bonitasoft.engine.external.web.forms.ExecuteActionsAndTerminateTask.execute(ExecuteActionsAndTerminateTask.java:87) at org.bonitasoft.engine.external.web.forms.ExecuteActionsAndTerminateTask.execute(ExecuteActionsAndTerminateTask.java:57) at org.bonitasoft.engine.api.impl.CommandAPIImpl.executeCommand(CommandAPIImpl.java:212) ... 51 more Caused by: org.bonitasoft.engine.core.operation.exception.SOperationExecutionException: Document operation only accepts an expression returning a list of DocumentValue at org.bonitasoft.engine.operation.DocumentListLeftOperandHandler.toCheckedList(DocumentListLeftOperandHandler.java:80) at org.bonitasoft.engine.operation.DocumentListLeftOperandHandler.update(DocumentListLeftOperandHandler.java:61) at org.bonitasoft.engine.core.operation.impl.OperationServiceImpl.updateLeftOperands(OperationServiceImpl.java:127) at org.bonitasoft.engine.core.operation.impl.OperationServiceImpl.execute(OperationServiceImpl.java:95) at org.bonitasoft.engine.external.web.forms.ExecuteActionsAndTerminateTask.updateActivityInstanceVariables(ExecuteActionsAndTerminateTask.java:130) at org.bonitasoft.engine.external.web.forms.ExecuteActionsAndTerminateTask.execute(ExecuteActionsAndTerminateTask.java:79) ... 53 more

2015-02-25 16:36:43 org.bonitasoft.forms.server.provider.impl.FormServiceProviderImpl
SEVERE: Username<walter.bates> Form<Documents03getF–2.0–Step1$entry> Submitted Fields<File2 (java.io.File) => E:\Bonita\Bonita 642\BonitaBPMCommunity-6.4.2-00-Scratch\workspace\tomcat\bonita\client\tenants\1\tmp\tmp_405212074084300264.pdf ; d11 (java.io.File) => E:\Bonita\Bonita 642\BonitaBPMCommunity-6.4.2-00-Scratch\workspace\tomcat\bonita\client\tenants\1\tmp\tmp_5439146689269226646.docx ; File1 (java.io.File) => E:\Bonita\Bonita 642\BonitaBPMCommunity-6.4.2-00-Scratch\workspace\tomcat\bonita\client\tenants\1\tmp\tmp_2691019380004653419.docx ; Text1 (java.lang.String) => 19005 ; > Task Error while communicating with the engine.
org.bonitasoft.console.common.server.utils.BPMEngineException: A error occured while executing the command.
at org.bonitasoft.console.common.server.utils.BPMEngineAPIUtil.executeCommand(BPMEngineAPIUtil.java:204)
at org.bonitasoft.forms.server.api.impl.FormWorkflowAPIImpl.executeActionsAndTerminate(FormWorkflowAPIImpl.java:354)
at org.bonitasoft.forms.server.provider.impl.FormServiceProviderImpl.executeActions(FormServiceProviderImpl.java:994)
at org.bonitasoft.forms.server.FormsServlet.executeActions(FormsServlet.java:784)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:561)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
at org.bonitasoft.forms.server.FormsServlet.processCall(FormsServlet.java:128)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.bonitasoft.console.common.server.login.filter.NoCacheFilter.doFilter(NoCacheFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.bonitasoft.console.security.SessionFixationValve.invoke(SessionFixationValve.java:77)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)

1 Like