Stateful business rules

Hi, I am creating a contact book application with BPMN. Diagram attached below.

I have two fields in create user user task form - username and contact Number.

Now, I want to add business rules in validate user business rule task such as -

  • users should have unique username.

Can we add conditions / rules like this using DMN? If yes, how?

Can we do this without external tasks / JAVA class?

Hi @NEERAJ_GAHLOT,

Since uniqueness validation requires querying against external users repository (ldap, custom database…), DMN implementation can’t be a valid option.

1 Like

What you can do is to turn this decision task into an external task, and in the worker on that external task first fetch the data you need, turn it into a variable as defined in the DMN model, and the use the REST API to evaluate the decision.

1 Like