Show Table of Contents
第11章 ビジネスカレンダー
本章では、作業の期限やタイマーの計算に使用するビジネスプロセスマネージャのカレンダー機能について説明します。
ビジネスカレンダは、基準日 (base date) に期間 (duration) を追加したり差し引いたりすることで計算を行います。基準日の指定がない場合は、デフォルトで現在の日付が使用されます。
11.1. Due Date (期限)
期限は期間と基準日によって構成されます。 使用される公式は
duedate ::= [<basedate> +/-] <duration> になります。
11.1.1. Duration (期間)
期間は、
duration ::= <quantity> [business] <unit> を公式として使用し、 絶対時間または営業時間のいずれかで指定されます。
上記の計算では、
<quantity> は Double.parseDouble(quantity) で解析可能なテキストでなければなりません。 <unit> は、 second、 seconds、 minute、 minutes、 hour、 hours、 day、 days、 week、 weeks、 month、 months、 year、 years のいずれかになります。 任意の business フラグを追加すると、 営業時間のみが期間で考慮されます。 business を指定しないと、 期間は絶対期間として解釈されます。
11.1.2. 基準日
基準日は、
basedate ::= <EL> のように計算されます。
上記の公式では、
<EL> は Java Date または Calendar オブジェクトへ解決する Java 表現言語になります。
警告
JbpmException エラーが発生するため、 他のオブジェクトタイプの変数を参照しないようにしてください。
基準日は、 簡単なタイマのduedate 属性やタスクリマインダ、タスク内のタイマなど複数の場所でサポートされますが、これらの要素の repeat 属性ではサポートされません。
11.1.3. 期限の例
以下は可能な使用例です。
<timer name="daysBeforeHoliday" duedate="5 business days">...</timer>
<timer name="pensionDate" duedate="#{dateOfBirth} + 65 years" >...</timer>
<timer name="pensionReminder" duedate="#{dateOfPension} - 1 year" >...</timer>
<timer name="fireWorks" duedate="#{chineseNewYear} repeat="1 year" >...</timer>
<reminder name="hitBoss" duedate="#{payRaiseDay} + 3 days" repeat="1 week" />

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.