Package de.esoco.process
Klasse ProcessElement
java.lang.Object
org.obrel.core.RelatedObject
org.obrel.core.SerializableRelatedObject
de.esoco.process.ProcessElement
- Alle implementierten Schnittstellen:
Serializable
,org.obrel.core.Relatable
- Bekannte direkte Unterklassen:
ProcessFragment
,StepListProcessDefinition.StepListEntry
public abstract class ProcessElement
extends org.obrel.core.SerializableRelatedObject
The abstract base class for objects that represent or configure process
steps.
- Siehe auch:
-
Feldübersicht
Modifizierer und TypFeldBeschreibungstatic final String
Predefined message resource key to signal a missing process parameter -
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
addDisplayParameters
(Collection<? extends org.obrel.core.RelationType<?>> params) Adds parameter types into the list of this step's interaction parameters for display only.void
addDisplayParameters
(org.obrel.core.RelationType<?>... params) void
addInputParameters
(Collection<? extends org.obrel.core.RelationType<?>> params) Adds parameter types into the list of this step's interaction parameters and marks them for input withmarkInputParams(boolean, Collection)
.void
addInputParameters
(org.obrel.core.RelationType<?>... params) void
Clears this step's interaction parameters.void
continueOnInteraction
(org.obrel.core.RelationType<?>... params) Marks interaction parameters types as continuation parameters.getParameterValidations
(boolean onInteraction) Returns the parameter validations for a certain validation type.boolean
hasInteractionParameter
(org.obrel.core.RelationType<?> param) Checks whether a certain parameter is registered as an interaction parameter.void
markInputParams
(boolean input, Collection<? extends org.obrel.core.RelationType<?>> params) Marks a number of parameter types as input parameters.void
markInputParams
(boolean input, org.obrel.core.RelationType<?>... params) static List
<org.obrel.core.RelationType<?>> params
(org.obrel.core.RelationType<?>... params) A convenience method that creates a mutable list of process parameters without the need to explicitly specify 'RelationType<?void
Removes all parameter validations from this step.void
removeInteractionParameters
(Collection<org.obrel.core.RelationType<?>> params) Removes certain parameter types from the list of this step's interaction parameters.void
removeInteractionParameters
(org.obrel.core.RelationType<?>... params) Removes certain parameter types from the list of this step's interaction parameters.void
removeParameterValidations
(Collection<? extends org.obrel.core.RelationType<?>> params) Removes certain parameter validations from this step.void
removeParameterValidations
(org.obrel.core.RelationType<?>... params) Removes certain parameter validations from this step.void
setContinueOnInteraction
(boolean continueOnInteraction, org.obrel.core.RelationType<?>... params) Sets or removes the continuation parameter mark for the given interaction parameters.void
setMandatory
(org.obrel.core.RelationType<?>... params) Marks the mandatory parameters of this element by setting the flag relationMetaTypes.MANDATORY
to TRUE on relations with the given relation types.void
setParameterNotEmptyValidations
(Collection<? extends org.obrel.core.RelationType<?>> params) A shortcut method to add a validation that checks that parameters are not empty.void
setParameterNotEmptyValidations
(org.obrel.core.RelationType<?>... params) void
setParameterNotNullValidations
(Collection<? extends org.obrel.core.RelationType<?>> params) A shortcut method to validate that certain parameters are not NULL.void
setParameterNotNullValidations
(org.obrel.core.RelationType<?>... params) A shortcut method to validate that certain parameters are not NULL.<T> void
setParameterValidation
(org.obrel.core.RelationType<T> param, boolean onInteraction, de.esoco.lib.expression.Function<? super T, String> validation) Sets the validation function for a certain process input parameter.<T> void
setParameterValidation
(org.obrel.core.RelationType<T> param, String invalidInfo, de.esoco.lib.expression.Predicate<? super T> isInvalid) A shortcut method to set an input validation that has only a single validation message.static List
<org.obrel.core.RelationType<?>> staticParams
(org.obrel.core.RelationType<?>... params) A convenience method that creates a immutable list of process parameters without the need to explicitly specify 'RelationType<?Von Klasse geerbte Methoden org.obrel.core.RelatedObject
deleteRelation, get, getRelation, getRelations, notifyRelationListeners, readRelations, relationsEqual, relationsHashCode, relationsString, set, set, toString, transform, writeRelations
Von Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden org.obrel.core.Relatable
deleteRelation, deleteRelations, getAll, getOption, getRelationCount, getRelations, hasFlag, hasRelation, hasRelations, init, set, set, set, setOption, streamRelations
-
Felddetails
-
MSG_PARAM_NOT_SET
Predefined message resource key to signal a missing process parameter- Siehe auch:
-
-
Konstruktordetails
-
ProcessElement
public ProcessElement()Creates a new instance.
-
-
Methodendetails
-
params
A convenience method that creates a mutable list of process parameters without the need to explicitly specify 'RelationType<?>' as would be required with the generic methodsArrays.asList(Object...)
orCollectionUtil.listOf(Object...)
. For an immutable list the methodstaticParams(RelationType...)
can be used.- Parameter:
params
- The parameters to place in the list- Gibt zurück:
- The mutable parameter list
-
staticParams
public static List<org.obrel.core.RelationType<?>> staticParams(org.obrel.core.RelationType<?>... params) A convenience method that creates a immutable list of process parameters without the need to explicitly specify 'RelationType<?>' as would be required with the generic methodsArrays.asList(Object...)
orCollectionUtil.listOf(Object...)
. For a mutable list the methodparams(RelationType...)
can be used.- Parameter:
params
- The parameters to place in the list- Gibt zurück:
- The mutable parameter list
-
addDisplayParameters
public void addDisplayParameters(org.obrel.core.RelationType<?>... params) - Siehe auch:
-
addDisplayParameters
Adds parameter types into the list of this step's interaction parameters for display only.- Parameter:
params
- The parameter types to be displayed
-
addInputParameters
public void addInputParameters(org.obrel.core.RelationType<?>... params) - Siehe auch:
-
addInputParameters
Adds parameter types into the list of this step's interaction parameters and marks them for input withmarkInputParams(boolean, Collection)
. If parameters should not be displayed on the top level during an interaction (e.g. if they are members of a data element hierarchy) they should only be marked for input and not added with this method.- Parameter:
params
- The parameter types to be displayed
-
clearInteractionParameters
public void clearInteractionParameters()Clears this step's interaction parameters. -
continueOnInteraction
public void continueOnInteraction(org.obrel.core.RelationType<?>... params) Marks interaction parameters types as continuation parameters.- Parameter:
params
- The parameters to be marked for process continuation- Siehe auch:
-
hasInteractionParameter
public boolean hasInteractionParameter(org.obrel.core.RelationType<?> param) Checks whether a certain parameter is registered as an interaction parameter.- Parameter:
param
- The parameter to check- Gibt zurück:
- TRUE if the parameter is an interaction parameter
-
markInputParams
public void markInputParams(boolean input, org.obrel.core.RelationType<?>... params) - Siehe auch:
-
markInputParams
public void markInputParams(boolean input, Collection<? extends org.obrel.core.RelationType<?>> params) Marks a number of parameter types as input parameters. Such parameters will be rendered as input components during interactions.- Parameter:
input
- TRUE to add input parameters, FALSE to removeparams
- The parameters to add or remove
-
removeAllParameterValidations
public void removeAllParameterValidations()Removes all parameter validations from this step. -
removeInteractionParameters
public void removeInteractionParameters(org.obrel.core.RelationType<?>... params) Removes certain parameter types from the list of this step's interaction parameters.- Parameter:
params
- The parameter types to be displayed
-
removeInteractionParameters
Removes certain parameter types from the list of this step's interaction parameters.- Parameter:
params
- The parameter types to be displayed
-
removeParameterValidations
Removes certain parameter validations from this step.- Parameter:
params
- The parameters to remove the validations for
-
removeParameterValidations
public void removeParameterValidations(org.obrel.core.RelationType<?>... params) Removes certain parameter validations from this step.- Parameter:
params
- The parameters to remove the validations for
-
setContinueOnInteraction
public void setContinueOnInteraction(boolean continueOnInteraction, org.obrel.core.RelationType<?>... params) Sets or removes the continuation parameter mark for the given interaction parameters. If an interactive input event is caused by a continuation parameter the process execution will continue instead of re-executing the current step. This is typically used for enumerated parameters with an immediate interaction flag set.- Parameter:
continueOnInteraction
- TRUE to continue the process on interaction, FALSE to stay in the same stepparams
- The parameters to set or remove the continuation mark for
-
setMandatory
public void setMandatory(org.obrel.core.RelationType<?>... params) Marks the mandatory parameters of this element by setting the flag relationMetaTypes.MANDATORY
to TRUE on relations with the given relation types. If no relation with a certain type exists already it will be created with an initial value of NULL.- Parameter:
params
- The parameter types to be marked as mandatory
-
setParameterNotEmptyValidations
public void setParameterNotEmptyValidations(org.obrel.core.RelationType<?>... params) - Siehe auch:
-
setParameterNotEmptyValidations
public void setParameterNotEmptyValidations(Collection<? extends org.obrel.core.RelationType<?>> params) A shortcut method to add a validation that checks that parameters are not empty. If the target type of the parameter is aCharSequence
orCollection
the parameter value will be checked to be not NULL and to have a size greater than zero. Otherwise this method has the same effect assetParameterNotNullValidations(Collection)
.- Parameter:
params
- The parameters to validate- Siehe auch:
-
setParameterNotNullValidations
public void setParameterNotNullValidations(org.obrel.core.RelationType<?>... params) A shortcut method to validate that certain parameters are not NULL.- Parameter:
params
- The parameters to check
-
setParameterNotNullValidations
public void setParameterNotNullValidations(Collection<? extends org.obrel.core.RelationType<?>> params) A shortcut method to validate that certain parameters are not NULL.- Parameter:
params
- The parameters to check
-
setParameterValidation
public <T> void setParameterValidation(org.obrel.core.RelationType<T> param, boolean onInteraction, de.esoco.lib.expression.Function<? super T, String> validation) Sets the validation function for a certain process input parameter. The validation function must return either NULL if the value of the given parameter is valid or else a string with a validation message that describes why the value is invalid (typically a resource key). Invoking this method overrides any previous validation function.- Parameter:
param
- The parameter to checkonInteraction
- TRUE to validate on each interaction, FALSE to validate only if the process step is finishedvalidation
- The validation function
-
setParameterValidation
public <T> void setParameterValidation(org.obrel.core.RelationType<T> param, String invalidInfo, de.esoco.lib.expression.Predicate<? super T> isInvalid) A shortcut method to set an input validation that has only a single validation message. The predicate argument must check whether the parameter value is invalid, i.e. it must return TRUE if the value is invalid and FALSE if it is valid.- Parameter:
param
- The parameter to checkinvalidInfo
- The string to return if the parameter is invalidisInvalid
- A predicate that checks if the parameter is invalid- Siehe auch:
-
getParameterValidations
protected Map<org.obrel.core.RelationType<?>,de.esoco.lib.expression.Function<?, getParameterValidationsString>> (boolean onInteraction) Returns the parameter validations for a certain validation type.- Parameter:
onInteraction
- TRUE for interaction validations, FALSE for finishing validations- Gibt zurück:
- The mapping from parameter types to validation functions
-