cancel
Showing results for 
Search instead for 
Did you mean: 

Operation publication into Nuxeo Studio Failed

Benjamin_Jalon1
Elite Collaborator
Elite Collaborator

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.

1 ACCEPTED ANSWER

Benjamin_Jalon1
Elite Collaborator
Elite Collaborator

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.

View answer in original post

1 REPLY 1

Benjamin_Jalon1
Elite Collaborator
Elite Collaborator

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.