Operation publication into Nuxeo Studio Failed

Hi,

I created a new operation through Nuxeo IDE with Parameters with Nuxeo Studio as following:

@Operation(id = MyOperation.ID, category = Constants.CAT_SERVICES, label = "My Operation", description = "")
public class MyOperation {

   public static final String ID = "Relations.CreateRelation";

   @Context
   protected CoreSession session;

   @Param(name = "aStringParameter", required=false, values = "MyDefaultValueProposedInStudio")
   protected boolean outgoing = "MyDefaultValueProposedInStudio";

   @OperationMethod(collector = DocumentModelCollector.class)
   public DocumentModel run(DocumentModel doc) throws Exception {
   }
}

I had an ugly message from IDE that tells me:

Cannot introspect operation MyOperation.java
Cannot extract annotations values in ....

What is my mistake, please.

0 votes

1 answers

1797 views

ANSWER



Hi me,

You are near of a perfect operation, for a short answer, here is the solution:

@Param(name = "aStringParameter", required=false, values = {"MyDefaultValueProposedInStudio"})
protected boolean outgoing = "MyDefaultValueProposedInStudio";

For a longer and full answer see here.

0 votes