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 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.
      • 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 the IExecutionResultDescriptor.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. Use INodeExecutionParams.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.