Declarative Interview Questions : Part 5

  1. Your business have given a use case like this: User will enter their date of birth and the age will be automatically populate. How will you do that ?

Ans : I will use declare expression and will get it by substracting the Date of birth from current date time

 

  1. Sticking to the same question, you are taking two date types parameter, but age is not date type . So how will you convert from date time to integer ?

Ans : I will use datetimedifference function

 

  1. Using declare expression is a way of performing forward chaining or backward chaining ?

Ans : Both. If you select, Whenever input changes, the it is Forward chaining. Whenever used indicates backward chaining.

 

  1. Your business wants to give provision to your end manager to adjust the calculation of final loan disbursed amount ( by offering some random discount ) . How you can do this?

Ans: We can delegate the declare expression rule to the manager.

 

  1. A developer complained that he has successfully created a property but when he is trying to define expression for the same, it is failing to do that. What could be the possible reason ?

Ans : Check whether Cannot be declarative target is checked or not. It should be unchecked.

 

  1. Can you use symbolic page or primary page ?

Ans : No. You can not use symbolic page names such as primary or step-page here, because they are meaningful only in an activity execution contex

 

  1. Can you create a declare expression on a property defined in Rule-Declare class ?

Ans : No

 

  1. Can you define Declare expression on page list properties ?

Ans : Yes we can. Under the page context field,  identify a Page List or Page Group property reference plus parentheses, starting with a period and omit any index between parentheses ..

 

  1. Suppose you have created two declare expression for the same property. One is with page context : myPage.EmployeeAge and other is only the property EmployeeAge. At run time which one will run ?

 

Ans : The one with longer reference will execute.

 

  1. What are the decision rules you can refer from declare expression ?

Ans : Decision tree, decision table and map value

 

  1. Can you fire a declare expression from an onChange type activity ?

Ans : no you cant


Suggest an Edit

Suggested Posts

Provide Delivery Details
* indicates required field
×