Multi-istantiation in collaboration scenario

Starting with the example here https://community.bonitasoft.com/project/multi-instatiated-example I tried to create a collaboration process with sending a request for a vote and receiving a multi-instance vote. How can I catch responses if I cannot define local variables for the receive task? I tried a route, but I get the following error:

02-Jan-2021 14:37:15.834 GRAVE [Bonita-Worker-1-02] org.bonitasoft.engine.log.technical.TechnicalLoggerSLF4JImpl.log THREAD_ID=239 | HOSTNAME=DESKTOP-O8RDMG8 | TENANT_ID=1 | The work [ExecuteFlowNodeWork: flowNodeInstanceId: 80158 (32, false, false, false)] failed. The failure will be handled.

02-Jan-2021 14:37:15.849 GRAVE [Bonita-Worker-1-08] org.bonitasoft.engine.log.technical.TechnicalLoggerSLF4JImpl.log THREAD_ID=246 | HOSTNAME=DESKTOP-O8RDMG8 | TENANT_ID=1 | The work [ExecuteFlowNodeWork: flowNodeInstanceId: 80157 (32, false, false, false)] failed. The failure will be handled.

02-Jan-2021 14:37:15.849 GRAVE [Bonita-Worker-1-02] org.bonitasoft.engine.log.technical.TechnicalLoggerSLF4JImpl.log THREAD_ID=239 | HOSTNAME=DESKTOP-O8RDMG8 | TENANT_ID=1 | org.bonitasoft.engine.core.process.instance.api.exceptions.SActivityStateExecutionException : "PROCESS_DEFINITION_ID=7897544181613418796 | PROCESS_NAME=BE | PROCESS_VERSION=1.0 | PROCESS_INSTANCE_ID=4038 | ROOT_PROCESS_INSTANCE_ID=4038 | FLOW_NODE_DEFINITION_ID=6818740954062614005 | FLOW_NODE_INSTANCE_ID=80158 | FLOW_NODE_NAME=Receive vote | unable to handle catch event SReceiveTaskInstance()"

org.bonitasoft.engine.core.process.instance.api.exceptions.SActivityStateExecutionException: PROCESS_DEFINITION_ID=7897544181613418796 | PROCESS_NAME=BE | PROCESS_VERSION=1.0 | PROCESS_INSTANCE_ID=4038 | ROOT_PROCESS_INSTANCE_ID=4038 | FLOW_NODE_DEFINITION_ID=6818740954062614005 | FLOW_NODE_INSTANCE_ID=80158 | FLOW_NODE_NAME=Receive vote | unable to handle catch event SReceiveTaskInstance()

at org.bonitasoft.engine.execution.StateBehaviors.registerWaitingEvent(StateBehaviors.java:389)

at org.bonitasoft.engine.execution.state.InitializingActivityWithBoundaryEventsStateImpl.afterConnectors(InitializingActivityWithBoundaryEventsStateImpl.java:102)

at org.bonitasoft.engine.execution.state.OnEnterOrOnFinishConnectorState.execute(OnEnterOrOnFinishConnectorState.java:70)

at org.bonitasoft.engine.execution.state.OnEnterOrOnFinishConnectorState.execute(OnEnterOrOnFinishConnectorState.java:33)

at org.bonitasoft.engine.execution.FlowNodeExecutorImpl.executeState(FlowNodeExecutorImpl.java:117)

at org.bonitasoft.engine.execution.FlowNodeExecutorImpl.updateState(FlowNodeExecutorImpl.java:173)

at org.bonitasoft.engine.execution.FlowNodeExecutorImpl.stepForward(FlowNodeExecutorImpl.java:156)

at org.bonitasoft.engine.execution.FlowNodeExecutorImpl.executeFlowNode(FlowNodeExecutorImpl.java:326)

at org.bonitasoft.engine.execution.work.ExecuteFlowNodeWork.work(ExecuteFlowNodeWork.java:73)

at org.bonitasoft.engine.execution.work.TxBonitaWork.lambda$work$0(TxBonitaWork.java:41)

at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.executeInTransaction(JTATransactionServiceImpl.java:286)

