Skip to main content
For more information about creating activities, see Creating a Pega activity.

Pages & Classes

Parameters

Local variables

Steps

Step 1: Method: Obj-Open-By-Handle. Step page: Case. InstanceHandle: Param.CaseId.
Screenshot of step 1 in Pega configured with the Obj-Open-By-Handle method, the Case step page, and an InstanceHandle of Param.CaseId.
Step 2: Method: Page-Set-Messages Message: “Please add files to case before proceeding.” When:
In order to create a condition, specify AttachmentsIsNull in the When field and click the configuration button. If such a condition does not already exist, window will open where you will be able to create a new condition. Make sure that the full name of the case is specified in the Apply to field and click Create and open. On the Conditions tab, create the following condition: length of .pyAttachments is Equal To 0. To add the condition, click Configure advanced conditions here… and select the length of [a pagelist property] Is [comparison operator] [value] for the condition type.
Screenshot of the Condition dialog in Pega defining the AttachmentsIsNull condition as length of .pyAttachments Is Equal To 0.
Jump:
Screenshot of step 2 in Pega using the Page-Set-Messages method, with the Message set to the text prompting the user to add files to the case before proceeding.
Screenshot of the When conditions dialog in Pega for step 2, with the AttachmentsIsNull condition set to Continue Whens if true and Skip Step if false.
Screenshot of the Jump conditions for step 2 in Pega, with a When value of true that exits the activity.
Step 3: Method: Call-Function For more information, see CreateNewBatch. Jump: On exception, jump to later step label: ERR.
Screenshot of step 3 in Pega using the Call-Function method, with the function @ABBYY.CreateNewBatch() and a return value of Local.BatchId.
Screenshot of the Jump conditions for step 3 in Pega, with a StepStatusFail condition that jumps to later step ERR if true and an on-exception label of ERR.
Step 4: Method: Property-Set Loop:
Screenshot of step 4 in Pega using the Property-Set method, with Local.LinkedRefTo set to the pxLinkedRefTo of the current Case.pyAttachments element and Local.Id set to its pzInsKey.
Screenshot of the Loop dialog in Pega for step 4, with Repeat set to For each element in value list and the Value List Property set to Case.pyAttachments.
Substep 1: Method: Obj-Open-By-Handle. Step page: Attachment. InstanceHandle: Local.LinkedRefTo.
Screenshot of substep 1 in Pega configured with the Obj-Open-By-Handle method, the Attachment step page, and an InstanceHandle of Local.LinkedRefTo.
Substep 2: Method: Obj-Open-By-Handle. Step page: AttachmentInfo. InstanceHandle: Local.Id.
Screenshot of substep 2 in Pega configured with the Obj-Open-By-Handle method, the AttachmentInfo step page, and an InstanceHandle of Local.Id.
Substep 3: Method: Call-Function For more information, see AddDocumentToBatch. Jump: On exception, jump to later step label: ERR.
Screenshot of substep 3 in Pega using the Call-Function method, with the function @ABBYY.AddDocumentToBatch(Local.BatchId, AttachmentInfo.pyMemo, Attachment.pyAttachStream) and no return value.
Screenshot of the Jump conditions for substep 3 in Pega, with a StepStatusFail condition that jumps to later step ERR if true and an on-exception label of ERR.
Step 5: Method: Call-Function For more information, see RunBatchProcessing. Jump: On exception, jump to later step label: ERR.
Screenshot of step 5 in Pega using the Call-Function method, with the function @ABBYY.RunBatchProcessing(Local.BatchId) and no return value.
Screenshot of the Jump conditions for step 5 in Pega, with a StepStatusFail condition that jumps to later step ERR if true and an on-exception label of ERR.
Step 6: Method: Call-Function For more information, see WaitFirstVerificationOrProcessedForMultiFileInvoice. Jump: On exception, jump to later step label: ERR.
Screenshot of step 6 in Pega using the Call-Function method, with the function @ABBYY.WaitFirstVerificationOrProcessedForMultiFileInvoice(Local.BatchId) and a return value of .VerificationUrl.
Screenshot of the Jump conditions for step 6 in Pega, with a StepStatusFail condition that jumps to later step ERR if true and OK if false, and an on-exception label of ERR.
Step 7: Label: ERR. Method: Page-Set-Messages. Message: @unescapeHTML(@getWorstMessageName(tools)). For more information, see unescapeHTML.
Screenshot of step 7 in Pega labeled ERR, using the Page-Set-Messages method with the Message set to @unescapeHTML(@getWorstMessageName(tools)).
Step 8: Label: OK. Method: Property-Set.
Screenshot of step 8 in Pega labeled OK, using the Property-Set method with a PropertiesName of .BatchId set to a PropertiesValue of Local.BatchId.