Decision Tables and Choice type variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I had a requirement to send an email notification to a specific email address depending on a condition. My first thought was, I am going to do an if else in a Flow Designer. However, after talking with a colleague, she told me the best approach to would be with a decision table. Which, does not need the use of if else statement in Flow Designer, and whenever the business conditions changes, it can be updated direct in the Decision Table, without editing the Flow Designer.
Another advantage is an excel can be exported and shared with the business for them to update it, and after it can be imported with the required changes.
Since, I did not know anything about Decision Table, I started to read how to implement it. I am writing this because I don’t want you to suffer like I did, so, I am going to share with you what I discovered so far about Decision Table.
I created my Decision Table with the three inputs and the conditions that I needed. In my case there are three variables that are reference type, where two are from the Question Choice [question_choice] table and one is from Location [cmn_location] table.
Decision Table created, now is time to use it the in the Flow Designer, with the Make a Decision flow logic. In the Decision table inputs you can use the Get Catalog Variables pills.
However, if you have a Choice type variable you can not use it in the Make a Decision.
It is not the end of the world since you can do a workaround 😅.
I created Flow Variables of reference type to store the variable values:
And I used the Look Up Record action to find the question choice sys_id record.
And I use the Set Flow Variables with the values of the look up action.
And I used the Flow Variables in the Make a Decision flow logic.
Now it is time to see the test results:
Please, share your thoughts on this and let me know if there is any way that I can improve my logic 😉.
- 525 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Raquel Pio ,
That's great use of decision table, we can edit the rules in excel and import the rules in decision table. It's is maintainable and scalable as well.
Thank you for sharing.
Thanks,
Bhimashankar H
-------------------------------------------------------------------------------------------------
If my response points you in the right directions, please consider marking it as 'Helpful' & 'Correct'. Thanks!