Créer un tableau "enfant"

1
0
-1

Xn2Hf1Bonjour,

J'ai commencé à utilisé Bonita il y a peu de temps et j'ai un problème que je n'arrive pas a résoudre

J'essaye de créer un system pour ajouter un evenement dans un calendrier google grace a bonita.

Pour l'instant j'arrive a tout récupérer, et tout fonctionnait bien jusqu'à ce que ce matin j'essaye d'implementer la gestion de plusieurs personnes ( Pouvoir inviter des gens dans des évènements).

Pour gérer ça j'ai créer un sous tableau avec nom et email pour que je puisse rajouter plusieurs colaborateurs

https://freeimage.host/i/Xn2Hf1

https://freeimage.host/i/Xn2Hf1
https://freeimage.host/i/Xn23Ja
https://freeimage.host/i/Xn2F5J
https://freeimage.host/i/Xn2KOv
https://freeimage.host/i/Xn2fbR

Sauf que voila, j'ai une erreur quand j'essaye d'ajouter des collaborateur

25-May-2022 13:56:56.778 INFOS [http-nio-35591-exec-6] org.bonitasoft.engine.log.technical.TechnicalLoggerSLF4JImpl.log THREAD_ID=93 | HOSTNAME=MacBook-Air-de-Thomas.local | TENANT_ID=1 | The user has executed the task [name = , display name = , id = <40002>, parent process instance = <2001>, root process instance = <2001>, process definition = <4989875783672726058>] with task inputs: {thomPlayground={colaborator=[{name=Hello world, email=XXX.XXXX@XX.XX}]}}

25-May-2022 13:56:58.655 GRAVE [Bonita-Worker-1-04] org.bonitasoft.engine.log.technical.TechnicalLoggerSLF4JImpl.log THREAD_ID=145 | HOSTNAME=MacBook-Air-de-Thomas.local | TENANT_ID=1 | The work [ExecuteFlowNodeWork: flowNodeInstanceId: 40002 (4, true, false, false)] failed. The failure will be handled.

25-May-2022 13:56:58.735 GRAVE [Bonita-Worker-1-04] org.bonitasoft.engine.log.technical.TechnicalLoggerSLF4JImpl.log THREAD_ID=145 | HOSTNAME=MacBook-Air-de-Thomas.local | TENANT_ID=1 | org.bonitasoft.engine.core.process.instance.api.exceptions.SActivityStateExecutionException : "PROCESS_DEFINITION_ID=4989875783672726058 | PROCESS_NAME=Pool | PROCESS_VERSION=1.0 | PROCESS_INSTANCE_ID=2001 | ROOT_PROCESS_INSTANCE_ID=2001 | FLOW_NODE_DEFINITION_ID=7732522999302289229 | FLOW_NODE_INSTANCE_ID=40002 | FLOW_NODE_NAME=Add Colabs | org.bonitasoft.engine.core.operation.exception.SOperationExecutionException: org.bonitasoft.engine.expression.exception.SExpressionEvaluationException: Groovy script throws an exception of type class java.lang.IllegalArgumentException with message = argument type mismatch

Expression : SExpressionImpl [name=technicianOnSiteList(), content=def colaboratorList = []

//For each item collected in multiple input

thomPlayground?.colaborator.each{

//Add ServiceTechnician instance

thomPlayground?.colaborator.add = new ats.model.ColaboratorInvited()

colaboratorList.name = thomPlayground.colaborator.name

colaboratorList.email = thomPlayground.colaborator.email

return colaboratorList

}

return colaboratorList, returnType=java.util.List, dependencies=[SExpressionImpl [name=thomPlayground, content=thomPlayground, returnType=java.util.Map, dependencies=[], expressionKind=ExpressionKind [interpreter=NONE, type=TYPE_CONTRACT_INPUT]]], expressionKind=ExpressionKind [interpreter=GROOVY, type=TYPE_READ_ONLY_SCRIPT]]"

org.bonitasoft.engine.core.process.instance.api.exceptions.SActivityStateExecutionException: PROCESS_DEFINITION_ID=4989875783672726058 | PROCESS_NAME=Pool | PROCESS_VERSION=1.0 | PROCESS_INSTANCE_ID=2001 | ROOT_PROCESS_INSTANCE_ID=2001 | FLOW_NODE_DEFINITION_ID=7732522999302289229 | FLOW_NODE_INSTANCE_ID=40002 | FLOW_NODE_NAME=Add Colabs | org.bonitasoft.engine.core.operation.exception.SOperationExecutionException: org.bonitasoft.engine.expression.exception.SExpressionEvaluationException: Groovy script throws an exception of type class java.lang.IllegalArgumentException with message = argument type mismatch

Expression : SExpressionImpl [name=technicianOnSiteList(), content=def colaboratorList = []

//For each item collected in multiple input

thomPlayground?.colaborator.each{

//Add ServiceTechnician instance

thomPlayground?.colaborator.add = new ats.model.ColaboratorInvited()

colaboratorList.name = thomPlayground.colaborator.name

colaboratorList.email = thomPlayground.colaborator.email

return colaboratorList

}

return colaboratorList, returnType=java.util.List, dependencies=[SExpressionImpl [name=thomPlayground, content=thomPlayground, returnType=java.util.Map, dependencies=[], expressionKind=ExpressionKind [interpreter=NONE, type=TYPE_CONTRACT_INPUT]]], expressionKind=ExpressionKind [interpreter=GROOVY, type=TYPE_READ_ONLY_SCRIPT]]

