HOME DOCUMENTATION DOWNLOADS BLOG

UserAndRoles - cannot open form - rule error

I try to open UserAndRoles in 2020.1 form, but I get an error.

Stack trace follows:

Error when loading form
Rule evaluation failed. Rule: ‘IsBusinessPartner_HasUsernameAndIsUserLockedOut’

========================================
Rule evaluation failed. Rule: ‘IsBusinessPartner_HasUsernameAndIsUserLockedOut’


Function ‘AS:IsUserLockedOut()’ has failed.

Value cannot be null.
Parameter name: type

========================================
Stack trace

at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at Origam.Reflector.InvokeObject(String classname, String assembly) in d:\a\1\s\Origam.Common\Reflector.cs:line 188
at Origam.Workbench.Services.ServiceAgentFactory.GetAgent(String serviceName, Object ruleEngine, Object workflowEngine) in d:\a\1\s\Origam.Workbench.Services\ServiceAgentFactory.cs:line 163
at Origam.Rule.RuleEngine.IsUserLockedOut(String userId) in d:\a\1\s\Origam.Rule\RuleEngine.cs:line 325
at Origam.Rule.IsUserLockedOutFunction.Invoke(XsltContext xsltContext, Object[] args, XPathNavigator docContext) in d:\a\1\s\Origam.Rule\RuleEngine.cs:line 5376
at MS.Internal.Xml.XPath.FunctionQuery.Evaluate(XPathNodeIterator nodeIterator) at MS.Internal.Xml.XPath.FunctionQuery.Evaluate(XPathNodeIterator nodeIterator)
at MS.Internal.Xml.XPath.BooleanFunctions.toBoolean(XPathNodeIterator nodeIterator)
at MS.Internal.Xml.XPath.BooleanFunctions.Evaluate(XPathNodeIterator nodeIterator)
at MS.Internal.Xml.XPath.BooleanExpr.Evaluate(XPathNodeIterator nodeIterator)
at System.Xml.XPath.XPathNavigator.Evaluate(XPathExpression expr, XPathNodeIterator context)
at System.Xml.XPath.XPathNavigator.Evaluate(XPathExpression expr)
at Origam.Rule.RuleEngine.EvaluateXPath(String xpath, Boolean isPathRelative, OrigamDataType returnDataType, XPathNavigator nav, XPathNodeIterator contextPosition) in d:\a\1\s\Origam.Rule\RuleEngine.cs:line 4203
at Origam.Rule.RuleEngine.EvaluateRule(XPathRule rule, IXmlContainer context, XPathNodeIterator contextPosition) in d:\a\1\s\Origam.Rule\RuleEngine.cs:line 4168
at Origam.Rule.RuleEngine.EvaluateRule(IRule rule, Object data, XPathNodeIterator contextPosition) in d:\a\1\s\Origam.Rule\RuleEngine.cs:line 2272 at Origam.Rule.RuleEngine.EvaluateRule(IRule rule, Object data, XPathNodeIterator contextPosition) in d:\a\1\s\Origam.Rule\RuleEngine.cs:line 2296
at Origam.Rule.RuleEngine.IsRuleMatching(XmlContainer data, IRule rule, String roles, XPathNodeIterator contextPosition) in d:\a\1\s\Origam.Rule\RuleEngine.cs:line 3933
at Origam.Rule.RuleEngine.RuleDisablesAction(XmlContainer originalData, XmlContainer actualData, EntityUIAction action) in d:\a\1\s\Origam.Rule\RuleEngine.cs:line 3819
at Origam.Rule.RuleEngine.GetDisabledActions(XmlContainer originalData, XmlContainer actualData, Guid entityId) in d:\a\1\s\Origam.Rule\RuleEngine.cs:line 3805
at Origam.Gui.Win.ActionButtonManager.GetDisabledActionIds() in d:\a\1\s\Origam.Gui.Win\ActionButtonManager.cs:line 164
at Origam.Gui.Win.ActionButtonManager.UpdateActionButtons() in d:\a\1\s\Origam.Gui.Win\ActionButtonManager.cs:line 86
at Origam.Gui.Win.AsPanel.OnRecordIdChanged(DataRow row) in d:\a\1\s\Origam.Gui.Win\AsPanel.cs:line 1715
at Origam.Gui.Win.AsPanel.SetActualRecordId() in d:\a\1\s\Origam.Gui.Win\AsPanel.cs:line 1859
at Origam.Gui.Win.FormGenerator.SetDataSourceToConsumers(Hashtable dataConsumers) in d:\a\1\s\Origam.Gui.Win\FormGenerator.cs:line 1261
at Origam.Gui.Win.FormGenerator.LoadControl(ControlSetItem cntrlSet) in d:\a\1\s\Origam.Gui.Win\FormGenerator.cs:line 990
at Origam.Gui.Win.FormGenerator.LoadFormWithData(DataSet formData, IDataDocument xmlData, FormControlSet formControlSet, Guid methodId, Guid sortSetId, Guid defaultSetId, Guid listDataStructureId, Guid listMethodId, String listDataMember) in d:\a\1\s\Origam.Gui.Win\FormGenerator.cs:line 784
at Origam.Gui.Win.FormGenerator.LoadFormWithData(FormControlSet formControlSet, Guid methodId, Guid sortSetId, Guid defaultSetId, Guid listDataStructureId, Guid listMethodId, String listDataMember) in d:\a\1\s\Origam.Gui.Win\FormGenerator.cs:line 965
at Origam.Gui.Win.AsForm.LoadFormAsync() in d:\a\1\s\Origam.Gui.Win\AsForm.cs:line 466
at Origam.Gui.Win.AsForm.LoadObject(Object objectToLoad) in d:\a\1\s\Origam.Gui.Win\AsForm.cs:line 460
at OrigamArchitect.Commands.ExecuteSchemaItem.RunItem(ISchemaItem item, String titleName, Boolean isRepeatable) in d:\a\1\s\OrigamArchitect\Commands\Commands.cs:line 196

Any idea why it is happening?

If you want to open this screen from within Architect (or Desktop Client) you need to turn off the feature IDENTITY_USER_MANAGEMENT. Requesting identity information from within the desktop is not supported.