Skip to main content
A multi-document processing case with verification needs the standard case fields plus the fields for every Document Definition, and three configured workflow stages. For the general procedure, see Create a case with a workflow.
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.

Data model fields

Add the following fields on the Data Model tab, 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.

Configure the stage that submits a document for processing

For the general procedure, see Configure the workflow stages and The Utility step.
1

Replace the step

Open the Send for processing stage in configuration mode, replace the Edit details step with a Utility step, and name the step Send for processing.
2

Call the activity

Open the Utility step and call the SendForProcessing activity.Start creating the activity by clicking the configuration button to the right of the Rule field. Alternatively, leave the pyUtilityStub value in the Rule field and come back to this step after you have created the activity set.For more information, see SendForProcessing.
3

Set the case identifier

In the CaseId field, specify .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.

Configure the verification stage

For the general procedure, see Configure the workflow stages and The Utility step.
1

Add the Utility step

Open the Verification stage in configuration mode, add a Utility step, and name it Update Verification Url.
2

Rename the existing step

Rename the Edit details step to Verification.
3

Call the activity

Open the Update Verification Url step and call the UpdateVerificationUrl activity.For more information, see UpdateVerificationUrl.
4

Connect the steps

Connect the Verification and Update Verification Url steps using a Verification flow action connector.For more information, see Creating a flow action.
5

Set the case identifier

In the CaseId field, specify .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.

Configure the stage that fetches the processing results

For the general procedure, see Configure the workflow stages, The Utility step, and The Decision step.
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.
1

Delete the existing step

Open the Fetching captured data stage in configuration mode and delete the Edit details step.
2

Add a Decision step

Add a Decision step and name it Batch stage is processed.
3

Set the decision expression

  1. Open the step and select Boolean Expression in the Type field.
  2. In the Expression field, enter or configure a @MultiDocumentBatchIsProcessed(.BatchId) condition.
  3. Click Submit.
For the function itself, 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.
4

Configure the true branch

For the true branch, create one Utility step per Document Definition. For each step, call the FetchingCapturedData activity, enter .pzInsKey in the caseId field, and set templateName to the matching value:For more information, see FetchingCapturedData.
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.
5

Configure the false branch

For the false branch, create a Utility step named Create Error, call the CreateError activity, and enter .pzInsKey in the caseId field.In the errorMessage field, enter this text:
For more information, see CreateError.
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.