此内容没有您所选择的语言版本。

Chapter 24. Timing


Timing is a mechanism for scheduling actions and is used by Timer Intermediate and Timer Start events. It enables you to delay further execution of a process or task.

Note

A timer event can be triggered only after the transaction is commited, while the timer countdown starts right after entering the node, that is the attached node in case of a boundary event. In other words, a timer event is only designed for those use cases where there is a wait state, such as a User Task. If you want to be notified of the timeout of a synchronous operation without a wait state, a boundary timer event is not suitable.

The timing strategy is defined by the following timer properties:

Time Duration
Defines the period for which the execution of the event is put on hold. The execution continues after the defined period has elapsed. The timer is applied only once.
Time Cycle
This defines the time between subsequent timer activations. If the period is 0, the timer is triggered only once.

The value for these properties can be provided as either Cron or as an expression by defining the, Time Cycle Language property.

Cron
[#d][\#h][\#m][\#s][#[ms]]

Example 24.1. Timer Period With Literal Values

1d 2h 3m 4s 5ms

The element will be executed after 1 day, 2 hours, 3 minutes, 4 seconds, and 5 milliseconds.

Any valid ISO8601 date format that supports both one shot timers and repeatable timers can be used. Timers can be defined as date and time representation, time duration or repeating intervals. For example:

Date
2013-12-24T20:00:00.000+02:00 - fires exactly at Christmas Eve at 8PM
Duration
PT2S - fires once after 2 seconds
Repetable Intervals
R/PT1S - fires every second, no limit, alternatively R5/PT1S will fire 5 times every second
None
#{expression}

Example 24.2. Timer period with expression

myVariable.getValue()

The element will be executed after time period returned by the call myVariable.getValue().

Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.