Klasse FunctionStep
- Alle implementierten Schnittstellen:
Serializable
,org.obrel.core.Relatable
This class support both unary and binary functions. For the latter the
step parameter FUNCTION_SECONDARY_INPUT
refers to the parameter
which contains with the second input value for the invocation of the method
BinaryFunction.evaluate(Object, Object)
. If the secondary input
parameter is not set a binary function will be invoked as a unary function,
thus keeping any preset secondary input.
Attention: The relation types of the input and output parameters need to be stored in wildcard form to allow the use of arbitrary parameters. This means that no generic type checking is possible between the function and parameter types. Therefore the application code must make sure that the types of the parameters match that of the given function or else an exception will occur at runtime.
The following parameters are supported (r = required, o = optional):
FUNCTION
(r): The function to be evaluated. If this is a binary function it will be applied to both the main and secondary input values.-
FUNCTION_MAIN_INPUT
(o): The type of the parameter containing the main input value (the left value for binary functions); if not set NULL will be used. -
FUNCTION_SECONDARY_INPUT
(o): The type of the parameter containing the secondary (right-side) input value for binary functions; if not set NULL will be used. FUNCTION_OUTPUT
(o): The type of the parameter to receive the function result; if not set the result will be ignored; if neither input nor output parameter are set an exception will be thrown.
- Siehe auch:
-
Feldübersicht
Modifizierer und TypFeldBeschreibungstatic final org.obrel.core.RelationType
<de.esoco.lib.expression.Function<?, ?>> The function to evaluate the input parameter with.static final org.obrel.core.RelationType
<org.obrel.core.RelationType<?>> The process parameter containing the main (left) input value for the function.static final org.obrel.core.RelationType
<org.obrel.core.RelationType<?>> The process parameter to store the function result in.static final org.obrel.core.RelationType
<org.obrel.core.RelationType<?>> The process parameter containing the secondary (right) input value for a binary function.Von Klasse geerbte Felder de.esoco.process.ProcessStep
NEXT_STEP
Von Klasse geerbte Felder de.esoco.process.ProcessElement
MSG_PARAM_NOT_SET
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected boolean
Overridden to always return TRUE.protected void
execute()
Evaluates the value of the input parameter with the function and stores the result in the output parameter.protected final void
rollback()
Removes theFUNCTION_OUTPUT
parameter from the process.Von Klasse geerbte Methoden de.esoco.process.ProcessStep
abort, addDisplayParameters, addSubFragment, cancel, checkStopProcessExecution, cleanup, getName, getNextStep, getProcess, getProcessStep, internalExecute, isParameterModified, needsInteraction, prepareContinuation, prepareExecution, prepareInteraction, prepareNewInteractionParameters, prepareParameters, prepareValues, removeParameterModification, removeParameterModification, resetParameterModifications, resetParameters, resume, setNextStep, setup, throwMissingParameterException, toString, validate, validateParameters
Von Klasse geerbte Methoden de.esoco.process.ProcessFragment
addCleanupAction, addLayoutFiller, addPanel, addPanel, addPanelParameters, addProcessStepMessage, addSelectionDependency, addSelectionDependency, addStackPanel, addTabPanel, annotateForEntityQuery, annotateForEntityQuery, annotateParameter, applyDerivedParameter, applyDerivedParameters, applyExtraAttribute, changeDate, checkParameter, clearUIFlag, clearUIFlag, collectDerivedParameter, collectDerivedParameters, deleteParameters, disableElements, disableElements, disableElements, disableMultiSelectionElements, displayHistoryValue, enableAllElements, executeCleanupActions, getAbsoluteFilePath, getAllowedElements, getAllowedValues, getCurrentQuery, getDerivedParameterValue, getFragmentId, getInputMode, getInteractiveInputParameter, getNamedTmpListType, getNamedTmpParameterType, getParameter, getParameterAnnotation, getParameterRelation, getProcessUser, getSelectionIndex, getSubFragment, getSubFragments, getTemporaryListType, getTemporaryListType, getTemporaryParameterId, getTemporaryParameterName, getTemporaryParameterPackage, getTemporaryParameterType, getTemporaryParameterType, getTemporaryParameterType, getTemporarySetType, getUIProperties, getUIProperties, getUIProperty, getUserSetting, getUserSettings, hasFlagParameter, hasParameter, hasUIFlag, hasUserSetting, initChartParameter, initCountChartParameter, initProgressParameter, isInteractiveInput, isPanelParameter, lockEntity, markParameterAsModified, performParameterValidations, prepareDateInput, prepareDownload, prepareDownload, removeAllSubFragments, removeAllUIProperties, removeAllUIProperties, removeCleanupAction, removePanel, removeParameterAnnotation, removeSubFragment, removeSubFragment, removeTemporaryParameterType, removeUIProperties, setAllowedElements, setAllowedValues, setAllowedValues, setDatePeriod, setEnabled, setEnabled, setHtmlSize, setImmediateAction, setImmediateAction, setImmediateAction, setInteractive, setInteractive, setInteractive, setInteractive, setInteractive, setLayout, setParameter, setParameter, setParameterBounds, setProcessStepInfo, setProcessStepMessage, setProgressIndicator, setSelectionDependency, setSelectionDependency, setUIFlag, setUIFlag, setUIProperty, setUIProperty, setUIProperty, setUIProperty, setVisible, setVisible, spawnProcess, storeEntity, unlockEntity
Von Klasse geerbte Methoden de.esoco.process.ProcessElement
addDisplayParameters, addInputParameters, addInputParameters, clearInteractionParameters, continueOnInteraction, getParameterValidations, hasInteractionParameter, markInputParams, markInputParams, params, removeAllParameterValidations, removeInteractionParameters, removeInteractionParameters, removeParameterValidations, removeParameterValidations, setContinueOnInteraction, setMandatory, setParameterNotEmptyValidations, setParameterNotEmptyValidations, setParameterNotNullValidations, setParameterNotNullValidations, setParameterValidation, setParameterValidation, staticParams
Von Klasse geerbte Methoden org.obrel.core.RelatedObject
deleteRelation, get, getRelation, getRelations, notifyRelationListeners, readRelations, relationsEqual, relationsHashCode, relationsString, set, set, 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
-
FUNCTION
public static final org.obrel.core.RelationType<de.esoco.lib.expression.Function<?,?>> FUNCTIONThe function to evaluate the input parameter with. -
FUNCTION_MAIN_INPUT
public static final org.obrel.core.RelationType<org.obrel.core.RelationType<?>> FUNCTION_MAIN_INPUTThe process parameter containing the main (left) input value for the function. -
FUNCTION_SECONDARY_INPUT
public static final org.obrel.core.RelationType<org.obrel.core.RelationType<?>> FUNCTION_SECONDARY_INPUTThe process parameter containing the secondary (right) input value for a binary function. -
FUNCTION_OUTPUT
public static final org.obrel.core.RelationType<org.obrel.core.RelationType<?>> FUNCTION_OUTPUTThe process parameter to store the function result in.
-
-
Konstruktordetails
-
FunctionStep
public FunctionStep()Creates a new instance.
-
-
Methodendetails
-
canRollback
protected boolean canRollback()Overridden to always return TRUE.- Setzt außer Kraft:
canRollback
in KlasseProcessStep
- Gibt zurück:
- TRUE if the step implementation support a rollback
- Siehe auch:
-
execute
protected void execute()Evaluates the value of the input parameter with the function and stores the result in the output parameter.- Angegeben von:
execute
in KlasseProcessStep
- Löst aus:
ProcessException
- If the function evaluation yields an exception
-
rollback
Removes theFUNCTION_OUTPUT
parameter from the process.- Setzt außer Kraft:
rollback
in KlasseProcessStep
- Löst aus:
Exception
- Any exception may be thrown if the rollback fails- Siehe auch:
-