Casting problem RunOperationOnList 5.4.2

Trying to backport the RunOperationOnList automation operation to 5.4.2, i m meeting a casting problem :

for (Object value : (Collection<?>) ctx.get(listName))

raises a Ljava.lang.String; cannot be cast to java.util.Collection Exception.

it is used this way in my chain :

SetContextVariable : reviewers = @{Document["doc_adm_ws:reviewers"]}
RunChain : void (operation), reviewers, item

“doc_adm_ws reviewers” being a multi-valued field

0 votes

3 answers



Use (String[]) instead

1 votes

One year later … I'm into upgrading Nuxeo to 5.5 HF18 and of course i'm having the same problem. Isn't there a workaround or do i have to create another operation as i did in 5.4.2 ?

EDIT : i'd like to use RUN SCRIPT in order to cast my data

0 votes

It's working fine, thank you

0 votes