Difference between revisions of "Triggers"

From GreenVulcano Wiki
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 78: Line 78:
 
|}
 
|}
 
</div>
 
</div>
 
+
<div class="version_ge3.4">
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| enabled || implied || Trigger activation status. Default to true.
 +
|}
 +
</div>
 
Might contain the following sub-elements:
 
Might contain the following sub-elements:
 
* Description
 
* Description
Line 130: Line 136:
 
| calendarName || optional || Associate the Calendar with the given name with this Trigger.
 
| calendarName || optional || Associate the Calendar with the given name with this Trigger.
 
|}
 
|}
 +
 +
<div class="version_ge3.3.3">
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| misfireMode || optional || Defines how to handle misfire situations. Default to smart-policy.
 +
The attribute admitted values are:
 +
* smart-policy
 +
* fire-once-now
 +
* do-nothing
 +
|}
 +
 +
Misfire policy:
 +
{|class="gvtable"
 +
! Mode !! Policy
 +
|-
 +
| smart-policy || the following scheme will be used:
 +
* fire-once-now
 +
|-
 +
| fire-once-now || instructs the Scheduler that upon a mis-fire situation, the DateIntervalTrigger wants to be fired now.
 +
|-
 +
| do-nothing || instructs the Scheduler that upon a mis-fire situation, the DateIntervalTrigger wants to have it's next-fire-time updated to the next time in the schedule after the current time (taking into account any associated Calendar), but it does not want to be fired now.
 +
|}
 +
</div>
 +
<div class="version_ge3.4">
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| enabled || implied || Trigger activation status. Default to true.
 +
|}
 +
</div>
  
 
Might contain the following sub-elements:
 
Might contain the following sub-elements:
Line 162: Line 199:
 
| calendarName || optional || Associate the Calendar with the given name with this Trigger.
 
| calendarName || optional || Associate the Calendar with the given name with this Trigger.
 
|}
 
|}
 +
 +
<div class="version_ge3.3.3">
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| misfireMode || optional || Defines how to handle misfire situations. Default to smart-policy.
 +
The attribute admitted values are:
 +
* smart-policy
 +
* fire-once-now
 +
* do-nothing
 +
|}
 +
 +
Misfire policy:
 +
{|class="gvtable"
 +
! Mode !! Policy
 +
|-
 +
| smart-policy || the following scheme will be used:
 +
* fire-once-now
 +
|-
 +
| fire-once-now || instructs the Scheduler that upon a mis-fire situation, the CronTrigger wants to be fired now.
 +
|-
 +
| do-nothing || instructs the Scheduler that upon a mis-fire situation, the CronTrigger wants to have it's next-fire-time updated to the next time in the schedule after the current time (taking into account any associated Calendar), but it does not want to be fired now.
 +
|}
 +
</div>
 +
<div class="version_ge3.4">
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| enabled || implied || Trigger activation status. Default to true.
 +
|}
 +
</div>
  
 
Might contain the following sub-elements:
 
Might contain the following sub-elements:
 
* Description
 
* Description
 
