Interface ICompletionResultBuilder<Builder,Result>
-
- Type Parameters:
Builder
- The type of the builder returned by the various builder methods.Result
- The type of the result being built by the builder.
- All Superinterfaces:
org.apache.commons.lang3.builder.Builder<Result>
- All Known Subinterfaces:
IAbruptCompletionExceptionBuilder<TBuilder,TResult>
,INodeReturnedExceptionBuilder
,INodeThrewExceptionBuilder
,INodeTransferredControlExceptionBuilder
,INormalCompletionResultBuilder
,ISuccessResultBuilder<TBuilder,TResult>
public interface ICompletionResultBuilder<Builder,Result> extends org.apache.commons.lang3.builder.Builder<Result>
Builder for the result of a node when it was executed, either successfully or abruptly.- Since:
- 7.0.7
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Builder
always(IValueCreator alwaysValue)
Sets (replaces) the value made available by the node regardless of whether it was executed successfully (or threw an exception).default Builder
always(Object alwaysValue)
Sets (replaces) the value made available by the node regardless of whether it was executed successfully (or threw an exception).default Builder
attachment(Attachment... attachments)
Sets (replaces) the attachments created by the node when it was executed.Builder
attachment(IWorkflowAttachmentValue attachmentValue)
Sets (replaces) the attachments created by the node when it was executed.default Builder
attachment(Iterable<Attachment> attachments)
Sets (replaces) the attachments created by the node when it was executed.Builder
file(IFileValueCreator creator)
Sets (replaces) the files made available by the node when it was executed.default Builder
file(IWorkflowFileValue fileValue)
Sets (replaces) the files made available by the node when it was executed.default Builder
file(File... files)
Sets (replaces) the files made available by the node when it was executed, using thedefault file key
.default Builder
file(Iterable<File> files)
Sets (replaces) the files made available by the node when it was executed, using thedefault file key
.default Builder
file(String key, File... files)
Sets (replaces) the files made available by the node when it was executed, using the given file key.default Builder
file(String key, Iterable<File> files)
Sets (replaces) the files made available by the node when it was executed, using the given file key.
-
-
-
Method Detail
-
always
Builder always(IValueCreator alwaysValue)
Sets (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);
- Parameters:
alwaysValue
- Function that takes a value builder to create the value.- Returns:
- This builder for chaining methods calls.
-
always
default Builder always(Object alwaysValue)
Sets (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.- Parameters:
alwaysValue
- Value made available by the node when it was executed.- Returns:
- This builder for chaining methods calls.
-
attachment
default Builder attachment(Attachment... attachments)
Sets (replaces) the attachments created by the node when it was executed. When this method is not called, the default value from theIExecutionResultDescriptor.getAttachmentValueDescriptor()
is used. When this method is called multiple times, only the value supplied by the last invocation is used.- Parameters:
attachments
- Attachment or attachments created by the workflow node.- Returns:
- This builder for chaining methods calls.
-
attachment
default Builder attachment(Iterable<Attachment> attachments)
Sets (replaces) the attachments created by the node when it was executed. When this method is not called, the default value from theIExecutionResultDescriptor.getAttachmentValueDescriptor()
is used. When this method is called multiple times, only the value supplied by the last invocation is used.- Parameters:
attachments
- Attachment or attachments created by the workflow node.- Returns:
- This builder for chaining methods calls.
-
attachment
Builder attachment(IWorkflowAttachmentValue attachmentValue)
Sets (replaces) the attachments created by the node when it was executed. When this method is not called, the default value from theIExecutionResultDescriptor.getAttachmentValueDescriptor()
is used. When this method is called multiple times, only the value supplied by the last invocation is used.- Parameters:
attachmentValue
- Attachment or attachments created by the workflow node.- Returns:
- This builder for chaining methods calls.
-
file
default Builder file(File... files)
Sets (replaces) the files made available by the node when it was executed, using thedefault file key
. The contents of the files are guessed.When this method is not called, the default value from the
IExecutionResultDescriptor.getFileValueDescriptor()
is used. When this method is called multiple times, only the value supplied by the last invocation is used.- Parameters:
files
- File or files supplied by the node.- Returns:
- This builder for chaining methods calls.
-
file
default Builder file(String key, File... files)
Sets (replaces) the files made available by the node when it was executed, using the given file key. The contents of the files are guessed.When this method is not called, the default value from the
IExecutionResultDescriptor.getFileValueDescriptor()
is used. When this method is called multiple times, only the value supplied by the last invocation is used.- Parameters:
key
- The key indicating the type of the files. SeeIFileValueDescriptor.getFiles()
.files
- File or files supplied by the node.- Returns:
- This builder for chaining methods calls.
- Since:
- 8.2.0
-
file
default Builder file(String key, Iterable<File> files)
Sets (replaces) the files made available by the node when it was executed, using the given file key. The contents of the files are guessed.When this method is not called, the default value from the
IExecutionResultDescriptor.getFileValueDescriptor()
is used. When this method is called multiple times, only the value supplied by the last invocation is used.- Parameters:
key
- The key indicating the type of the files. SeeIFileValueDescriptor.getFiles()
.files
- File or files supplied by the node.- Returns:
- This builder for chaining methods calls.
- Since:
- 8.2.0
-
file
Builder file(IFileValueCreator creator)
Sets (replaces) the files made available by the node when it was executed.When this method is not called, the default value from the
IExecutionResultDescriptor.getFileValueDescriptor()
is used. When this method is called multiple times, only the value supplied by the last invocation is used.- Parameters:
creator
- Creator for the files made available by the node when it was executed.- Returns:
- This builder for chaining methods calls.
- Since:
- 8.2.0
-
file
default Builder file(Iterable<File> files)
Sets (replaces) the files made available by the node when it was executed, using thedefault file key
. The contents of the files are guessed.When this method is not called, the default value from the
IExecutionResultDescriptor.getFileValueDescriptor()
is used. When this method is called multiple times, only the value supplied by the last invocation is used.- Parameters:
files
- File or files supplied by the node.- Returns:
- This builder for chaining methods calls.
-
file
default Builder file(IWorkflowFileValue fileValue)
Sets (replaces) the files made available by the node when it was executed.When this method is not called, the default value from the
IExecutionResultDescriptor.getFileValueDescriptor()
is used. When this method is called multiple times, only the value supplied by the last invocation is used.- Parameters:
fileValue
- File or files supplied by the node.- Returns:
- This builder for chaining methods calls.
-
-