at org.bonitasoft.engine.execution.StateBehaviors.executeOperations(StateBehaviors.java:500)

at org.bonitasoft.engine.execution.state.ReadyActivityState.onEnterToOnFinish(ReadyActivityState.java:48)

at org.bonitasoft.engine.execution.state.OnEnterAndFinishConnectorState.execute(OnEnterAndFinishConnectorState.java:74)

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

at org.bonitasoft.engine.execution.FlowNodeExecutorImpl.executeStateAndReturnNextState(FlowNodeExecutorImpl.java:171)

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

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

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

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

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

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.core.operation.exception.SOperationExecutionException: org.bonitasoft.engine.expression.exception.SExpressionEvaluationException: Groovy script throws an exception of type class java.lang.IllegalArgumentException with message = argument type mismatch

Expression : SExpressionImpl [name=technicianOnSiteList(), content=def colaboratorList = []

//For each item collected in multiple input

thomPlayground?.colaborator.each{

//Add ServiceTechnician instance

thomPlayground?.colaborator.add = new ats.model.ColaboratorInvited()

colaboratorList.name = thomPlayground.colaborator.name

colaboratorList.email = thomPlayground.colaborator.email

return colaboratorList

}

return colaboratorList, returnType=java.util.List, dependencies=[SExpressionImpl [name=thomPlayground, content=thomPlayground, returnType=java.util.Map, dependencies=[], expressionKind=ExpressionKind [interpreter=NONE, type=TYPE_CONTRACT_INPUT]]], expressionKind=ExpressionKind [interpreter=GROOVY, type=TYPE_READ_ONLY_SCRIPT]]

at org.bonitasoft.engine.core.operation.impl.OperationServiceImpl.evaluateRightOperandExpression(OperationServiceImpl.java:225)

at org.bonitasoft.engine.core.operation.impl.OperationServiceImpl.calculateRightOperandValue(OperationServiceImpl.java:130)

at org.bonitasoft.engine.core.operation.impl.OperationServiceImpl.executeOperators(OperationServiceImpl.java:111)

at org.bonitasoft.engine.core.operation.impl.OperationServiceImpl.execute(OperationServiceImpl.java:98)

at org.bonitasoft.engine.core.operation.impl.OperationServiceImpl.execute(OperationServiceImpl.java:82)

at org.bonitasoft.engine.execution.StateBehaviors.executeOperations(StateBehaviors.java:497)

... 19 more

Caused by: org.bonitasoft.engine.expression.exception.SExpressionEvaluationException: Groovy script throws an exception of type class java.lang.IllegalArgumentException with message = argument type mismatch

Expression : SExpressionImpl [name=technicianOnSiteList(), content=def colaboratorList = []

//For each item collected in multiple input

thomPlayground?.colaborator.each{

//Add ServiceTechnician instance

thomPlayground?.colaborator.add = new ats.model.ColaboratorInvited()

colaboratorList.name = thomPlayground.colaborator.name

colaboratorList.email = thomPlayground.colaborator.email

return colaboratorList

}

return colaboratorList, returnType=java.util.List, dependencies=[SExpressionImpl [name=thomPlayground, content=thomPlayground, returnType=java.util.Map, dependencies=[], expressionKind=ExpressionKind [interpreter=NONE, type=TYPE_CONTRACT_INPUT]]], expressionKind=ExpressionKind [interpreter=GROOVY, type=TYPE_READ_ONLY_SCRIPT]]

at org.bonitasoft.engine.expression.impl.GroovyScriptExpressionExecutorCacheStrategy.evaluate(GroovyScriptExpressionExecutorCacheStrategy.java:169)

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

at org.bonitasoft.engine.core.expression.control.api.impl.ExpressionResolverServiceImpl.evaluateExpressionWithResolvedDependencies(ExpressionResolverServiceImpl.java:234)

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

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

at org.bonitasoft.engine.core.operation.impl.OperationServiceImpl.evaluateRightOperandExpression(OperationServiceImpl.java:218)

... 24 more

Caused by: java.lang.IllegalArgumentException: argument type mismatch

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.base/java.lang.reflect.Method.invoke(Unknown Source)

at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)

at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)

at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:2726)

at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:3785)

at org.codehaus.groovy.runtime.InvokerHelper.setProperty(InvokerHelper.java:217)

at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.setProperty(ScriptBytecodeAdapter.java:497)

at BScript2$_run_closure1.doCall(BScript2.groovy:5)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.base/java.lang.reflect.Method.invoke(Unknown Source)

at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)

at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)

at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)

at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)

at groovy.lang.Closure.call(Closure.java:420)

at groovy.lang.Closure.call(Closure.java:436)

at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2125)

at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2110)

at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2151)

at org.codehaus.groovy.runtime.dgm$163.invoke(Unknown Source)

at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)

at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)

at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)

at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)

at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)

at BScript2.run(BScript2.groovy:3)

at org.bonitasoft.engine.expression.impl.GroovyScriptExpressionExecutorCacheStrategy.evaluate(GroovyScriptExpressionExecutorCacheStrategy.java:145)

... 29 more

Merci d'avance

Cordialement

Thomas

No answers yet.
Notifications