cancel
Showing results for 
Search instead for 
Did you mean: 

Casting problem RunOperationOnList 5.4.2

pibou_Bouvret
Elite Collaborator
Elite Collaborator

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

1 ACCEPTED ANSWER

Benjamin_Jalon1
Elite Collaborator
Elite Collaborator

Use (String[]) instead

View answer in original post

3 REPLIES 3

Benjamin_Jalon1
Elite Collaborator
Elite Collaborator

Use (String[]) instead

pibou_Bouvret
Elite Collaborator
Elite Collaborator

It's working fine, thank you

pibou_Bouvret
Elite Collaborator
Elite Collaborator

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

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.