Problem adding participants to a workflow

Hello.

I am trying to start a workflow (serial or parallel), but when I am assigning the participants, I get an error, and the workflow doesn't start.

In the log I can see the following messages:


javax.servlet.ServletException: On requestURL ...
at org.nuxeo.ecm.platform.ui.web.rest.FancyURLFilter.doFilter(FancyURLFilter.java:152)
...
Caused by: javax.servlet.ServletException: [Error: null pointer: WorkflowVariables["participants"][(int)WorkflowVariables.index]]
[Near : {... WorkflowVariables["participant ....}]
             ^
[Line: 1, Column: 1]
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)
...
Caused by: javax.faces.el.EvaluationException: [Error: null pointer: WorkflowVariables["participants"][(int)WorkflowVariables.index]]
[Near : {... WorkflowVariables["participant ....}]
             ^
[Line: 1, Column: 1]
    at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:101)
...
Caused by: [Error: null pointer: WorkflowVariables["participants"][(int)WorkflowVariables.index]]
[Near : {... WorkflowVariables["participant ....}]
             ^
[Line: 1, Column: 1]
    at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:427)
...
Caused by: java.lang.NullPointerException
    at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getCollectionProperty(ReflectiveAccessorOptimizer.java:774)

What can be the problem?

Thanks in advance!

Best regards.

0 votes

1 answers

1841 views

ANSWER

Hi!

Can you add your entire scripts in code format to have an example of what you're trying to execute?

Thanks

01/12/2015



This issue should have been fixed with HF1. I'm running into the same problem still. Maybe try one of these variations:

WorkflowVariables[“participants”][(int)WorkflowVariables.index]]

WorkflowVariables[“participants”][WorkflowVariables[“index”]]

WorkflowVariables[“participants”][(int)WorkflowVariables[“index”]]

None of them worked for me, but they might work for you. My issue is from the brackets around the index workflow variable expression, the expression itself works fine.

0 votes



Instead of brackets have you tried WorkflowVariables["participants"].get(WorkflowVariables["index"]) or variations thereof?
02/03/2015

I think for our purposes and how the workflow does its indexing/counting, the expression has to be of the form: string[#], so a participant's name followed immediately by [index], in brackets. Here's the error I got when I tried that above expression:

[Error: unable to resolve method: [Ljava.lang.String;.get() [arglength=1]] [Near : {… WorkflowVariables["participant ….}]

02/03/2015