Home > Forum > General > <SOLVED>ERROR: Global business rule with parameters

<SOLVED>ERROR: Global business rule with parameters
2

Hi, I would like to ask if anyone has encountered such an error when trying to use a global business rule with parameters.
The error occurred on version 2025.1.1.152.

Message:Due to the current state of the object, the operation is invalid.
-------------------------------------------------------
Call path
-------------------------------------------------------
w WebCon.WorkFlow.BusinessLogic.BusinessRules.Nodes.RuleNode.AddParameter(IBusinessRuleNode node, Int32 brpId)
w WebCon.WorkFlow.Studio.Forms.BusinessRules.BasicDesigner.Placeholder.AddBusinessRuleValueNodeCommandMethod(Object obj)
w System.Windows.Input.CommandManager.TranslateInput(IInputElement targetElement, InputEventArgs inputEventArgs)
w System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e)
w System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
w System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
w System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
w System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
w System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
w System.Windows.Input.InputManager.ProcessStagingArea()
w System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
w System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
w System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
w System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
w System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
w MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
w MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
w System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
w System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
w System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
w MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
w System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
w System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
w System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
w System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
w System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
w WebCon.WorkFlow.Studio.Forms.BusinessRules.BusinessRuleCreatorForm.ShowDialog(IWin32Window owner)
w WebCon.WorkFlow.Studio.Forms.ModuleProcess.BusinessRules.BusinessRuleUsageControl.OpenRuleCreatorForm()
w System.Windows.Forms.Control.OnClick(EventArgs e)
w DevExpress.XtraEditors.BaseButton.OnMouseUp(MouseEventArgs e)
w System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
w System.Windows.Forms.Control.WndProc(Message& m)
w DevExpress.Utils.Controls.ControlBase.WndProc(Message& m)
w DevExpress.XtraEditors.BaseControl.WndProc(Message& msg)
w System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
------------------------------------------------------

In reply to: Lukasz Swiszcz (WEBCON)

Hi,

Could you please provide us with more details, such as the definitions of the Business Rules and the related scenario?

Best regards,
Łukasz

The problem I described applies to every global rule that uses a parameter. The error appears when trying to add a rule in form validation.
In the pictures an example of a rule that checks for a duplicate value of a specific attribute in the database.

Privacy overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognizing you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.


To see a full list of the cookies we use and learn more about their purposes, visit our Privacy Policy.