Я использую Bonita 7.7.4.Groovy скрипт может быть использован в Bonita.Я написал ниже скрипт, и он работал, но когда поле 'status' не закрывается, возникает ошибка.
String status = apiAccessor.identityAPI.getCustomUserInfo(startedById, 0, 1000).stream().filter({ row ->
"status" == row.getDefinition().getName()
}).findFirst().orElse("").getValue();
error:
Possible solutions: getClass(), getAt(int), getAt(groovy.lang.Range), getAt(java.lang.String), getAt(groovy.lang.Range), getAt(java.util.Collection) ( ). ( )
at org.bonitasoft.engine.execution.ProcessExecutorImpl.start(ProcessExecutorImpl.java:839)
at org.bonitasoft.engine.execution.ProcessExecutorImpl.start(ProcessExecutorImpl.java:782)
at org.bonitasoft.engine.api.impl.ProcessStarter.start(ProcessStarter.java:132)
at org.bonitasoft.engine.api.impl.ProcessStarter.start(ProcessStarter.java:103)
at ... 44 more. ( )
at Caused by: org.bonitasoft.engine.expression.exception.SExpressionEvaluationException.: groovy.lang.MissingMethodException: No signature of method: java.lang.String.getValue() is applicable for argument types: () values: []
Possible solutions: getClass(), getAt(int), getAt(groovy.lang.Range), getAt(java.lang.String), getAt(groovy.lang.Range), getAt(java.util.Collection) ( ). ( )
at org.bonitasoft.engine.expression.impl.GroovyScriptExpressionExecutorCacheStrategy.evaluate(GroovyScriptExpressionExecutorCacheStrategy.java:147)
at org.bonitasoft.engine.expression.impl.ExpressionServiceImpl.evaluate(ExpressionServiceImpl.java:86)
at org.bonitasoft.engine.core.expression.control.api.impl.ExpressionResolverServiceImpl.evaluateExpressionWithResolvedDependencies(ExpressionResolverServiceImpl.java:213)
at org.bonitasoft.engine.core.expression.control.api.impl.ExpressionResolverServiceImpl.evaluateExpressionsFlatten(ExpressionResolverServiceImpl.java:120)
at org.bonitasoft.engine.core.expression.control.api.impl.ExpressionResolverServiceImpl.evaluate(ExpressionResolverServiceImpl.java:83)
at org.bonitasoft.engine.execution.ProcessExecutorImpl.initializeSingleBusinessData(ProcessExecutorImpl.java:448)
at org.bonitasoft.engine.execution.ProcessExecutorImpl.initializeBusinessData(ProcessExecutorImpl.java:435)
at org.bonitasoft.engine.execution.ProcessExecutorImpl.initialize(ProcessExecutorImpl.java:387)
at org.bonitasoft.engine.execution.ProcessExecutorImpl.start(ProcessExecutorImpl.java:824)
at ... 47 more. ( )
at Caused by: groovy.lang.MissingMethodException.: No signature of method: java.lang.String.getValue() is applicable for argument types: () values: []
Possible solutions: getClass(), getAt(int), getAt(groovy.lang.Range), getAt(java.lang.String), getAt(groovy.lang.Range), getAt(java.util.Collection) ( ). ( )
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58)
at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:49)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at BScript83.run(BScript83.groovy:47)
at org.bonitasoft.engine.expression.impl.GroovyScriptExpressionExecutorCacheStrategy.evaluate(GroovyScriptExpressionExecutorCacheStrategy.java:141)
at ... 55 more. ( )