Skip to main content
For more details about creating cases, see Creating a case with a workflow. For a single-document processing case that includes verification, the Workflow tab should look as follows:
Screenshot of the Workflow tab in Pega Dev Studio showing the single-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 single-document case fields City, Country, Currency, InvoiceDate, InvoiceNumber, Line Items, and Total 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 the 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 stage that will fetch the processing results

For more detailed instructions, see the Configuring workflow stages and Utility step sections.
Diagram of the FetchingCapturedData_Flow process in Pega Dev Studio showing a Batch stage is processed decision that branches on its true path to a Fetching captured data step and on its false path to a Create Error step.
  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 this step and select Boolean Expression in the Type field. Specify or configure a @SingleDocumentBatchIsProcessed(.BatchId) condition in the Expression field. For more details about creating this function, see SingleDocumentBatchIsProcessed.
    Screenshot of the Decision step properties in Pega Dev Studio showing the Batch stage is processed decision with Boolean Expression selected and the @SingleDocumentBatchIsProcessed(.BatchId) expression entered.
  4. For the true branch in the Utility step, add a step named Fetching captured data. To do this, open the Utility step and call the FetchingCapturedData activity. Then, in the CaseId field, specify the following value: .pzInsKey.
    Screenshot of the Utility step properties in Pega Dev Studio showing the Fetching captured data step calling the FetchingCapturedData activity with .pzInsKey in the CaseId parameter.
  5. For the false branch of the Utility step, add a step named Create Error. To do this, open the Utility step and call the CreateError activity*.* Then, in the CaseId parameter field, specify the following value: .pzInsKey. 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.