at org.bonitasoft.engine.execution.work.TxBonitaWork.work(TxBonitaWork.java:41)

at org.bonitasoft.engine.execution.work.LockProcessInstanceWork.work(LockProcessInstanceWork.java:68)

at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:40)

at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:40)

at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:40)

at org.bonitasoft.engine.execution.work.InSessionBonitaWork.work(InSessionBonitaWork.java:60)

at org.bonitasoft.engine.work.BonitaThreadPoolExecutor.lambda$submit$1(BonitaThreadPoolExecutor.java:131)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.base/java.lang.Thread.run(Unknown Source)

Caused by: org.bonitasoft.engine.expression.exception.SExpressionEvaluationException: org.bonitasoft.engine.core.process.instance.api.exceptions.business.data.SRefBusinessDataInstanceNotFoundException: Unable to find a reference to a business data named 'ptresponse' of process instance 4038

at org.bonitasoft.engine.expression.BusinessDataExpressionExecutorStrategy.evaluate(BusinessDataExpressionExecutorStrategy.java:77)

at org.bonitasoft.engine.expression.BusinessDataExpressionExecutorStrategy.evaluate(BusinessDataExpressionExecutorStrategy.java:89)

at org.bonitasoft.engine.expression.impl.ExpressionServiceImpl.evaluate(ExpressionServiceImpl.java:152)

at org.bonitasoft.engine.core.expression.control.api.impl.ExpressionResolverServiceImpl.evaluateExpressionsOfKind(ExpressionResolverServiceImpl.java:249)

at org.bonitasoft.engine.core.expression.control.api.impl.ExpressionResolverServiceImpl.evaluateAllExpressionsWithNoDependencies(ExpressionResolverServiceImpl.java:198)

at org.bonitasoft.engine.core.expression.control.api.impl.ExpressionResolverServiceImpl.evaluateExpressionsFlatten(ExpressionResolverServiceImpl.java:121)

at org.bonitasoft.engine.core.expression.control.api.impl.ExpressionResolverServiceImpl.evaluate(ExpressionResolverServiceImpl.java:332)

at org.bonitasoft.engine.execution.event.MessageEventHandlerStrategy.fillCorrelation(MessageEventHandlerStrategy.java:249)

at org.bonitasoft.engine.execution.event.MessageEventHandlerStrategy.handleCatchEvent(MessageEventHandlerStrategy.java:163)

at org.bonitasoft.engine.execution.event.EventsHandler.handleCatchMessage(EventsHandler.java:187)

at org.bonitasoft.engine.execution.StateBehaviors.registerWaitingEvent(StateBehaviors.java:387)

... 20 more

Caused by: org.bonitasoft.engine.core.process.instance.api.exceptions.business.data.SRefBusinessDataInstanceNotFoundException: Unable to find a reference to a business data named 'ptresponse' of process instance 4038

at org.bonitasoft.engine.core.process.instance.impl.RefBusinessDataServiceImpl.getSARefBusinessDataInstance(RefBusinessDataServiceImpl.java:205)

at org.bonitasoft.engine.business.data.RefBusinessDataRetriever.getRefBusinessDataInProcess(RefBusinessDataRetriever.java:78)

at org.bonitasoft.engine.business.data.RefBusinessDataRetriever.getRefBusinessDataUsingFlowNodeContext(RefBusinessDataRetriever.java:68)

at org.bonitasoft.engine.business.data.RefBusinessDataRetriever.getRefBusinessDataInstance(RefBusinessDataRetriever.java:57)

at org.bonitasoft.engine.expression.BusinessDataExpressionExecutorStrategy.evaluate(BusinessDataExpressionExecutorStrategy.java:69)

... 30 more

I link my bos 
https://mega.nz/file/MmgRWAIB#puGEgOr-V8dn-s6vIFjr2EWqxmNa9gFIqIx9NfYceak

Regards

 

Hello,

you can't get the content of a multi instantiation task if you don't have a local variable. A local variable is the only mechanism where you can collect data for instantiating tasks.

Your error is different: it seems you have a catch event in your process? Or you throw an event?

You have a failure task when you have a mistake in operation for example.

Please share your process.

Best,