* [[#TgProperties|TgProperties]]
 
* [[#TgProperties|TgProperties]]

Latest revision as of 15:45, 13 May 2014

Description

GreenVulcano® ESB uses this element to define a group of Timer Tasks.

VulCon / GV Console Configuration

The Triggers Element is used by: RSHTask, ServiceCallerTask, ShellTask, LogCleanerTask (since v3.3.2) and TestTask.

Might contain the following subelements:

SimpleTriggerBuilder

A Trigger that is used to fire a Task at a given moment in time, and optionally repeated at a specified interval.

The following table shows the SimpleTriggerBuilder element's attributes:

Attribute Type Description
type fixed This attribute must assume the value cron-trigger
class fixed This attribute must assume the value it.greenvulcano.scheduler.util.quartz.impl.trigger.SimpleTriggerBuilder
name required Trigger name
startTime optional Trigger starting time in ISO format: yyyy-MM-dd HH:mm:ss
endTime optional Trigger ending time in ISO format: yyyy-MM-dd HH:mm:ss.

If not defined is the server starting time rounded to the next minute.

repeatInterval optional The period of repetition of the trigger, in ms.

If not defined the task is executed only once.

repeatCount optional The number of repetitions of the trigger.

If not defined the task is executed only once. If 'period' == -1, the task is repeated endlessly (or to 'endTime').

timeZone optional Trigger TimeZone.

If not defined is used the TimeZone defined for DateUtils.

calendarName optional Associate the Calendar with the given name with this Trigger.
Attribute Type Description
misfireMode optional Defines how to handle misfire situations. Default to smart-policy.

The attribute admitted values are:

  • smart-policy
  • fire-now
  • reschedule-now-existing-repeat-count
  • reschedule-now-remaining-repeat-count
  • reschedule-next-existing-count
  • reschedule-next-remaining-count

Misfire policy:

Mode Policy
smart-policy the following scheme will be used:
  • if the repeatCount is 0, then the instruction will be interpreted as fire-now
  • if the repeatCount is -1, then the instruction will be interpreted as reschedule-next-remaining-count
  • if the repeatCount is > 0, then the instruction will be interpreted as reschedule-now-existing-repeat-count
fire-now instructs the Scheduler that upon a mis-fire situation, the SimpleTrigger wants to be fired now.
reschedule-now-existing-repeat-count instructs the Scheduler that upon a mis-fire situation, the SimpleTrigger wants to be re-scheduled to 'now' (even if the associated Calendar excludes 'now') with the repeat count left as-is.
reschedule-now-remaining-repeat-count instructs the Scheduler that upon a mis-fire situation, the SimpleTrigger wants to be re-scheduled to 'now' (even if the associated Calendar excludes 'now') with the repeat count set to what it would be, if it had not missed any firings.
reschedule-next-existing-count instructs the Scheduler that upon a mis-fire situation, the SimpleTrigger wants to be re-scheduled to the next scheduled time after 'now' - taking into account any associated Calendar, and with the repeat count left unchanged.
reschedule-next-remaining-count instructs the Scheduler that upon a mis-fire situation, the SimpleTrigger wants to be re-scheduled to the next scheduled time after 'now' - taking into account any associated Calendar, and with the repeat count set to what it would be, if it had not missed any firings.

WARNING: using this mode with a trigger that has a non-null end-time may cause the trigger to never fire again if the end-time arrived during the misfire time span.

Attribute Type Description
enabled implied Trigger activation status. Default to true.

Might contain the following sub-elements:

TgProperties

This element defines additional properties of the Trigger.

Might contain the following sub-elements:


DateIntervalTriggerBuilder

This element represents a Trigger that is used to fire a Task based upon repeating calendar time intervals.


The following table shows the DateIntervalTriggerBuilder element's attributes:

Attribute Type Description
type fixed This attribute must assume the value cron-trigger
class fixed This attribute must assume the value it.greenvulcano.scheduler.util.quartz.impl.trigger.DateIntervalTriggerBuilder
name required Trigger name.
startTime optional Trigger starting time in ISO format: yyyy-MM-dd HH:mm:ss

If not defined is the server starting time rounded to the next minute.

endTime optional Trigger ending time in ISO format: yyyy-MM-dd HH:mm:ss
repeatIntervalUnit optional The period of repetition of the trigger, in time unit.

The attribute admitted values are:

  • SECOND
  • MINUTE
  • HOUR
  • DAY
  • WEEK
  • MONTH
  • YEAR
repeatInterval optional The number of repeatIntervalUnit for repetitions of the trigger.

If not defined the default is 1.

timeZone optional Trigger TimeZone.

If not defined is used the TimeZone defined for DateUtils.

calendarName optional Associate the Calendar with the given name with this Trigger.
Attribute Type Description
misfireMode optional Defines how to handle misfire situations. Default to smart-policy.

The attribute admitted values are:

  • smart-policy
  • fire-once-now
  • do-nothing

Misfire policy:

Mode Policy
smart-policy the following scheme will be used:
  • fire-once-now
fire-once-now instructs the Scheduler that upon a mis-fire situation, the DateIntervalTrigger wants to be fired now.
do-nothing instructs the Scheduler that upon a mis-fire situation, the DateIntervalTrigger wants to have it's next-fire-time updated to the next time in the schedule after the current time (taking into account any associated Calendar), but it does not want to be fired now.
Attribute Type Description
enabled implied Trigger activation status. Default to true.

Might contain the following sub-elements:

CronTriggerBuilder

This element represents a Trigger that is used to fire a Task at given moments in time, defined with Unix cron-like definitions.

The following table shows the CronTriggerBuilder element's attributes:

Attribute Type Description
type fixed This attribute must assume the value cron-trigger
class fixed This attribute must assume the value it.greenvulcano.scheduler.util.quartz.impl.trigger.CronTriggerBuilder
name required Trigger name.
cronExpression required Defines a cron expression.

Reference: http://www.quartz-scheduler.org/documentation/quartz-1.x/tutorials/crontrigger

startTime optional Trigger starting time in ISO format: yyyy-MM-dd HH:mm:ss

If not defined is the server starting time rounded to the next minute.

endTime optional Trigger ending time in ISO format: yyyy-MM-dd HH:mm:ss
timeZone optional Trigger TimeZone.

If not defined is used the TimeZone defined for DateUtils.

calendarName optional Associate the Calendar with the given name with this Trigger.
Attribute Type Description
misfireMode optional Defines how to handle misfire situations. Default to smart-policy.

The attribute admitted values are:

  • smart-policy
  • fire-once-now
  • do-nothing

Misfire policy:

Mode Policy
smart-policy the following scheme will be used:
  • fire-once-now
fire-once-now instructs the Scheduler that upon a mis-fire situation, the CronTrigger wants to be fired now.
do-nothing instructs the Scheduler that upon a mis-fire situation, the CronTrigger wants to have it's next-fire-time updated to the next time in the schedule after the current time (taking into account any associated Calendar), but it does not want to be fired now.
Attribute Type Description
enabled implied Trigger activation status. Default to true.

Might contain the following sub-elements: