You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorials/spa-create-decision/spa-create-decision.md
+7-29Lines changed: 7 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -144,31 +144,9 @@ First add this newly created data object as the decision output:
144
144
145
145
You can use the Settings option to easily define these If and Then header expressions with inline suggestions or free-flow typing.
146
146
147
-
9.Lets define the **Decision Table Settings**. Choose **Settings**.
147
+
9.In the newly created *Decision Table*, do the following to add values to condition and result columns:
148
148
149
-
!.
150
-
151
-
10. The **Condition Expressions** need labels, maintain **Shipping Country** for **Shipping Country** condition and **Order Amount** for **Order Amount** condition.
152
-
153
-
This will be what business users see when they are editing the decision rows.
154
-
155
-
11. Choose **Apply** to configure the decision table with selected condition and result columns.
> You will notice *Access* column as the result properties. When you set access as *Hidden*, the respective column will not be seen during rule modelling or modifying decision table.
160
-
161
-
The settings are done, **Condition Expressions**, **Label** as well as **Result** are defined.
162
-
163
-
This completes defining the decision table structure where a decision table is created with two header columns based on Sales Order fields and two result columns based on Approver, as defined in the decision table settings dialog:
164
-
165
-
!
166
-
167
-
After setting the decision table structure – which defines the If and Then expressions – you will fill the decision table rows with values. The rule is then evaluated as: If Shipping Country = 'United Kingdom, India, Germany' then return Email = `someuser@domain.com` and `UserGroup` = `SO_APPROVER`.
168
-
169
-
12. In the newly created *Decision Table*, do the following to add values to condition and result columns:
170
-
171
-
13. For the **Shipping Country** (first column) you will now add the expression value using *rule expression language*.
149
+
10. For the **Determine Approver Input.shippingCountry** (first column) you will now add the expression value using *rule expression language*.
172
150
- Choose the input text box.
173
151
- Copy and paste this expression in the input box: **EXISTSIN ['United Kingdom' , 'India' , 'Germany']**
174
152
@@ -192,11 +170,11 @@ First add this newly created data object as the decision output:
192
170
193
171
> Remember that for all String type data object attributes, you must add a single quote (') before and after the text.
194
172
195
-
14. Choose the input field of **Order Amount** column (second column of the decision table) and enter **<= 100000**.
173
+
11. Choose the input field of **Order Amount** column (second column of the decision table) and enter **<= 100000**.
196
174
197
175
!
198
176
199
-
15. Similarly, enter the following expressions for the respective result column (or **Then** section):
177
+
12. Similarly, enter the following expressions for the respective result column (or **Then** section):
200
178
201
179
| Result Column | Expression
202
180
| :------------- | :-------------
@@ -211,14 +189,14 @@ First add this newly created data object as the decision output:
211
189
212
190
So, for example, for all sales orders coming from India, Germany, or the United Kingdom (the defined shipping countries) which have a value smaller or equal than 100,000 – the first row will run. For all other sales orders, whose value is greater than 100000, the second row will return; and for any other combination that does not match the rows – an empty result will be returned.
213
191
214
-
16. To add a new row to the decision table, do the following:
192
+
13. To add a new row to the decision table, do the following:
215
193
- Choose the check-box of the first row.
216
194
- Choose **Add Row**.
217
195
- From the dropdown options, select **Insert After**.
218
196
219
197
!
220
198
221
-
17. Similarly, enter the following values for the new row:
199
+
14. Similarly, enter the following values for the new row:
222
200
223
201
| Condition Column | Value
224
202
| :------------- | :-------------
@@ -230,7 +208,7 @@ First add this newly created data object as the decision output:
230
208
| `UserGroup` | `SO_MGMNT`
231
209
|`Email`|`your user email`|
232
210
233
-
18. Choose **Save**.
211
+
15. Choose **Save**.
234
212
235
213
> Save will both save and activate the decision table. If there are any validation issues in the decision table, then Save will not happen and the errors will be shown in the **Design Console**
0 commit comments