3

is it possible to enrich data of MSSQL Database with the KIE Workbench?

I've installed the KIE Workbench(6.4.0) and the Execution Server(6.4.0) under Wildfly(8.1) and both are working fine. But now I've to create a Data Object with values from a MSSQL Database.

How can I bind the Database and fill the values of the Data Object? I don't have a clue, please help

Marv174
  • 33
  • 7
  • It is normally the application which obtains data from the database and puts the facts inside the working memory. There is `from` in drools, but you should not really load data from the database in your rules – raphaëλ Jul 25 '16 at 12:06
  • Im not sure if I correctly understand you, but I thought the KIE Workbench is the application and I can create a data object or data objects which load the informations from the database (inside the working mermory), so that i can save a value into the database depending on the other fields. – Marv174 Jul 25 '16 at 15:18
  • the KIE workbench is an authoring and governance application. – raphaëλ Jul 25 '16 at 15:20
  • So you think there is no possibility to use the KIE Workbench? Any suggestions how I can determine a value on the basis of fields in the database while using drools? – Marv174 Jul 26 '16 at 08:16

1 Answers1

1

The Kie workbench is an authoring and governance application for kie resources (jbpm, drools etc) You will need to build an application.

There are two ways how data from a database can make into the working memory of drools:

  1. Pushing in the facts from outside using the kie api
  2. using from and pull in data from the database using some custom java code (often known as a repository class or by the earlier term dao/data acess objects

By far the first option is the preferred method. A rule set is about facts and rules, not how or where you obtain those facts from.

A common deployment strategy is:

  • Create a maven archetype for the facts
  • Define rules in a kie module
  • Create an application that uses the facts and rules from above

You can manage and govern the rules in business central. Once you "build & deploy", the kie module with the rules is available in the maven repository.

The application (a third archetype) would then either pull in the rules at build time or at run-time (using maven/wagon)

You could also use an "execution server". In this scenario you deploy the rules to a drools run-time engine and use a remote API (e.g. JMS, HTTP) to push in the facts / fire the rules.

However IMHO rules don't really lend themselves well for a shared/remote approach. But it really depends on your Applications Architecture(!) In contrast jbpmn typically requires a shared remote run-time engine (as there are typically many applications involved with a single business process)

raphaëλ
  • 6,393
  • 2
  • 29
  • 35