Book Image

jBPM6 Developer Guide

Book Image

jBPM6 Developer Guide

Overview of this book

Table of Contents (21 chapters)
jBPM6 Developer Guide
Credits
About the Author
Acknowledgments
About the Author
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating your own runtime manager


The provided runtime manager implementations are enough to start working with jBPM6 without going into the details of how components are created. However, several organizations reach a point where they need to define specific sharing between processes in a simple way to allow special process instance collaborations through rules. One example of this would be writing monitoring rules that count how many process instances of a specific domain are being created within the last hour that are not yet finished, and take actions when that number reaches high values. This is something that can be easily written in the internal Drools Rule Language (DRL), as shown in the following DRL code:

rule "too many processes"
when 
    $n: Number(intValue > 1000) from accumulate(
        $p: WorkflowProcessInstance() over window:time(1h)
        eval($p.getVariable("domainXProcess") != null)
    )
then 
    externalService.sendWarning("Too many processes created in the last...