2

I need to develop a web-app that would show a list of services provided by our company.One caveat, depending on the value of certain variables(e.g. type of the client, income level, number of children) the cost and duration of the provided services will change.

Notice, that each service is "individual" - it takes different number of variables to form the resulting cost and duration. Now, I am looking for a solution that would allow me to automate the process of input field generation based on the set of variables shown in the business rules.

Right now, I have to MANUALLY create the input fields (most are of radio or dropdown list type) like this

<select id = "myList">
    <option value = "myValue1">one</option>
    <option value = "myValue2">two</option>
    <option value = "myValue3">three</option>
    <option value = "myValue4">four</option>
 </select>

Showing myValueN is the most painful part.

I have 50 services that I have to show on the list and I would hate to write static html like above.

My business rules are on Guvnor business rule editor by JBoss running on a BRMS(DROOLS) server (version 5.4.0)

2 Answers2

0

Some of the options I can think about:

  1. Parse the generated DRL/BRL using regular expressions.
  2. Use drools-verifier to extract the required information from your DRL/BRL.
  3. Use an enum in Guvnor to store those values (you can use a Java enum). Use that same enum to generate your html page.

Hope it helps,

Esteban Aliverti
  • 6,259
  • 2
  • 19
  • 31
0

Did you check the Candidate Release for the new tooling?

salaboy
  • 4,123
  • 1
  • 14
  • 15