XSL fuction AS:AddMinutes not implemented for XPath

Using the AS:AddMinutes function in an XPath of context mapping for a load task filter ends with an error. The function is not implemented.

2021-12-09 08:47:58,148 [30] ERROR Origam.Workflow.WorkflowHost - Origam.OrigamException: Failed evaluating SendMeasurementRequest/03_LoadData_MeasurementRequest_Old/Parameters/MeasurementRequest_parCurrentDateRelativeDaysTo
 ---> System.Exception: Failed evaluating SendMeasurementRequest/03_LoadData_MeasurementRequest_Old/Parameters/MeasurementRequest_parCurrentDateRelativeDaysTo
 ---> System.Xml.XPath.XPathException: Xsl Function not found: prefix='AS', name='AddMinutes'
   at Origam.Rule.RuleFunctionContext.ResolveFunction(String prefix, String name, XPathResultType[] ArgTypes) in D:\a\1\s\backend\Origam.Rule\RuleEngine.cs:line 6124
   at Origam.Rule.OrigamXsltContext.ResolveFunction(String prefix, String name, XPathResultType[] ArgTypes) in D:\a\1\s\backend\Origam.Rule\OrigamXsltContext.cs:line 98
   at MS.Internal.Xml.XPath.FunctionQuery.SetXsltContext(XsltContext context)
   at MS.Internal.Xml.XPath.CompiledXpathExpr.SetContext(IXmlNamespaceResolver nsResolver)
   at MS.Internal.Xml.XPath.CompiledXpathExpr.SetContext(XmlNamespaceManager nsManager)
   at Origam.Rule.RuleEngine.EvaluateContext(String xpath, Object context, OrigamDataType dataType, AbstractDataStructure targetStructure) in D:\a\1\s\backend\Origam.Rule\RuleEngine.cs:line 2549
   at Origam.Workflow.Tasks.AbstractWorkflowEngineTask.Evaluate(AbstractSchemaItem item) in D:\a\1\s\backend\Origam.Workflow\Tasks\AbstractWorkflowEngineTask.cs:line 136

I’d consider it as a feature request.

According to this post it should have already been implemented.

I am afraid this was started by @urbanekv and ALMOST done. In the end we did not get all the functions in the AS namespace.

There is a way though as EXSLT date: namespace is implemented in XPath rules. See EXSLT - date:add.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.