Forum

Jennifer Häfner
Moderator
    Has successfully completed the online course Intermediate (200)
    Has successfully completed the online course Advanced (300)
    Has successfully completed the online course Basics (100)
    Has successfully completed the online course Advanced (310)
    Has successfully completed the online course Advanced (320)
    Has successfully completed the Intermediate Certification
    Has successfully completed the Advanced Certification
3 years, 5 months ago #30125
Up
0
Down
::

Hi Christian,

The validation mechanism for Integers/Floats expects some kind of value, so an empty value leads to an error in conversion.

So, if your business process allows empty values here, you need to implement a validation mechanism yourself. There are several possibilities:

1a) Deactivate the validation in the business object. In your BO code, you then need to validate the input values manually (e.g., using Javascript Regex)

1b) You can also do the manual validation before even executing the business object: select your input field in the UI Designer and click on the small button next to the property ‘value’. Here, you can define when the input field is validated and what kind of datatype it should be (see attached image). In the datatype, you can define a Regular Expression and include that the value can be empty. Then, when the user inserts a value that does not match the datatype, the value state of the input field will change to ‘error’. Before executing the BO, you can check if any of the input fields have the value state ‘error’ (this can be done in the Process Designer using a UI action shape), and, if so, display an error message instead of triggering the BO.

2) This only works depending on the business process: you could keep the validation in the BO active and set a zero as the default value in the input fields

 

I hope this information can help you.

Attachments:
You must be logged in to view attached files.