2.3.2. FEEL の組み込み関数


他のプラットフォームやシステムとの相互運用性を促進するために、FEEL (Friendly Enough Expression Language) には組み込み関数のライブラリーが含まれています。組み込みの FEEL 機能は、DMN デシジョンサービスで関数を使用できるように、Drools の Decision Model and Notation (DMN) エンジンで実装されています。

以下のセクションでは、NAME( PARAMETERS ) の形式で記載されている、FEEL の組み込み関数ごとに説明します。DMN における FEEL の詳細は、OMG の Decision Model and Notation specification を参照してください。

2.3.2.1. 変換関数

以下の関数は、異なるタイプの値同士での変換をサポートします。以下の例のように、これらの関数の一部は、特定の文字列形式を使用します。

  • date string: 2020-06-01 など、XML Schema Part 2: Datatypes ドキュメントで定義されている形式に準拠します。
  • time string: 以下のいずれかの形式に従います。

    • 23:59:00z など、XML Schema Part 2: Datatypes ドキュメントに定義されている形式
    • 00:01:00@Etc/UTC など、ISO 8601 で定義したローカルの時間の後に @ および IANA タイムゾーンを続けた形式
  • date time string: 2012-12-25T11:00:00Z のように、date string の後に Ttime string 列が続く形式に従います。
  • duration string: P1Y2M などの XQuery 1.0 and XPath 2.0 Data Model に定義されている days and time duration および years and months duration の形式に従います
date( from ) - date の使用

fromdate 値に変換します。

Expand
表2.3 パラメーター
パラメータータイプ形式

from

string

date string

date( "2012-12-25" ) - date( "2012-12-24" ) = duration( "P1D" )

date( from ) - date and time の使用

値を from から date に変換し、時間のコンポーネントを null に設定します。

Expand
表2.4 パラメーター
パラメータータイプ

from

date and time

date(date and time( "2012-12-25T11:00:00Z" )) = date( "2012-12-25" )

date( year, month, day )

指定の year、month、および day の値から date を生成します。

Expand
表2.5 パラメーター
パラメータータイプ

year

number

month

number

day

number

date( 2012, 12, 25 ) = date( "2012-12-25" )

date and time( date, time )

指定した日付から date and time を生成して、時間のコンポーネントと指定の時間を無視します。

Expand
表2.6 パラメーター
パラメータータイプ

date

date または date and time

time

time

date and time ( "2012-12-24T23:59:00" ) = date and time(date( "2012-12-24" ), time( "23:59:00" ))

date and time( from )

指定の文字列から date and time を生成します。

Expand
表2.7 パラメーター
パラメータータイプ形式

from

string

date time string

date and time( "2012-12-24T23:59:00" ) + duration( "PT1M" ) = date and time( "2012-12-25T00:00:00" )

time( from )

指定の文字列から time を生成します。

Expand
表2.8 パラメーター
パラメータータイプ形式

from

string

time string

time( "23:59:00z" ) + duration( "PT2M" ) = time( "00:01:00@Etc/UTC" )

time( from )

指定のパラメーターから time を生成し、日付コンポーネントを無視します。

Expand
表2.9 パラメーター
パラメータータイプ

from

time または date and time

time(date and time( "2012-12-25T11:00:00Z" )) = time( "11:00:00Z" )

time( hour, minute, second, offset? )

指定した hour、minute、および second のコンポーネント値から time を生成します。

Expand
表2.10 パラメーター
パラメータータイプ

hour

number

minute

number

second

number

offset (任意)

days and time duration または null

time( "23:59:00z" ) = time(23, 59, 0, duration( "PT0H" ))

number( from, grouping separator, decimal separator )

指定の区切り文字を使用して fromnumber に変換します。

Expand
表2.11 パラメーター
パラメータータイプ

from

有効な数字を表す string

grouping separator

スペース ( )、コンマ (,)、ピリオド (.)、または null

decimal separator

grouping separator と同じタイプですが、同じ値は使用できません。

number( "1 000,0", " ", "," ) = number( "1,000.0", ",", "." )

string( from )

指定のパラメーターを文字列表現にします。

Expand
表2.12 パラメーター
パラメータータイプ

from

null 値以外の値

string( 1.1 ) = "1.1"
string( null ) = null

duration( from )

fromdays and time duration、または years and months duration に変換します。

Expand
表2.13 パラメーター
パラメータータイプ形式

from

string

duration string

date and time( "2012-12-24T23:59:00" ) - date and time( "2012-12-22T03:45:00" ) = duration( "P2DT20H14M" )
duration( "P2Y2M" ) = duration( "P26M" )

years and months duration( from, to )

指定した 2 つのパラメーター間の years and months duration を計算します。

Expand
表2.14 パラメーター
パラメータータイプ

from

date または date and time

to

date または date and time

years and months duration( date( "2011-12-22" ), date( "2013-08-24" ) ) = duration( "P1Y8M" )

Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

Red Hat ドキュメントについて

Legal Notice

Theme

© 2026 Red Hat
トップに戻る