Description:

The DebugFlow processor aids testing and debugging the FlowFile Framework by allowing various responses to be explicitly triggered in response to the receipt of a FlowFile or a timer event without a FlowFile if using timer or cron based scheduling. It can force responses needed to exercise or test various failure modes that can occur when a processor runs.

Tags:

test, debug, processor, utility, flow, FlowFile

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values.

Name Default Value Allowable Values Description
FlowFile Success Iterations 1 Number of FlowFiles to forward to success relationship.
FlowFile Failure Iterations 0 Number of FlowFiles to forward to failure relationship.
FlowFile Rollback Iterations 0 Number of FlowFiles to roll back (without penalty).
FlowFile Rollback Yield Iterations 0 Number of FlowFiles to roll back and yield.
FlowFile Rollback Penalty Iterations 0 Number of FlowFiles to roll back with penalty.
FlowFile Exception Iterations 0 Number of FlowFiles to throw exception.
FlowFile Exception Class java.lang.RuntimeException Exception class to be thrown (must extend java.lang.RuntimeException).
No FlowFile Skip Iterations 1 Number of times to skip onTrigger if no FlowFile.
No FlowFile Exception Iterations 0 Number of times to throw NPE exception if no FlowFile.
No FlowFile Yield Iterations 0 Number of times to yield if no FlowFile.
No FlowFile Yield Iterations 0 Number of times to yield if no FlowFile.
No FlowFile Exception Class java.lang.RuntimeException Exception class to be thrown if no FlowFile (must extend java.lang.RuntimeException).
Write Iterations 0 Number of times to write to the FlowFile
Content Size 1 KB The number of bytes to write each time that the FlowFile is written to
@OnScheduled Pause Time 0 sec Specifies how long the processor should sleep in the @OnScheduled method, so that the processor can be forced to take a long time to start up
Fail When @OnScheduled called false *true *false Specifies whether or not the Processor should throw an Exception when the methods annotated with @OnScheduled are called
@OnUnscheduled Pause Time 0 sec Specifies how long the processor should sleep in the @OnUnscheduled method, so that the processor can be forced to take a long time to respond when user clicks stop
Fail When @OnUnscheduled called false Specifies whether or not the Processor should throw an Exception when the methods annotated with @OnUnscheduled are called
@OnStopped Pause Time 0 sec Specifies how long the processor should sleep in the @OnStopped method, so that the processor can be forced to take a long time to shutdown
Fail When @OnStopped called false * true
* false
Specifies whether or not the Processor should throw an Exception when the methods annotated with @OnStopped are called

Relationships:

Name Description
FlowFiles processed successfully. FlowFiles that failed to process.

Reads Attributes:

None specified.

Writes Attributes:

None specified.

State management:

This component does not store state.

Summary:

When triggered, the processor loops through the appropriate response list (based on whether or not it received a FlowFile). A response is produced the configured number of times for each pass through its response list, as long as the processor is running.

Triggered by a FlowFile, the processor can produce the following responses.

1.transfer FlowFile to success relationship.

2.transfer FlowFile to failure relationship.

3.rollback the FlowFile without penalty.

4.rollback the FlowFile and yield the context.

5.rollback the FlowFile with penalty.

6.throw an exception.

Triggered without a FlowFile, the processor can produce the following responses.

1.do nothing and return.

2.throw an exception.

3.yield the context.