LoginSignup
0
0

More than 1 year has passed since last update.

【Pega】Circumstanceを用いて、条件をもとに異なる画面項目を表示する

Last updated at Posted at 2022-05-10

1 はじめに

本記事では、一つのSectionにおいて、条件をもとに異なる画面項目を表示させる方法(Circumstance)を紹介する

Circumstance:特定のルールまたは状況に応じたルールを作成することで、アプリケーションのロジックを変更することなく、動的にビジネス要件を対応できる。

2 Circumstance Templateを作成

Circumstance Templateを作成する(条件の定義)
・Technical ⇒ Create ⇒ Circumstance Template
image.png
参照する条件(Property)を定義する
image.png

3 Circumstance Definitionを作成

Circumstance Definitionを作成する(条件の指定)
・Technical ⇒ Create ⇒ Circumstance Definition
Template Nameの値は2で作成したテンプレート名
image.png
条件を満たす値を設定する
・CircumstanceFlag が 1 の場合、条件を満たす
image.png

4 SectionのCircumstanceを作成

条件をもとに異なる画面項目を表示させるため、SectionのCircumstanceを作成する
・Save as ⇒ Specialize by circumstance
image.png
Templateの値は2で作成したテンプレート名
Definitionの値は3で作成したデフィニション名
image.png
CircumstanceしたSectionの表示内容を修正する
・Age ⇒ Class
image.png

5 実装結果確認

CircumstanceFlagが1以外の場合、通常のSectionが表示されている
image.png
CircumstanceFlagが1の場合、CircumstanceしたSectionが表示されている
image.png

・Pega環境

 Pega 8.6.1

・参考資料

 Creating a rule specialized by circumstance

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0