operation chains in Nuxeo IDE

Hi all

i was wandering if there is a mechanism like operation chains that can be used directly in java.

What i would like to do is not to call an existing operation chain from java but rather call a series of operations, like in a chain, directly in java.

This would give me the possibility to have various operations defined in java and assemble chains in java in a dynamic way, based on various conditions.

0 votes

1 answers



This code enables you to run un single operation.

CoreSession session = getCoreSession();
Map<String, Object> params = getParams();
AutomationService as = Framework.getLocalService(AutomationService.class);
OperationContext ctx = new OperationContext(session);
service.run(ctx, "anOperationId" , params);
0 votes

thanks for your answer Damien two quick questions

  1. what if I am expecting an output from the operation call, can i get it through service.run?
  2. where dose the service.run come from? Is is from AutomationService?

  1. if you know what type you operation sends in result you can do for instance DocumentModel doc = (DocumentModel) as.run(….)

  2. yes, it's a bad copy/paste. Replace service with "as" in this code