Class IntervalPlugin
java.lang.Object
org.imixs.workflow.engine.plugins.AbstractPlugin
org.imixs.workflow.engine.plugins.IntervalPlugin
- All Implemented Interfaces:
Plugin
The Imixs Interval Plugin implements an mechanism to adjust a date field of a
workitem based on a interval description. The interval description is stored
in a field with the prafix 'keyinterval' followed by the name of an existing
date field. See the following example:
<item name="interval">
<ref>reminder</ref>
<cron>5 15 * * 1-5</cron>
</item>
- Version:
- 1.0
- Author:
- Ralph Soika
- See Also:
-
Field Summary
Fields inherited from class org.imixs.workflow.engine.plugins.AbstractPlugin
INVALID_ITEMVALUE_FORMAT, INVALID_PROPERTYVALUE_FORMAT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionevalCron
(String cron, LocalDateTime baseDateTime) evaluates a cron definitionevalMacro
(String macro, LocalDateTime ldt) The method evaluates a macro.run
(ItemCollection adocumentContext, ItemCollection event) The method paresed for a fields with the prafix 'keyitnerval'Methods inherited from class org.imixs.workflow.engine.plugins.AbstractPlugin
close, getCtx, getWorkflowService, init, mergeFieldList, uniqueList
-
Field Details
-
EVAL_INTERVAL
- See Also:
-
INVALID_FORMAT
- See Also:
-
increase
public boolean increase
-
-
Constructor Details
-
IntervalPlugin
public IntervalPlugin()
-
-
Method Details
-
run
public ItemCollection run(ItemCollection adocumentContext, ItemCollection event) throws PluginException The method paresed for a fields with the prafix 'keyitnerval'- Parameters:
adocumentContext
- the workitem to be processedevent
- the workflow event containing the processing instructions- Returns:
- updated workitem for further processing
- Throws:
PluginException
-
evalCron
evaluates a cron definition- Parameters:
cron
- - a cron definition * * * * *baseDateTime
- - the base dateTime for the evaluation- Returns:
- next dateTime
- Throws:
PluginException
-
evalCron
- Throws:
PluginException
-
evalMacro
The method evaluates a macro. Possible values:- @yearly
- @monthly
- @weekly
- @daily
- @hourly
- Parameters:
macro
-date
-- Returns:
- Throws:
PluginException
-