All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ee.telekom.workflow.api.DslValidationBlock Maven / Gradle / Ivy

Go to download

Telekom-workflow-engine API interface (DSL) for writing your workflow definitions and plugins.

There is a newer version: 1.6.3
Show newest version
package ee.telekom.workflow.api;

/**
 * DSL for workflow definitions.
 *
 * @author Erko Hansar
 * @author Christian Klock
 *
 * @see WorkflowDefinition
 */
public interface DslValidationBlock extends DslMainBlock{

    /**
     * Checks a required input value. 
     * 
     * Tests that the input variable's value is set in the environment (possibly also to null)
     * and that this value is assignable to the defined type. 
     * 
     * NB! Calls to one of the overloaded validateInputVariable methods are only possible at the beginning of the workflow definition.
     * 
     * @param id node id
     * @param variable variable name
     * @param type type that the variable's value must be assignable to.
     */
    public DslValidationBlock validateInputVariable( int id, String variable, Class type );

    /**
     * Like {@link #validateInputVariable(int, String, Class, boolean, Object)} with a default value of null
     */
    public DslValidationBlock validateInputVariable( int id, String variable, Class type, boolean isRequired );

    /**
     * Checks a required or optional input value.
     * 
     * For a required input variable, it checks that the variable's value is set in the environment (possibly also to null)
     * and that this value is assignable to the defined type. 
     * For an optional input variable, it initialises the value to a default, if it is not yet set in the environment and ensures that
     * its value is assignable to the defined type. 
     * 
     * NB! Calls to one of the overloaded validateInputVariable methods are only possible at the beginning of the workflow definition.
     * 
     * @param id node id
     * @param variable variable name
     * @param type type that the variable's value must be assignable to
     * @param isRequired whether the variable is a required or an optional input
     * @param defaultValue a default value if the optional input value is not given
     */
    public DslValidationBlock validateInputVariable( int id, String variable, Class type, boolean isRequired, Object defaultValue );

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy