Home
Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Registered members
Current visitors
New profile posts
Search profile posts
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
Pega Topic Wise Interview Questions and Answers
Pega - Declarative Rules
Pega - Declarative Rules Interview Questions and Answers
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="AllJobsInfo" data-source="post: 15" data-attributes="member: 1"><p style="text-align: center"><strong><span style="color: rgb(44, 130, 201)"><span style="font-size: 22px">Declare Expression</span></span></strong></p><p><strong>1.Declare expression assigns value to a target property.</strong></p><p><strong>A = B+C</strong></p><p><strong></strong></p><p><strong>A is target property</strong></p><p><strong>B and C are source proeprties.</strong></p><p><strong></strong></p><p><strong>Declare expression gets executed whenever there is a change in source property values. This is called “Forward Chaining”.</strong></p><p><strong></strong></p><p><strong>Go to my you tube channel to watch backward chaining.</strong></p><p><strong></strong></p><p><strong>*Declare expression is an alternate rule to activities property-set</strong></p><p><strong>Activity or DTf we need to call, where as Declare expression no need to call.</strong></p><p><strong></strong></p><p><strong><span style="color: rgb(226, 80, 65)">2. I want to restrict a property to be not used as a target property in declare expression, by developers. How to do it?</span></strong></p><p><strong>Go to property -->Advanced tab --> Select “Cannot be a declarative Target”.</strong></p><p></p><p>[ATTACH=full]35[/ATTACH]</p><p></p><p><strong><span style="color: rgb(226, 80, 65)">3. We have a property A, which is target property in Declare Expression. Can I use this Property ‘A’ to assign a value using activity or DTF? YES/NO, Why? </span></strong></p><p><strong>A. NO, we can not use that. Because a target property of expression cannot be assigned from any other rule.If we use, PRPC throws compilation error.</strong></p><p><strong></strong></p><p><strong>For Your Inofrmation--></strong></p><p><strong>We used to have change tracking tab in declare expression before Pega 8.2 version. From 8.2 onwards it has been removed for below reason. Still we can access it.</strong></p><p><strong>Change tracking tab removed from declare expressions</strong></p><p><strong>To simplify declare expression configuration, the Change tracking tab has been removed from the declare expression rule form. To use the Change tracking tab, on the declare expression rule form, click Actions > Use legacy expression.</strong></p><p><strong>To access older version rule form of declare expression.</strong></p><p><strong>[ATTACH=full]36[/ATTACH]</strong></p><p></p><p>[ATTACH=full]37[/ATTACH]</p><p></p><p><strong>Now, we got change tracking tab.</strong></p><p><strong>Done.</strong></p><p><strong></strong></p><p><strong><span style="color: rgb(226, 80, 65)">Question : Is declare expression forward or backward chaining?</span></strong></p><p><strong>Answer : It has both behaviours.</strong></p><p><strong></strong></p><p style="text-align: center"><strong><span style="color: rgb(44, 130, 201)"><span style="font-size: 22px">Declare On change</span></span></strong></p><p><strong></strong></p><p><strong><span style="color: rgb(226, 80, 65)">1.What should be the activity type when we call it from declare on change</span></strong></p><p><strong>A.OnChange</strong></p><p><strong></strong></p><p><strong><span style="color: rgb(226, 80, 65)">2.The property-set we do using declare expression, the same can be done in declare on change as well.</span></strong></p><p><strong><span style="color: rgb(226, 80, 65)">Then why we need declare expression as a separate?</span></strong></p><p><strong>A.Declare on change is only forward chaining, whereas declare expression has backward chaining is also possible.</strong></p><p><strong>Declare on change can do, what a declare expression does, only in case of Forward chaining manner but, a declare expression’s backward chaining cannot be done by declare on change rule.</strong></p><p><strong></strong></p><p><strong><span style="color: rgb(226, 80, 65)">3.Can we do property-set (in the Onchange activity) of same property(s) which are involved in declare on change rule? What happens if we do it?</span></strong></p><p><strong>A.The processing or execution of activity go into INFINITE LOOP.</strong></p><p><strong></strong></p><p><strong><span style="color: rgb(226, 80, 65)">4.If we directly update a property value from clipboard, which is involved in declare on change rule. Does it executed Onchange rule?</span></strong></p><p><strong>A.Yes, it does.</strong></p></blockquote><p></p>
[QUOTE="AllJobsInfo, post: 15, member: 1"] [CENTER][B][COLOR=rgb(44, 130, 201)][SIZE=6]Declare Expression[/SIZE][/COLOR][/B][/CENTER] [B]1.Declare expression assigns value to a target property. A = B+C A is target property B and C are source proeprties. Declare expression gets executed whenever there is a change in source property values. This is called “Forward Chaining”. Go to my you tube channel to watch backward chaining. *Declare expression is an alternate rule to activities property-set Activity or DTf we need to call, where as Declare expression no need to call. [COLOR=rgb(226, 80, 65)]2. I want to restrict a property to be not used as a target property in declare expression, by developers. How to do it?[/COLOR] Go to property -->Advanced tab --> Select “Cannot be a declarative Target”.[/B] [ATTACH type="full"]35[/ATTACH] [B][COLOR=rgb(226, 80, 65)]3. We have a property A, which is target property in Declare Expression. Can I use this Property ‘A’ to assign a value using activity or DTF? YES/NO, Why? [/COLOR] A. NO, we can not use that. Because a target property of expression cannot be assigned from any other rule.If we use, PRPC throws compilation error. For Your Inofrmation--> We used to have change tracking tab in declare expression before Pega 8.2 version. From 8.2 onwards it has been removed for below reason. Still we can access it. Change tracking tab removed from declare expressions To simplify declare expression configuration, the Change tracking tab has been removed from the declare expression rule form. To use the Change tracking tab, on the declare expression rule form, click Actions > Use legacy expression. To access older version rule form of declare expression. [ATTACH type="full"]36[/ATTACH][/B] [ATTACH type="full"]37[/ATTACH] [B]Now, we got change tracking tab. Done. [COLOR=rgb(226, 80, 65)]Question : Is declare expression forward or backward chaining?[/COLOR] Answer : It has both behaviours. [/B] [CENTER][B][COLOR=rgb(44, 130, 201)][SIZE=6]Declare On change[/SIZE][/COLOR][/B][/CENTER] [B] [COLOR=rgb(226, 80, 65)]1.What should be the activity type when we call it from declare on change[/COLOR] A.OnChange [COLOR=rgb(226, 80, 65)]2.The property-set we do using declare expression, the same can be done in declare on change as well. Then why we need declare expression as a separate?[/COLOR] A.Declare on change is only forward chaining, whereas declare expression has backward chaining is also possible. Declare on change can do, what a declare expression does, only in case of Forward chaining manner but, a declare expression’s backward chaining cannot be done by declare on change rule. [COLOR=rgb(226, 80, 65)]3.Can we do property-set (in the Onchange activity) of same property(s) which are involved in declare on change rule? What happens if we do it?[/COLOR] A.The processing or execution of activity go into INFINITE LOOP. [COLOR=rgb(226, 80, 65)]4.If we directly update a property value from clipboard, which is involved in declare on change rule. Does it executed Onchange rule?[/COLOR] A.Yes, it does.[/B] [/QUOTE]
Verification
Post reply
Home
Forums
Pega Topic Wise Interview Questions and Answers
Pega - Declarative Rules
Pega - Declarative Rules Interview Questions and Answers
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top