22 June 2023

How to create a document placeholder

This example workflow adds a document placeholder to applications that have a passport clearance check. A workflow definition XML file, supplied by Tribal, creates this workflow.

Attention.

To avoid a duplicate document placeholder being created, ensure that workflows do not create the same document placeholders as created in the reference data Clearance check type.

How it works

The document placeholder workflow uses custom parameters to store the IDs and GUIDs it needs to connect the applicant, the application, and the clearance check to the document placeholder. The Parameters table defines each parameter.

Parameters
Name Type Purpose Initial Value
personID String Persistence None
personGUID GUID Persistence None
applicationID String Persistence None
applicationGUID GUID Persistence None
checkID String Persistence None
checkGUID GUID Persistence None

The workflow creates the document placeholder for applications with the passport clearance check as follows:

  1. The workflow starts at activity A when a clearance check is created on the application.
  2. Conditional transition B checks that applications have a passport clearance check. Otherwise, transition F ends the workflow.
  3. Activity C gets the external ID for the applicant (personID), the application (applicationID), and the clearance check (checkID).
  4. Activity D converts the IDs into entity GUIDs for the applicant (personGUID), the application (applicationGUID), and the clearance check (checkGUID) that the workflow uses to create the links to the document placeholder.
  5. Activity E creates the document placeholder for the selected document type and links the document placeholder to the applicant, application, and clearance check using the entity GUIDs.
  6. Activity G ends the workflow.

The image Example workflow shows the document placeholder workflow.

Example workflow
document placeholder workflow

Pre-requisites

Before setting up the workflow, you need the following:

  • A copy of the document placeholder ZIP file. Download and extract the DocPlaceholder.xml file to a suitable location.

  • A clearance check type with the code Passport. To add a clearance check type, go to Admissions settings and then Reference data and then Applications. Then, search for Clearance check type, and select manage reference data button manage reference data. For more information, go to Clearance check type.

  • A document type with the name Identification. To add a document type, go to Admissions settings and then Reference data and then Documents. Then, go to Document type, and select manage reference data button manage reference data. For more information, go to Document type.

To use a different clearance check type and document type, you must customise the workflow accordingly.

Build the workflow

Create the sample workflow as follows:

  1. Create a new scheme: in Business Entities, on the Workflow Service Code of ADMISSIONS with the Business Entity Code of APPLICATIONCLEARANCECHECK go to the business entity scheme menu button and then selectview schemesView Schemesand then the create new scheme button.

    Then, define the following:

    • In Scheme code, enter PDOC.
    • In Scheme description, enter Identity documents for passport clearance check.
    • Leave Custom Event blank as this example doesn't use custom events as a trigger.
    • Set Trigger for to Create.
    • Select add scheme button, and Save and view scheme.
    Scheme details
    scheme details section
  2. Select Import definition (XML), and then browse to the Tribal DocPlacholder.xml file.
  3. Ensure the workflow has imported successfully.
The workflow needs to be Published to run.

Customise the workflow

After importing the workflow, you can customise it to use a different clearance check type and document type. To customise the workflow, edit an unpublished version.

Change the clearance check as follows:

  1. Select the "" Conditional Transition labelled B on the example workflow diagram and select Edit "".

  2. Go to Condition and change the Action parameter for the ClearanceCheckType action. Remove Passport and choose a clearance check.

Change the document type for the placeholder as follows:

  1. Select the Create placeholder activity labelled E on the example workflow diagram and select Edit "".

  2. Select theopen action parameter details button, select the Document Type parameter, and choose a document type for the placeholder.