How to apply the rules on the data

Hi
I want to use CAMUNDA more as a rules engine instead of a process engine. I’ve integrated the application with CAMUNDA. I’ve developed a BPMN process and all the tasks all business rule tasks integrated with DMN tables. I need to apply those rules on the data. How exactly will the rules be applied? Are the rules applied to each row of the input table? After deploying the BPMN process and respective DMN tables, does each instance of the process apply rules on the each row of the data? For example, if there are 100 rows in a table and does we need to create 100 instances of the process to apply those rules?

Hi @Nani_2000 :wave:
If you only want to use the decision engine I would maybe (depending on your use-case) use the embedded engine from Camunda 7. In such a case you do not need to use any processes at all. → Embedding the DMN Engine | docs.camunda.org.

If you stick with Camunda 8, you will need to start a process instance with variables you want to evaluate later on in your business rule tasks. For the DMN Tables themselves you have hit policies, which specify how everything is being evaluated. Below I added a few links which might be helpful to you.

Hi @Hafflgav ,
I’m going with CAMUNDA 8. And thank you for sharing the resources. I’m looking for an explanation on how exactly the data will be send to the BPMN process. I’ve table with 100 records,

  1. Should I need to give each record as input to the BPMN process?
  2. How many BPMN process instances have to create? Should I create one instance for one record or one instances will read all the 100 records and apply the rules?
  1. You can start the process with a map of variables from a Zeebe client for instance. The map of variables could also contain objects, depending on how your data looks like.

  2. For one evaluation you ideally need to start one process. (e.g. if you to run a decision to evaluate whether an order is valid, you start the process once.

Though there is also a second possibility:
If you have a list of 100 records which all need to pass through the same evaluation, you can run the business rule task as a parallel multi instance activity.
image

It depends on the flavour you would like to go with…
Best,
Thomas

P.s.: Please keep in mind to keep the amount of data in your process as small as possible. There is a limitation of 4MB for each process instance)

1 Like

Thank you @Hafflgav for sharing. Will implement rules this way and get back in the future if required.

1 Like