How to get the result class for all documents in the transaction via the Custom Activity?

Question

There can be several documents in the transactions. How to get the classification result class for all documents in the transaction via a Custom Activity of a Process Skill?

 

Answer

  1. Open a Process Skill in the editor.
  2. Add a Custom Activity (it should be somewhere after a Classify Activity).
  3. The sample code is the following:
    var classes = "";
    for (var i = 0; i < Context.Transaction.Documents.length; i++)
    {
      var currDocument = Context.Transaction.Documents[i];
      var currDocClass = currDocument.ResultClass;
      classes += currDocClass + ";";
    }

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.