Posted: 15 Jun 2016 11:03 EDT Last activity: 10 Aug 2017 3:15 EDT
How to implement And condition in decision table
This question may be very basic, but we are trying hard to implement a business logic using decision table. In the decision table we have = & != as options and we can add OR conditions by inserting rows. But we need to implement a logic where state is not CA, CO and WI something like that. We tried to included 3 conditions in the same row like (!=CA && !=CO && !=WI) but it didn't work. Anyone please let us know is there any quick work around for this.
Message was edited by: Marissa Rogers - Added category
Can you reverse the logic? Return false (or "exclude") for the states of CA or CO or WI. Then everything that falls through to Otherwise condition will be those that meet your criteria. However, your question implied this is part of a larger, more complex condition. If so, the downside is you might need a separate table for this part. Upside: it might be easier for the next developer to understand the logic. Be sure to look at performance considerations for this approach.
Thanks Peter. That's what even we thought but the difficulty here is it's not only for one column. We have 4 columns in the table and our business logic includes not conditions on all four columns.
Something like not in X states and not belong to X groups like that.
Unless decision table supports and conditions in single row it's very difficult to implement this. Other option is decision tree, but it ends up in so many conditions. As of now we are calculating all this info through a when condition in activity and passing final result as parameter to decision table. Luckily this rule doesn't need delegation.
Please let us know if there is any forum where we can post suggestions/enhancements to Pega Product.
Thanks for your reply Phani. Finally we implemented this using when rule only. As I mentioned above it's not easy for a business user to understand during delegation. So we are expecting to accept "OR", "AND" conditions in the cell level.
Thank you for posting your query in the PSC. This looks like an inactive post and hence, we suggest you create a new post for your query. Click on the Write a Post button that’s available on the top right pane of this page. Once created, please reply back here with the URL of the new post.
You may also refer this discussion link as a reference in the new thread
We have also sent you a private message opening up a communication channel in case you have any further questions.