In reply to: Raluca-Mirabela Lupu
Hi,
I used sql profiler and I remarked the problem.
The defined parameters from global business rule is recognized in the first global business rule from sql script ( from the concatenate multiple global business rules from sql script ), but isn't recognized in second business rule.
In the attached image I showed the problem
The script sql from sql profiler for first global business rule from the concatenate multiple global business rules from sql script is :
SELECT WFD_AttText4
FROM WFElements
WHERE WFD_ID = '43637'
For second global busines rule is:
SELECT
(CASE
WHEN WFD_STPID = 152 THEN 'în faliment, in bankruptcy, en faillite'
WHEN WFD_STPID = 170 THEN 'in reorganizare judiciara, in judicial reorganisation, en redressement'
ELSE 'în insolvenţă, in insolvency, en procedure collective'
END) as R
FROM WFElements
WHERE WFD_ID = '{BRP:177}'In the second and other business rules besides the first business rule, the mapped parameters are not known.
Hi Raluca,
as you noticed, the question is, why was the parameter not replaced. I had this case once, but this was when I used the PowerShell action. The {} of the script block caused the problem, but I doubt you have similar problem here.
Unfortunately I wasn't able to reproduce it. I used one business rule, which referenced two others, and the second one used the first one. Every rule, except the first one has a parameter and these are all replaced correctly. The screenshot looks a bit confusing because of the nested rules and their parameters. You will notice that there's no need to declare a variable, a simple select will be sufficient.
On a side note, I cloned one of the rules and the parameter wasn't correctly replaced. Maybe it's worth to check you rules whether the string '{BRP:177}' is really a text instead of a parameter.
I'm using BPS 2022.1.1.41.
Best regards,
Daniel