Interface INodeThrewExceptionBuilder
- All Superinterfaces:
org.apache.commons.lang3.builder.Builder<NodeThrewException>,IAbruptCompletionExceptionBuilder<INodeThrewExceptionBuilder,,NodeThrewException> ICompletionResultBuilder<INodeThrewExceptionBuilder,NodeThrewException>
public interface INodeThrewExceptionBuilder
extends ICompletionResultBuilder<INodeThrewExceptionBuilder,NodeThrewException>, IAbruptCompletionExceptionBuilder<INodeThrewExceptionBuilder,NodeThrewException>
Builder for the exception thrown by a node when it encounters an error upon execution.
- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionalways(IValueCreator<?> alwaysValue) Sets (replaces) the value made available by the node regardless of whether it was executed successfully (or threw an exception).default INodeThrewExceptionBuilderSets (replaces) the value made available by the node regardless of whether it was executed successfully (or threw an exception).default <T> INodeThrewExceptionBuildererror(String errorCode, Class<T> memberClass, IValueCreator<T> valueCreator) Sets (replaces) the error type and value describing the exception in more detail.default <T> INodeThrewExceptionBuilderSets (replaces) the error type and value describing the exception in more detail.error(Consumer<IUnionValueBuilder<String>> errorValue) Sets (replaces) the error type and value describing the exception in more detail.file(IWorkflowFileValue fileValue) Sets (replaces) the files made available by the plugin when it was executed.default INodeThrewExceptionBuilderSets (replaces) the files made available by the plugin when it was executed.default INodeThrewExceptionBuilderSets (replaces) the files made available by the plugin when it was executed.Methods inherited from interface org.apache.commons.lang3.builder.Builder
buildMethods inherited from interface de.xima.fc.interfaces.workflow.params.ICompletionResultBuilder
attachment, attachment, attachment
-
Method Details
-
error
Sets (replaces) the error type and value describing the exception in more detail. Each node may specify multiple error types. For each error type, it may specify which value are made available when that error occurs (Note that this corresponds to Java exceptions with additional fields containing details about the exception.)- Parameters:
errorValue- Function that takes a value builder to create the error value.- Returns:
- This builder for chaining methods calls.
-
error
default <T> INodeThrewExceptionBuilder error(String errorCode, Class<T> memberClass, IValueCreator<T> valueCreator) Sets (replaces) the error type and value describing the exception in more detail. Each node may specify multiple error types. For each error type, it may specify which value are made available when that error occurs (Note that this corresponds to Java exceptions with additional fields containing details about the exception.)- Type Parameters:
T- Type of the value for the error type.- Parameters:
errorCode- String with the error type.memberClass- Type of the value for that error type.valueCreator- Function that takes a value builder to create the error value.- Returns:
- This builder for chaining methods calls.
-
error
Sets (replaces) the error type and value describing the exception in more detail. Each node may specify multiple error types. For each error type, it may specify which value are made available when that error occurs (Note that this corresponds to Java exceptions with additional fields containing details about the exception.)- Type Parameters:
T- Type of the value for the error type.- Parameters:
errorCode- String with the error type.value- Value with details about the error.- Returns:
- This builder for chaining methods calls.
-
cause
- Specified by:
causein interfaceIAbruptCompletionExceptionBuilder<INodeThrewExceptionBuilder,NodeThrewException> - Parameters:
cause- The cause that resulted in the returning exception. Since a return is usually intended, you should not have to call this method in most cases.- Returns:
- this for chaining.
-
message
- Specified by:
messagein interfaceIAbruptCompletionExceptionBuilder<INodeThrewExceptionBuilder,NodeThrewException> - Parameters:
message- The cause that resulted in the returning exception. Since a return is usually intended, you should not have to call this method in most cases.- Returns:
- this for chaining.
-
always
Description copied from interface:ICompletionResultBuilderSets (replaces) the value made available by the node regardless of whether it was executed successfully (or threw an exception). When this method is not called, the default value from theIExecutionResultDescriptor.getAlwaysValueDescriptor(IValueDescriptorFactory)is used. When this method is called multiple times, only the value supplied by the last invocation is used.For example, when you wish to return a record with two properties:
// Corresponds to the JSON object {"foo": "bar", "baz": 42} builder.success(b -> b.asRecord().property("foo", "bar").property("baz", 42);- Specified by:
alwaysin interfaceICompletionResultBuilder<INodeThrewExceptionBuilder,NodeThrewException> - Parameters:
alwaysValue- Function that takes a value builder to create the value.- Returns:
- This builder for chaining methods calls.
-
file
Description copied from interface:ICompletionResultBuilderSets (replaces) the files made available by the plugin when it was executed. When this method is not called, the default value from theIExecutionResultDescriptor.getFileValueDescriptor()is used. When this method is called multiple times, only the value supplied by the last invocation is used.- Specified by:
filein interfaceICompletionResultBuilder<INodeThrewExceptionBuilder,NodeThrewException> - Parameters:
fileValue- File or files supplied by the workflow node.- Returns:
- This builder for chaining methods calls.
-
always
Description copied from interface:ICompletionResultBuilderSets (replaces) the value made available by the node regardless of whether it was executed successfully (or threw an exception). When this method is not called, the default value from theIExecutionResultDescriptor.getAlwaysValueDescriptor(IValueDescriptorFactory)is used. When this method is called multiple times, only the value supplied by the last invocation is used.- Specified by:
alwaysin interfaceICompletionResultBuilder<INodeThrewExceptionBuilder,NodeThrewException> - Parameters:
alwaysValue- Value made available by the plugin when it was executed.- Returns:
- This builder for chaining methods calls.
-
file
Description copied from interface:ICompletionResultBuilderSets (replaces) the files made available by the plugin when it was executed. When this method is not called, the default value from theIExecutionResultDescriptor.getFileValueDescriptor()is used. When this method i@Override s called multiple times, only the value supplied by the last invocation is used.- Specified by:
filein interfaceICompletionResultBuilder<INodeThrewExceptionBuilder,NodeThrewException> - Parameters:
files- File or files supplied by the plugin.- Returns:
- This builder for chaining methods calls.
-
file
Description copied from interface:ICompletionResultBuilderSets (replaces) the files made available by the plugin when it was executed. When this method is not called, the default value from theIExecutionResultDescriptor.getFileValueDescriptor()is used. When this method is called multiple times, only the value supplied by the last invocation is used.- Specified by:
filein interfaceICompletionResultBuilder<INodeThrewExceptionBuilder,NodeThrewException> - Parameters:
files- File or files supplied by the plugin.- Returns:
- This builder for chaining methods calls.
-