# Processor

# Processor

Instantiated Processor. Every Javascript Processor has access to its Processor instance via processor.

Example:

// Set stream output name:
let OUTPUT_PORT = processor.getOutputPort('Output');

Kind: global class

# getArguments

Returns arguments which you have configured via the UI as part of a Javascript Asset. The list of provided arguments are in JSON-Format. You enter them using the Javascript Asset editor and then retrieve them using this method.

Example:

// Get the Processor's configured arguments:
const args = processor.getArguments();

// Now access the individual arguments like this:
let myProp = args.myProp;

Kind: instance method of Processor
Returns: object - Configured arguments as a Javascript object

# getName

Get the name of the current Processor.

Example:

// Get the Processor's name:
processor.getName();

Kind: instance method of Processor
Returns: string - Processor name

# getOutputPort

Get the OutputPort information for a given output port.

Example:

// Set stream output name:
let OUTPUT_PORT = processor.getOutputPort('Output');

Kind: instance method of Processor
Returns: OutputPort - Output port instance information.

Param
portName

# logError

Logs a message with Severity.ERROR to the processor log. You can view this both via the Audit Trail in the UI and output in the process terminal output.

Example:

processor.logError('Ran into the following problem: ' + problem);

Kind: instance method of Processor

Param Description
msg Information you want to log.

# logFatal

Logs a message with Severity.FATAL to the processor log. You can view this both via the Audit Trail in the UI and output in the process terminal output.

Example:

processor.logFatal('Ran into the following problem: ' + problem);

Kind: instance method of Processor

Param Description
msg Information you want to log.

# logInfo

Logs a message with Severity.INFO to the processor log. You can view this both via the Audit Trail in the UI and output in the process terminal output.

Example:

processor.logInfo('Here is some interesting information: ' + info);

Kind: instance method of Processor

Param Description
msg Information you want to log.

# logWarning

Logs a message with Severity.WARNING to the processor log. You can view this both via the Audit Trail in the UI and output in the process terminal output.

Example:

processor.logWarning('Here is a warning: ' + warning);

Kind: instance method of Processor

Param Description
msg Information you want to log.
Last Updated: 12/20/2022, 1:35:11 PM