public interface JavaNode
| Modifier and Type | Method and Description |
|---|---|
Message[] |
process(PASContext pasContext,
Message message)
This method is called during the Flow execution in the PDF Automation
Server.
|
Message[] process(PASContext pasContext, Message message) throws FlowException
Payload
content, the return Message array can just contain the same Message
passed to this method. Otherwise, if the implementation will modify the
Payload content (ie. create new data to be processed in the
Flow), a new Message along with a new Payload needs to be
returned instead.
In order to create a new Payload, a File is required. If
the File should be deleted when the Flow completes processing of
the Message, the File should be created using
PASContext.createTempFile(String, String).
File output = pasContext.createTempFile("prefix", ".ext");
// TODO - write new data to the output
Payload payload = pasContext.createPayload(output);
Message newMessage = message.deriveMessage(payload);
return new Message[]{ newMessage };
pasContext - the pasContextmessage - the Message for the current process.Messages to continue processing through the
Flow.FlowExceptionMessage.getPayload(),
PASContext.createPayload(File),
Message.deriveMessage(Payload)