Problem executing a rule with no data in the Process Entity.

7 Months Ago
JuanG
Business rules
ERROR

Summary

When you execute a rule in a task where no data has been previously registered in the process entity, you can have an error in the execution of the rule.

Applies to

Bizagi 11.X versions

Symptoms

When you execute a rule that returns null, for example, you want to get the size of a collection that is empty in a form:

 Using the following rule On Save:

var  object  =   Me . getXPath ( "ProcessEntity.collection" );

var  size  =  object . size ();

  the following error message appears:

Cause

The process entity has no data in any attribute (it is not initialized).

Solution

You can define a default value (different from null) in any attribute included within the Process Entity. This can be done executing a rule On Enter of the task


or using default values in any attribute.

 Initializing ONE attribute is enough.

Rate this Article:

Details

Last Modified:7 Months Ago
Last Modified By: JuanG
Type: ERROR
Level: Beginner
Article not rated yet.
Article has been viewed 652 times.

Options