Skip to main content
For more details about creating cases, see Creating a case with a workflow. A configured workflow for processing multiple documents should look as follows:
Diagram of the FetchingCapturedData_Flow process showing a Batch stage is processed decision that branches on its true path through the Fetching Invoice, Banking, Contract, Letter, and Price data steps and on its false path through a Create Error step.
For a multi-document processing case that includes verification, the Workflow tab should look as follows:
Screenshot of the Workflow tab in Pega Dev Studio showing the multi-document case life cycle with the Invoice received, Send for processing, Verification, and Fetching captured data stages and their steps.
The Data Model tab should have the following fields (in addition to the required Attachments, BatchId, and VerificationUrl fields):
Screenshot of the Data model tab in Pega Dev Studio showing the full list of multi-document case fields, including Address, InvoiceTable, and PriceTable field groups alongside the required Attachments, BatchId, and VerificationUrl fields.

Configuring a stage that will submit a document for processing

For more detailed instructions, see the Configuring workflow stages and Utility step sections.
  1. Open the Send for processing stage in configuration mode, replace the Edit details step with a Utility step, and specify the following name for this step: Send for processing.
  2. Open the Utility step and call the SendForProcessing activity. For more details about creating this activity, see SendForProcessing.
You can begin creating an activity by clicking the configuration button to the right of the Rule field. Alternatively, you can leave the pyUtilityStub value specified in the Rule field and come back to this step after you have created an activity set.
  1. In the CaseId field, specify the following: .pzInsKey.
Screenshot of the SendForProcessing_Flow diagram and Utility step properties in Pega Dev Studio showing the Send for processing utility calling the SendForProcessing activity with .pzInsKey in the CaseId parameter.

Configuring a verification stage

For more detailed instructions, see the Configuring workflow stages and Utility step sections.
  1. Open the Verification stage in configuration mode, add a Utility step, and set its name to be Update Verification Url.
  2. Rename the Edit details step to Verification.
  3. Open the Update Verification Url step and call the UpdateVerificationUrl activity. For more details about creating an activity for a multi-document case, see UpdateVerificationUrl.
  4. Connect the Verification and Update Verification Url steps using a Verification flow action connector. For more information about creating a flow action, see Creating a flow action.
  5. In the CaseId field, specify the following: .pzInsKey.
Screenshot of the WaitingForVerification_Flow diagram in Pega Dev Studio showing the Verification connector properties and the Update Verification Url utility step calling the UpdateVerificationUrl activity with .pzInsKey in the caseId parameter.

Configuring a stage that will fetch the processing results

For more detailed instructions, see the Configuring workflow stages, Utility step, and Decision step sections.
  1. Open the Fetching captured data stage in configuration mode and delete the Edit details step.
  2. Add a Decision step and name it Batch stage is processed.
  3. Open the step and select Boolean Expression in the Type field.
  4. In the Expression field, enter or configure a @MultiDocumentBatchIsProcessed(.BatchId) condition. For more details about creating this function, see MultiDocumentBatchIsProcessed.
    Screenshot of the Decision step properties in Pega Dev Studio showing the Batch stage is processed decision with Boolean Expression selected and the @MultiDocumentBatchIsProcessed(.BatchId) expression entered.
  5. Click Submit.
  6. Create a Utility step named Fetching Invoice data for the true branch and call the FetchingCapturedData activity. For more information about creating this activity, see FetchingCapturedData.
  7. Enter .pzInsKey in the caseId field and Invoice_eng in the templateName field.
    Screenshot of the Utility step properties in Pega Dev Studio showing the Fetching Invoice data step calling the FetchingCapturedData activity with .pzInsKey in caseId and Invoice_eng in templateName.
  8. For the true branch, create a Utility step named Fetching Banking data and call the FetchingCapturedData activity.
  9. Enter .pzInsKey in the caseId field and Banking_eng in the templateName field.
    Screenshot of the Utility step properties in Pega Dev Studio showing the Fetching Banking data step calling the FetchingCapturedData activity with .pzInsKey in caseId and Banking_eng in templateName.
  10. For the true branch, create a Utility step named Fetching Contract data and call the FetchingCapturedData activity.
  11. Enter .pzInsKey in the caseId field and Contract_eng in the templateName field.
    Screenshot of the Utility step properties in Pega Dev Studio showing the Fetching Contract data step calling the FetchingCapturedData activity with .pzInsKey in caseId and Contract_eng in templateName.
  12. For the true branch, create a Utility step named Fetching Letter data and call the FetchingCapturedData activity.
  13. Enter .pzInsKey in the caseId field and Letter_eng in the templateName field.
    Screenshot of the Utility step properties in Pega Dev Studio showing the Fetching Letter data step calling the FetchingCapturedData activity with .pzInsKey in caseId and Letter_eng in templateName.
  14. For the true branch, create a Utility step named Fetching Price data and call the FetchingCapturedData activity.
  15. Enter .pzInsKey in the caseId field and Price_eng in the templateName field.
    Screenshot of the Utility step properties in Pega Dev Studio showing the Fetching Price data step calling the FetchingCapturedData activity with .pzInsKey in caseId and Price_eng in templateName.
  16. For the false branch, create a Utility step named Create Error and call the CreateError activity. For more details about creating this activity, see CreateError.
  17. Enter .pzInsKey in the caseId field. In the errorMessage field, enter the following text: “Please complete the verification task before proceeding.”
Screenshot of the Utility step properties in Pega Dev Studio showing the Create Error step calling the CreateError activity with .pzInsKey in caseId and the verification reminder text in the errorMessage parameter.