Class IntervalPlugin
- java.lang.Object
-
- org.imixs.workflow.engine.plugins.AbstractPlugin
-
- org.imixs.workflow.engine.plugins.IntervalPlugin
-
- All Implemented Interfaces:
Plugin
public class IntervalPlugin extends AbstractPlugin
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:
WorkflowManager
-
-
Field Summary
Fields Modifier and Type Field Description static StringEVAL_INTERVALbooleanincreasestatic StringINVALID_FORMAT-
Fields inherited from class org.imixs.workflow.engine.plugins.AbstractPlugin
INVALID_ITEMVALUE_FORMAT, INVALID_PROPERTYVALUE_FORMAT
-
-
Constructor Summary
Constructors Constructor Description IntervalPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LocalDateTimeevalCron(String cron)LocalDateTimeevalCron(String cron, LocalDateTime baseDateTime)evaluates a cron definitionLocalDateTimeevalMacro(String macro, LocalDateTime ldt)The method evaluates a macro.ItemCollectionrun(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 Detail
-
EVAL_INTERVAL
public static final String EVAL_INTERVAL
- See Also:
- Constant Field Values
-
INVALID_FORMAT
public static final String INVALID_FORMAT
- See Also:
- Constant Field Values
-
increase
public boolean increase
-
-
Method Detail
-
run
public ItemCollection run(ItemCollection adocumentContext, ItemCollection event) throws PluginException
The method paresed for a fields with the prafix 'keyitnerval'- Throws:
PluginException
-
evalCron
public LocalDateTime evalCron(String cron, LocalDateTime baseDateTime) throws PluginException
evaluates a cron definition- Parameters:
cron- - a cron definition * * * * *baseDateTime- - the base dateTime for the evaluation- Returns:
- next dateTime
- Throws:
PluginException
-
evalCron
public LocalDateTime evalCron(String cron) throws PluginException
- Throws:
PluginException
-
evalMacro
public LocalDateTime evalMacro(String macro, LocalDateTime ldt) throws PluginException
The method evaluates a macro. Possible values:- @yearly
- @monthly
- @weekly
- @daily
- @hourly
- Parameters:
macro-date-- Returns:
- Throws:
PluginException
-
-