Answered

Custom Message for Duplicate Business Key

Dear Support Team,

Can I customize message for duplicate business key?

639e3867546a67e598595cd8807dffe4

Here in this process I have set business key on name attribute in master entity.

When I enter duplicate value in name field in the form it produces an error as expected.

But from the error message how an end user can identify that the business (unique) key is set on name field.

Regards,

Chetan Sindhi

Comments (3)

photo
1

Dear Chetan,

In order to display a correct message to end users, you require to create an expression to validate if the user has entered repeated value. Please follow these steps:

1. Create an expression using the function: CHelper.getEntityAttrib("Entity","ValueToReturn","filter","") to obtain values according the filter. For further information: http://help.bizagi.com/bpmsuite/en/index.html?obtain_and_use_entity_values.htm

2. After you have validated this information, you need to set a message to end user with the following function: CHelper.ThrowValidationError("sMessage") For further information: http://help.bizagi.com/bpmsuite/en/index.html?data_validation.htm

3. Finally, you can create traces to review your expression. To do this, use this function: CHelper.trace("FileName","Trace text" + Attribute/Variable) For further information: http://help.bizagi.com/bpmsuite/en/index.html?validating_my_business_r.htm

Use the latest article as an example to follow as you need.

hmfile_hash_d6af183a

Regards

photo
2

Dear Juan,

I would really like to thank and appreciate your prompt reply.

I have already applied a similar solution using expression and it is working successfully without any error.

However, assume when we have thousands of records in our master entity containing a business key and we try to insert a record which doesn't contain a duplicate value for business key then also it will perform as many comparisons as the number of records in the master entity. So the complexity order of this approach when we try to insert a record in a master entity containing a business key will be o(n), where n is the number of records. It would have been better if it can be done using the back-end exception handling or if we could configure an error message in the window where we define a business key.

photo
1

Dear Chetan,

Currently our product does not include this feature. We invite you to use our feedback platform on the ideas space to post your request.

This platform will allow you to share your ideas so that the whole Bizagi BPM Suite community can vote and discuss them. We want to make sure we solve the needs of our clients, so that we can add the features you consider most important.

regards