Question
A lot of invoices got stuck in Manual Review only because of a field not found in the Data Catalog lookup rule. It would be good to not pay attention to this particular error while sending a document to the Manual Review stage. Is it possible to add a condition in the IF activity based on the rule name that throws an error?
Answer
- In the Document Skill, create some service text field, i.e. LookupRule.
- In the Process Skill, after the Extract activity add Custom activity, which would check if there is only one rule error and if its type property is equal to the lookup rule name, i.e.:
var doc = Context.Transaction.Documents[0];
if (doc.RuleErrors.length == 1)
{
if (doc.RuleErrors[0].Type == "Business unit must be found in database")
{
doc.GetField("LookupRule").Value = "YES";
}
}
- Adjust the IF activity to check the service field value to make a decision if to route a document to the Manual Review or not.
Additional information:
AU: Condition activity sample script
Comments
0 comments
Please sign in to leave a comment.