Editing business rules in a UI

18 views
Skip to first unread message

Jason Owen

unread,
Aug 24, 2017, 4:36:12 PM8/24/17
to psm-dev
One of our goals is to allow states to add, edit, and delete business rules around the enrollment process. Here are a few of the existing rules in the system:

- Contact Phone Number Must Be In A Valid Format
- Date of Birth cannot be in the future
- Organization Address Is Required

Currently, these rules live in a set of text files that are compiled into the application, which means that changing these rules requires recompiling and redeploying. It also means that different states that want different rules will have to somehow maintain those rules somewhere and make them available at compile time.

The alternative is to have a server that maintains these rules which can be updated at runtime. Guvnor provides a way to store the rules, makes them available via HTTP, and presents a web UI for editing those rules. Thanks to Dan's work, I was able to configure the demo server to load its rules from a Guvnor server, and I was able to add a new rule which the demo server picked up!

I've written up some notes on how to configure the PSM to talk to a Guvnor instance, and Dan has written a script to create a new Guvnor instance.

Attached are some screenshots of the web UI for editing rules.

Thanks,
Jason
guvnor-1-rule-list.png
guvnor-2-rule-view.png

Cecilia Donnelly

unread,
Aug 25, 2017, 11:38:56 AM8/25/17
to psm...@googlegroups.com
Thanks, Jason!

As a test, Jason added a new rule that required providers to be born on New Year's Day (any year).  I've attached screenshots of what that new rule looks like in our rules server and the error that shows up on the demo server when I enter a provider that was *not* born on New Year's Day.

Cecilia

--
You received this message because you are subscribed to the Google Groups "psm-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psm-dev+unsubscribe@googlegroups.com.
To post to this group, send email to psm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psm-dev/b18d2714-6ca3-4367-9cf3-7bee27778a58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
rule-error.png
rules-server.png

Jason Owen

unread,
Aug 25, 2017, 1:55:24 PM8/25/17
to psm-dev
There are a few different rules formats the web UI supports. All the existing rules that we imported, as well as the sample "New Year's Baby" rule I created, are "Technical Rules", which are edited as text and are effectively code. There are a bunch of reasons this is an improvement, but it's not the only option!

Another rule format is a "Business Rule", and there is a guided editor for this rule type. I used the guided editor to create another new rule to prevent people from signing up with the SSN 000-00-0000. See the attached screencast for how it works!

Jason


On Friday, August 25, 2017 at 11:38:56 AM UTC-4, Cecilia Donnelly wrote:
Thanks, Jason!

As a test, Jason added a new rule that required providers to be born on New Year's Day (any year).  I've attached screenshots of what that new rule looks like in our rules server and the error that shows up on the demo server when I enter a provider that was *not* born on New Year's Day.

Cecilia
On Thu, Aug 24, 2017 at 3:36 PM, Jason Owen <jason...@opentechstrategies.com> wrote:
One of our goals is to allow states to add, edit, and delete business rules around the enrollment process. Here are a few of the existing rules in the system:

- Contact Phone Number Must Be In A Valid Format
- Date of Birth cannot be in the future
- Organization Address Is Required

Currently, these rules live in a set of text files that are compiled into the application, which means that changing these rules requires recompiling and redeploying. It also means that different states that want different rules will have to somehow maintain those rules somewhere and make them available at compile time.

The alternative is to have a server that maintains these rules which can be updated at runtime. Guvnor provides a way to store the rules, makes them available via HTTP, and presents a web UI for editing those rules. Thanks to Dan's work, I was able to configure the demo server to load its rules from a Guvnor server, and I was able to add a new rule which the demo server picked up!

I've written up some notes on how to configure the PSM to talk to a Guvnor instance, and Dan has written a script to create a new Guvnor instance.

Attached are some screenshots of the web UI for editing rules.

Thanks,
Jason

--
You received this message because you are subscribed to the Google Groups "psm-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psm-dev+u...@googlegroups.com.

To post to this group, send email to psm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psm-dev/b18d2714-6ca3-4367-9cf3-7bee27778a58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
New Rule.webm
Reply all
Reply to author
Forward
0 new messages