Interface ISpecificTriggerListener<TData>
-
- Type Parameters:
TData
- Type of the trigger's properties model.
- All Superinterfaces:
ICustomParametersUpdateable
,IElementHandler<TData,WorkflowTrigger>
,IResourceBundleLocator
,ITriggerDataDescriptor
,ITriggerHandler<TData>
,IWorkflowElementTypeProviding
,IWorkflowTriggerTypeProviding
- All Known Implementing Classes:
FcManualHandler
,FcStateTimerHandler
,FcTimePointHandler
public interface ISpecificTriggerListener<TData> extends ITriggerHandler<TData>
Mixin interface for triggers that are invoked only by an external event specifying the ID of the trigger. SeeISpecificTriggerProvidingEvent
.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Field Summary
-
Fields inherited from interface de.xima.fc.interfaces.workflow.elements.IElementHandler
CURRENT_HANDLER_VERSION
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default de.xima.cmn.criteria.FilterCriterion
getFilterCriteriaForEvent(ITriggerFilterCriteriaForEventParams params)
Called once with the event data when an event is fired.default boolean
isAppliesToEvent(ITriggerAppliesToEventParams<TData> params)
Called once the database query for matching triggers completes successfully.-
Methods inherited from interface de.xima.fc.interfaces.workflow.ICustomParametersUpdateable
updateCustomParams
-
Methods inherited from interface de.xima.fc.interfaces.workflow.elements.IElementHandler
extractDescription, extractName, extractSearchTerms, getCascadingStyleSheet, getCascadingStyleSheet, getDataModelClass, getDisplayLabel, getElementSummaryModel, getElementSummaryXhtml, getFastJsonConverter, getFilterCriteriaForEntities, getHelpPageLocation, getJavaScript, getJavaScript, getPropertiesViewXhtml, getResourceBundle, getVersion, isAvailable, isHasUserVisibleName, readEntityReferences, readPlaceholders, validateGlobal, validateLocal, writeEntityReferences, writePlaceholders
-
Methods inherited from interface de.xima.fc.interfaces.workflow.execution.ITriggerDataDescriptor
getTriggerDataDescriptor
-
Methods inherited from interface de.xima.fc.interfaces.workflow.triggers.ITriggerHandler
getLocalizedTypeName, getPropertiesBeanClass, getTriggerPrototypes, isPreconditionSatisfied, onTaskBegin, onTaskFinish
-
Methods inherited from interface de.xima.fc.interfaces.workflow.IWorkflowElementTypeProviding
getType
-
-
-
-
Method Detail
-
getFilterCriteriaForEvent
default de.xima.cmn.criteria.FilterCriterion getFilterCriteriaForEvent(ITriggerFilterCriteriaForEventParams params)
Description copied from interface:ITriggerHandler
Called once with the event data when an event is fired. Each handler may add filter criteria to locate the triggers that match the event data.This method must return a non-null value to indicate that the event applies to this type of trigger at all. When this returns
null
, no triggers of this handler type are considered. The filter criterion returned by this method is used for a query forWorkflowTrigger
entities, i.e. all attribute names must be relative to that entity.For example, to limit the result to triggers which have a search term with the key
customKey
set tovalueForCustomKey
, use:return params.searchTermExists("customKey", valueForCustomKey);
To create a complex filter, useor
/and
etc. If you cannot use a database filter to check whether a trigger applies, usealways
to fetch all triggers for this handler type, and implementisAppliesToEvent
to filter the applicable triggers via Java code.Basic restrictions such as the
trigger type
, the form record and project are applied automatically by the system and do not need to be included in the returned filter.See the class level documentation
ITriggerHandler
for more details.- Specified by:
getFilterCriteriaForEvent
in interfaceITriggerHandler<TData>
- Parameters:
params
- Parameters with the event data of the event that occurred.- Returns:
- A filter criterion to restrict the list of matching triggers for this handler type. When
null
is returned, no triggers of this handler type are considered.
-
isAppliesToEvent
default boolean isAppliesToEvent(ITriggerAppliesToEventParams<TData> params)
Description copied from interface:ITriggerHandler
Called once the database query for matching triggers completes successfully. May be used to restrict the list of candidate triggers returned by the database query for matching triggers. This is useful, for example, when the check cannot be expressed as a database query. The tasks of triggers for which this method returnsfalse
are not executed.See the class level documentation
ITriggerHandler
for more details.- Specified by:
isAppliesToEvent
in interfaceITriggerHandler<TData>
- Parameters:
params
- The parameters with the event that occurred and a trigger returned by the database query for matching triggers.- Returns:
- Whether the given trigger applies to the the given event. If not, the task for that trigger is not executed.
-
-