Are the input contexts of workflow nodes the same as the document context?

Hi again,

I've been working on a custom operation. Outside of a workflow, it works great. I attached to a button in the context tools, and it ran. Inside of the workflow, when attached to a form button or to the output operation of a node, Nuxeo throws an error. The display changes to “Page not Found” and I get this (pastebin) error.

I thought it was related to an error in my original operation, so, I wrote a simple operation “noop”:

public class noop {
  public static final String ID = "noop";
  @Context
  protected OperationContext ctx;
  public DocumentModel run(DocumentModel input) throws ClientException  {
     return input;
  }
}

and recieved the same error. Do I need to do something differently? The bundles are in place, the operation was uploaded to Studio. I'm using Nuxeo 5.6 and Eclipse Juno.

0 votes

1 answers

1567 views

ANSWER



Hi,

I will need the complete stacktrace to help you. By “attached to a form button” you mean the chain bounded to a workflow transition? What is the first operation of your chain? Note that in the chains called from the workflow ( as input, output or chains related to transitions) you don't have to use FetchContextDocuments operation. The documents following the workflow are automatically set as input for these chains when they are invoked by the workflow engine.

0 votes