Skip to main content
July 14, 2023
Question

Decision table set operations and using external reference data

  • July 14, 2023
  • 4 replies
  • 0 views

Hi everyone. I hope you're looking forward to the weekend. I am asking for ideas to handle the following scenarios with the decision table feature. 

Scenario 1:

An input is a list of strings with variable sizes. 

Example input instances:

[ "value 1", "value 2", "value 3"]

[ "value a", "value b"]

The input list of variable sizes is checked against a predetermined set of items to answer the following question. Do the input list items exist in the predetermined set of items?

given this input [ "value 1", "value 2", "value 3"]  does at least 1 input element contains in { "value x", "value y", "value 2"}? In this case, the result will be true. 

Question: what is the best approach to solving this scenario?

Scenario 2:

The following document indicates the following. 

Leverage existing application reference data: Decisions can use your application reference data (like case statuses) that is stored in constants, database tables, or external systems in their logic, so you don't have to duplicate the entry of these values.

https://docs.appian.com/suite/help/23.2/Appian_Decisions.html#:~:text=Leverage%20existing%20application%20reference%20data,the%20entry%20of%20these%20values

Love to get your help to point me to additional information to do this so that I can create the following rule.

Input "status_code_21Z" contains in the list of emergency_status_codes? The emergency_status_codes is a dynamic list for another system

Thank you kindly for your support. 

4 replies

shikhat
July 14, 2023

Hii,

For this can you try with difference function which will give you extra values given in array1. We can compare using more but just for initial easier steps.

Ex:

difference(
{"value1","value2","value3"},
{"value1","value2"}
)

[quote userid="249573" url="~/discussions/f/rules/29339/decision-table-set-operations-and-using-external-reference-data"]given this input [ "value 1", "value 2", "value 3"]  does at least 1 input element contains in { "value x", "value y", "value 2"}? In this case, the result will be true.[/quote]

For below can't you use contains function? Get the status codes and then check for the value

Input "status_code_21Z" contains in the list of emergency_status_codes? The emergency_status_codes is a dynamic list for another system

Tha

Thanks

Shikha

July 14, 2023

Is see. Thank you for your reply. The idea of still desirable - Leverage existing application reference data: Decisions can use your application reference data (like case statuses) that is stored in constants, database tables, or external systems in their logic, so you don't have to duplicate the entry of these values

Is there a detailed documentation to do this?

stefanhelzle0001
July 14, 2023

Why use a decision table for this? Seems like a case for the intersection() function.

July 14, 2023

The idea is using Appian as the rules engine and other applications can call this decision table via API. Thanks for your support.