Template: Rule Template for Workflow Project
This template should be used for project based on a discovery roadmap using business process or workflow process. The implementation of the business application will use a workflow engine.
Related Elements
Main Description

This document is the analysis and design to support the implementation of a process.

We present the rules organization, the structure of rule projects, the object model under scope, the structure of the data input send by the BPM engine, the data output it receives from the rule engine, and at the end the exceptions to be defined for the rule services and reported back to the BPM workflow engine.

Physical Process Map

Use diagram representing in BPM Notation the business process under scope. Use color coded activity to represent the call to the rule service

The following table may be used to list the process step calling a rule services as detailed in this document

Process Step

Rule Service




Detailed design of each rule service

Use the following table to detail each process step, with some rule description.

Business workflow Process: <name of the process>

Workflow Step: <name of the process step>

Rule Service Name: <rule app rule set name>

Description : <simple description of the service >

Work Item Input structure design:  (define the structure of the work item sent to the rule engine)

JRules rule flow description


Verify the Work item field. If there is an error use the rule set parameter to stop the rule flow.

 Load the business object  from the data source using the DAO layer

        Main / rule flow:


        Post processing:

Commit the transaction if there is no error or rollback if there is at least on error

JRules project structure

Packages hierarchy

Top level package name





Rule set name reference

<Rule App/ rule set>

Work Item Output structure design:

It is a good practice to set some error code, context and message back to the work item so that the process engine can handle exception.

·          Error code  type String

·          Error message   type String

·          Error context type String

·          ….


List here the possible reporting-exception messages, for example:

·          object identifier not valid in the work item (null, "")

·          object not found in the data source (DS)

·          Impossible to create or update object...