You are viewing limited content. For full access, please sign in.

Question

Question

Suspended Task When Trying to Email User

asked on April 29, 2021

I have a form that when the process is Rejected by a supervisor, it is supposed to email the original user that filled out the form.  

I have noticed that when the process is Rejected by the supervisor or some other user, it gets suspended.  

Below is the log:

 

An unexpected error has occurred. [LFF502-UnexpectedError] Details: URL: Error: UnexpectedError Date: 4/29/2021 3:50:00 PM (Pacific Standard Time) HTTP Status Code: 500 Business Process ID: 6 Instance ID: 4436 Business Process Name: Expense Reimbursement Form Stack Trace: Caught exception: Laserfiche.Forms.CommonUtils.Exceptions.LFFormsException Message: An unexpected error has occurred. [LFF502-UnexpectedError] Inner exception: System.Xml.XPath.XPathException Message: Expression must evaluate to a node-set. at MS.Internal.Xml.XPath.XPathParser.ParseNodeTest(AstNode qyInput, AxisType axisType, XPathNodeType nodeType) at MS.Internal.Xml.XPath.XPathParser.ParseStep(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseRelativeLocationPath(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseLocationPath(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParsePathExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseUnionExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseMultiplicativeExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseAdditiveExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseRelationalExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseEqualityExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseAndExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseOrExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseExpresion(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseXPathExpresion(String xpathExpresion) at System.Xml.XPath.XPathExpression.Compile(String xpath, IXmlNamespaceResolver nsResolver) at System.Xml.XPath.XPathNavigator.Select(String xpath) at System.Xml.XmlNode.SelectNodes(String xpath) at Laserfiche.Forms.Routing.AttributeToken.ParseTokens(Boolean Encode, XmlDocument xmldoc, String inString, cf_users user, Boolean keepIfNoMatch, String TimeZone, Int32 pos, ConvertToLocalDateFormat ConvertToLocalDateFormat, Boolean translateTokens, Boolean escapeEncode, ICollection`1 fields, Boolean replaceNewlines, ParseTokenOptions tokenOption, Boolean retainCurrentUserToken, Boolean removeGroupSeparators, Int32 currentRow, Boolean useGregianCal, Int32 attempts, Boolean ignoreXPathError) at Laserfiche.Forms.Routing.AttributeToken.ParseTokensEncoded(XmlDocument xmldoc, String inString, cf_users user, Boolean keepIfNoMatch, String TimeZone, Int32 pos, ConvertToLocalDateFormat ConvertToLocalDateFormat, Boolean translateTokens, Boolean escapeEncode, ICollection`1 fields, Boolean replaceNewlines, ParseTokenOptions tokenOption, Boolean retainCurrentUserToken, Boolean removeGroupSeparators, Int32 currentRow, Boolean useGregianCal, Boolean ignoreXPathError) at FormsModel.DomainServices.EmailSendItem.GenerateEmailMessage() at FormsModel.DomainServices.EmailSendItem..ctor(IEntityContext appContext, EmailService emailService, XmlDocument datasetXml, String timezone, cf_bp_worker_instances processInstance) at FormsModel.DomainServices.EmailSendService.PrepareEmailWithRoutingContext(EmailService emailService, Int32 instanceId, IRoutingContext routingContext, RoutingInstanceStatus originalStatus) at Laserfiche.Forms.Routing.EmailService.Execute(Int32 instanceId, IRoutingContext routingContext, RoutingInstanceStatus OriginalStatus) at Laserfiche.Forms.Routing.ServiceTask.Execute(Int32 instanceId, IRoutingContext routingContext)

0 0

Answer

SELECTED ANSWER
replied on April 30, 2021

Go to the Expense Reimbursement Form Process and open up the email service task that is getting stuck on the email to the initial submitter. In the right pane of the email service task, scroll down to the Body section and look to the right. There are two tabs, HTML and Visual. We think something is incorrect in the HTML side. Here's how I would fix it. 

Select everything in the Visual side and copy it. Then delete it all. Then paste it back in. I think this will get the HTML to re-write itself. 

If that doesn't work, click the HTML tab and copy that here into the Answers post using the {Code} button above. That way we can view the HTML and see what's wrong. 

1 0

Replies

replied on April 29, 2021

Hi Manuel,

The error message indicates something wrong happens when Forms trying to parse the body of email. For example, we've seen this error with html tag in variable token (like {/dataset/Single_Line</font></u></a>}). 

Could you review the configured email content in HTML view to see whether there is anything similar or suspicious?

0 0
replied on April 30, 2021

Hi Ziyan,

How do I do that?  Do I need to go through every variable and look for HTML content?  

I am lost at what you are describing.

Thank you,

Manny

 

0 0
SELECTED ANSWER
replied on April 30, 2021

Go to the Expense Reimbursement Form Process and open up the email service task that is getting stuck on the email to the initial submitter. In the right pane of the email service task, scroll down to the Body section and look to the right. There are two tabs, HTML and Visual. We think something is incorrect in the HTML side. Here's how I would fix it. 

Select everything in the Visual side and copy it. Then delete it all. Then paste it back in. I think this will get the HTML to re-write itself. 

If that doesn't work, click the HTML tab and copy that here into the Answers post using the {Code} button above. That way we can view the HTML and see what's wrong. 

1 0
replied on April 30, 2021

That fixed it, but I removed the Dataset that I was trying to call up.  I am going to try to put it back and see what happens.  

Before:

"Hello {/dataset/Name_of_Employee},

Your Travel Reimbursement Form was Denied by your Supervisor.

Thank you."

After:

"Hello,

Your Travel Reimbursement Form was Denied by your Supervisor.

Thank you."

 

Thank you for the help.

0 0
replied on April 30, 2021

Putting it back should work. There may have been a typo on the HTML side before and the dataset accidentally was {/dataset/Name_of_Employee,} with the , before the } or something like that. 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.