Applies to version: 2020.3.x and above; author: Paweł Fijał
Introduction
Since the introduction of WEBCON BPS Portal, sometimes on the form or on Portal itself , it was possible to observe pop-ups that inform about the error and their identifier. But they very often did not give enough information, even after clicking the button to show details from the event preview. From version 2020.1.3.277, the error description from the event log has been made available in Designer Studio, which contains much more information to help find the cause more efficiently.
Wrong configuration
A simple invoice workflow has been created, where the “Nett amount PLN” represents the net value of an invoice in PLN (at the exchange rate of the selected currency on the date of the invoice). This field is set by the “Set Nett Amount in PLN” form rule which uses the “Nett amount in PLN” business rule.
The business rule returns a floating-point number calculated with an SQL query. The SQL query returns the result of multiplying the value from the “Nett amount” field and the average rate of the selected currency, where the invoice date is the effective date of the rate.
Fig. 1. The “Nett amount in PLN” business rules
The above business rule is used in the “Set Nett Amount in PLN” form rule that sets the “Nett amount PLN” field.
Fig. 2. The “Set Nett Amount in PLN” form rule
In the “Nett amount” and “Currency” fields add this form rule as a rule executed on the value change.
Fig. 3. Adding the form rule
Error message
Open the form and fill in the “Vendor” and “Invoice date” fields. Complete the “Nett amount” field and let’s try to go to the next field. Then an error message appears in the upper right corner.
Fig. 4. The error message
In the content, there is an error message for the “Nett amount in PLN” rule, the ID of this rule in Designer Studio and a meaningless sequence of characters. This sequence of characters is nothing but an error identifier. You can also click the “More…” link (or click the icon in the upper right corner of the Portal when the error window has disappeared), which will open a new window with an event preview and more information and the error identifier. This identifier is a GUID number, after which you can search for the full content from the logo in Designer Studio.
Fig. 5. The icon with the event preview
Fig. 6. The erorr description
Searching the error log content
Copy the GUID of your error and select the “Action” -> “Administration tool” in Designer Studio menu.
Fig. 7. Administration tools
Select the “Log search (GUID)” option. From the “GUID” field copy the error identifier and click the “Download” button. The full content of the logo will be displayed, which can be saved to a text file using the “Save” button in the lower corner of the tool window.
Fig. 8. Error log searched by GUID
From the text of the “Empty text value cannot be converted to decimal” error, you can guess that one of the values used in the “Nett amount in PLN” rule was empty when executing the rule. Therefore, check your rule and add the condition that if al the variables of your query are not empty, you return the calculated net value in PLN, otherwise you return 0.
Fig. 9. The revised business rule no longer returns an error
Now, when completing any field that uses this rule - the system no longer returns an error.