Interface ICurrentValueBuilder
-
public interface ICurrentValueBuilder
Builder for the value provided by a node while it is being executed.- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
provide()
Provides the configured value as the current value of the node.ICurrentValueBuilder
withAttachments(IWorkflowAttachmentValue attachments)
Adds the attachments from the given value to the list of attachments made available by the node while it is being executed.default ICurrentValueBuilder
withFiles(IWorkflowFileValue files)
Adds the files from the given value to the list of files made available by the node while it is being executed.ICurrentValueBuilder
withFilesBuilder(IFileValueCreator files)
Adds the files from the given value to the list of files made available by the node while it is being executed.default ICurrentValueBuilder
withValue(Object value)
Configures the value returned by the node while it is being executed.ICurrentValueBuilder
withValueBuilder(IValueCreator value)
Configures the value returned by the node while it is being executed.
-
-
-
Method Detail
-
provide
void provide()
Provides the configured value as the current value of the node.
-
withAttachments
ICurrentValueBuilder withAttachments(IWorkflowAttachmentValue attachments)
Adds the attachments from the given value to the list of attachments made available by the node while it is being executed.- Parameters:
attachments
- Value containing the attachments to be made available.- Returns:
- This builder for chaining methods calls.
-
withFiles
default ICurrentValueBuilder withFiles(IWorkflowFileValue files)
Adds the files from the given value to the list of files made available by the node while it is being executed.- Parameters:
files
- Value containing the files to be made available.- Returns:
- This builder for chaining methods calls.
-
withFilesBuilder
ICurrentValueBuilder withFilesBuilder(IFileValueCreator files)
Adds the files from the given value to the list of files made available by the node while it is being executed.- Parameters:
files
- Value containing the files to be made available.- Returns:
- This builder for chaining methods calls.
-
withValue
default ICurrentValueBuilder withValue(Object value)
Configures the value returned by the node while it is being executed. When this method is not called, the default value from theIExecutionResultDescriptor.getCurrentValueDescriptor(IValueDescriptorFactory)
is used. When this method is called multiple times, behaves as ifIValueBuilder.value(Object)
were called multiple times.- Parameters:
value
- Value made available when the node is being executed.- Returns:
- This builder for chaining methods calls.
-
withValueBuilder
ICurrentValueBuilder withValueBuilder(IValueCreator value)
Configures the value returned by the node while it is being executed. When this method is not called, the default value from theIExecutionResultDescriptor.getCurrentValueDescriptor(IValueDescriptorFactory)
is used.When this method is called multiple times, behaves as if
IValueBuilder
were manipulated multiple times with the given configurator. The value is reset between loop executions. UseINodeExecutionParams.resetCurrentValue()
to reset the builder manually.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:
value
- Function that takes a value builder to create the value.- Returns:
- This builder for chaining methods calls.
-
-