WELCOME TO THE COMMUNITY
find what you are looking for or ask a new question
Home > Forum > Latest posts

latest posts

Hi,

I have a problem with 2024.1.1.114 and SDK execution. I created an SDK to connect to the SAP and download data from the chosen contractor. The SDK was working from version 2022 to 2023 with some updates to c# code - after updating Webcon and SDK to 2024 i received the error:

ERROR -> Plugin changed transaction nesting count. Please contact administrator.

Interestingly, when I connect the VS debugger to the portal, the error does not occur and the SDK downloads data to the form.

Does anyone have an idea what might be wrong?

MVP

We identified the issue.

In the sample process we added a business rule to log the return value as well as the executed statement. The business rule is a part of the SQL statement.

Screenshot:
1) Is the advanced condition
2) Is the business rule

If you take a really close look, you will notice, that the variabel {WFD_ID} of the advanced condition is resolved to the one of the child instance (32381), which was completed. While the business rule uses the actual instance id 32380.

This means, that we can't work around this as the advanced setting is executed in the context of the subworkflow which is completing

MVP
In reply to: Paweł Tołoczko

Hi,
thank you for help and direction.

I don't know why, but "STRING_SPLIT" is not working ...
(did not recognize function ect. .. with declare I have got the same problem ... - maybe not set proper rights in database .. I don't know)

but dbo.SplitToTable works :D

any way in my scenario the proper code is:

[code="SQL"]
SELECT
a.DET_WFDID AS 'ID elementu',
{DCNCOL_NAME:1174} AS 'Kategoria',
ST.Item AS 'Punkt pytania'
FROM
WFElementDetails a
CROSS APPLY
dbo.SplitToTable(CAST({DCNCOL:1173} AS NVARCHAR(MAX)), ';') AS ST
WHERE
a.DET_WFDID = {WFD_WFDID}
and a.DET_WFCONID={WFCON:3749}
AND a.DET_IsDeleted = 0 -- Opcjonalnie, aby pominąć usunięte wiersze

[/Code]

and for Attribute in form (not Item list):

[code="SQL"]
SELECT
a.WFD_ID AS 'ID elementu',
ST.Item AS 'Punkt normy'
FROM
WFElements a
CROSS APPLY
dbo.SplitToTable(CAST('{3654}' AS NVARCHAR(MAX)), ';') AS ST
WHERE
a.WFD_ID = {WFD_ID}

[/Code]

The STRING_SPLIT function is available in Microsoft SQL Server starting with SQL Server 2016.
See what version you have :)

The other issue is it seems to me that this condition is redundant
AND a.DET_IsDeleted = 0 -- Optionally, to skip deleted rows
In the table, this column always has a value of 0 , and the rows are simply deleted and not marked as inactive. The column is probably some kind of historical past.

Check if you have any entries that are not 0 in the DET_IsDeleted column :)
select DET_IsDeleted, * from dbo.WFElementDetails
where isnull(DET_IsDeleted,0) <> 0

Regards.