【Pega Platform】Senior System Architect 学習記録2

4　Team Application Development
　4.1　Parallel development
　　4.1.1　Parallel development
　　　　branch rulesets：
　　　　・Is based on (branched from) another ruleset
　　　　・Contains rules that are in active development in the associated branch

　4.2　Developing in parallel by branching rulesets
　　4.2.1　Developing in parallel by branching rulesets
　　　①．Creates a team application built on the main application
　　　②．Creates one or more development branches in the team application
　　　③．Grants access to the team application
　　　④．Creates or configures rules using the branch
　　　⑤．Merges each branch into the application rulesets when development in branches is complete and stable
　　4.2.2　Create a team application
　　　　・Save Asを利用する
　　　　・開発機能でApplicationを命名する
　　　　![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/258181/92a9e948-bf43-68b1-f803-cf21343cbcc9.png)
　　4.2.3　Create branches in the team application
　　4.2.4　Grant access to the team application
　　　　・Verify that the access roles are sufficient to develop and test the application.
　　　　・Reference the work pool for the main application.
　　　　・Specify the correct portal, such as the Developer portal for application developers.
　　4.2.5　Configure rules using branches
　　　　・A team development application, built on the main application
　　　　・Branches defined in that team development application
　　　　![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/258181/d3581fd8-8898-cbee-1a1a-a1f7330e9a7e.png)

　4.3　Merging changes from a branched ruleset
　　4.3.1　Merging changes from a branched ruleset
　　　　・Merge Branch Rulesets wizard
　　4.3.2　Merge branches when development is stable
　　　　・Merge成功
　　　　![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/258181/2c6b526c-8fd3-8c13-4f94-52b30183cda9.png)
　練習)．
　　・Application record（Application menu ⇒ Definition）
　　・guardrails warnngs、merge conflicts等の確認：「Branch quality」タグ


5　Rule resolution
　5.1　Rule resolution
　　5.1.1　Rule resolution
　　　　・ruleの探すルート、どのruleを選ぶ
　　　　・以下のruleは対象外
　　　　　・Operator IDs (Data-Admin-Operator-ID)
　　　　　・Email listeners (Data-Admin-Connect-EmailListener)
　　　　　・Operator's favorites (System-User-MyRules)
　　　　　・The rule check-in process (Work-RuleCheckIn)
　　5.1.2　Inputs to the rule resolution algorithm
　　　　・Predefined rule keys that are used as a unique identifier, such as the Apply to: class, rule name, and rule type
　　　　・User's ruleset list
　　　　・Class hierarchy of the rule in question
　　　　・Circumstances such as the value of a property, or time and date restrictions
　　　　・Availability of the rule
　　　　・User's access roles and privileges

　5.2　How the rules cache is populated
　　5.2.1　How the rules cache is populated
　　　　・Rules Cache
　　　　![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/258181/18eb2b62-c808-e594-4b86-146e2fccdc86.png)
　　5.2.2　Choose all instances with the correct purpose
　　5.2.3　Discard rules where Availability = Not Available
　　5.2.4　Discard inapplicable rulesets and versions
　　　　・Ruleset list：ruleset name and a Major-Minor version number
　　5.2.5　Discard all candidates not defined in a class in the ancestor tree
　　5.2.6　Rank remaining rule candidates
　　　　・ソート⇒Withdrawnを除去⇒候補ruleを確定
　　5.2.7　Sort the remaining rule candidates
　　　　・順序：Class, Ruleset, Circumstance, Circumstance Date, Date/Time Range, then Version
　　5.2.8　Remove rule candidates with an Availability set to Withdrawn
　　5.2.9　Determine default rule candidate
　　　　・default rule以下のruleを除去
　　5.2.10　Set the rules cache

　5.3　The rule resolution process
　　5.3.1　How the rule resolution process works
　　<img width="700" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/258181/72ba47bb-5389-e198-b5d8-4255727b5175.png">
　　5.3.2　Find the rule in the rules cache
　　5.3.3　Find the best instance and check for duplicates
　　　　・Qualifierを満たすこと（満たさない場合、Default ruleを選定）
　　5.3.4　Find the best instance and check for duplicates
　　5.3.5　Confirm the rule is available for use
　　　　・Availability = Blocked：エラーメッセージが出る
　　5.3.6　Verify the user is authorized to use the rule
　　　　・Privilege

　5.4　Rule resolution process and rule availability
　　5.4.1　Rule resolution process and rule availability
　　<img width="700" alt="image.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/258181/8a6f4109-b8a4-7781-2f50-08d2e1af7b36.png">
　　　・availabilityの値：Available、Final、Not Available、Blocked、Withdrawn
　　5.4.2　Availability = Available
　　　・Default Value
　　5.4.3　Availability = Final
　　　・edit、copyできない
　　5.4.4　Availability = Not Available
　　　・executeできない
　　　・エラーがあっても保存できる
　　5.4.5　Availability = Blocked
　　　・executeできない
　　　・実行すると、エラーメッセージが出る
　　5.4.6　Availability = Withdrawn
　　　・executeできない
　　　・classは同じ、versionより以下のruleは無効