In Pega, it’s ordinary that an  operator who has access to the application can perform the assignment. Have you ever imagined how the person who is not the part of the application that is an external operator can access the application and perform an assignment. Let’s  explore how PEGA handles this…

This article illustrates how Direct Web Access can be implemented in PEGA.

Example Scenario:

Veena, a college student who  is requesting for 10 days leave to her department, in order to take part in a sports event.  According to her college rules, if the requested leave days are more than a week, depending on the context of the leave, apart from the internal approval (i.e department  approval), an external approval (i.e  from the management) such as principal or sports head approval is required. PEGA handles this scenario using Direct Web Access(DWA).

Let’s explore how PEGA creates the magic of  allowing an  external operator to perform the assignment in a case.


     Step 1:

        Create a case type (Eg: DWA) and provide a stage name as “New Request” and “Approval”. Add a collect info step, name it as Provide Prerequisite in the first stage and add an approve/rejection step, name it as Department Approval in the second stage. Hurray! We are done designing our case life cycle.

   Step 2:

            Create a data type “Student Detail”  and  “Leave Application” and “Personal Detail” via clicking Data explorer—> add datatype—->give the label as mentioned—>Submit. Once done with creating data type add the necessary fields as shown below.

Step 3:

Configure the provide pre-requisite section and department approval section as below:

Department Approval Section :

In the prerequisite step, the student is providing his personal details and leave details. The Department Approval step is performed by the department head(internal head), once the details are reviewed  the  head will provide his comments, based on the context of leave the head will seek for the management approval(external approval).

Choose External Approver –  A drop down control helps to choose which type of management approval is required(i.e sports head/ Principal/ Chairman)

Approver Detail – A page property which contains the details about the external operator.

Now it’s time to configure the need of an hour!!! Guess What ? It’s DWA

Following are the seven steps helps you to implement DWA:

1) Create An Operator ID With “External” Keyword:

    Create an operator id by following the path : Records—>Organisation—>OperatorID.  Provide the label as you wish but make sure you include the “External”keyword

Eg : External Operator 

Under the security tab, select the license type as Invocationand “Enable use external authentication checkbox”. Click save.

2) Create Approver Workparty:

Go to  App explorer—>under case type(Eg: DWA) class—->Process—->pyCaseMangement Default.

Under the valid parties tab, provide as follows:

Party Label : Approver

Role: Approver

Party Class: Data-Party-Person

Data Transform :CopyApproverDetail –>Click gear icon —> Create and Open.

Create the CopyStudentDetail data transform as below:

3) Configure the Email Account:

   Go to Configure—>Integration—>Email—> Email Account

Choose the default PEGA account and configure your own email account as below.

Enable the “Less Secure App” on  the email id which you are using to configure the email account(Eg: [email protected]) by following the path:

Email account—>Security—>Less secure apps access—->turn on.

Note : after enabling the less secure apps, use that email ID for configuring  the email account in PEGA.The connection status “Success” indicates that the  email account is successfully configured and ready for sending an email.

4) Create  Correspondence Template:

Create the correspondence by following the path : Create—>Process—> Correspondence→ Provide label as “LeaveRequestApproval”—->Create and Open

On the correspondence template insert the external messages & instructions by following the path:, Insert Rule–>Type: Rule-Corr-Fragment—>Name: External Messages

Insert Rule–>Type: Rule-Corr-Fragment—>Name: External Instructions

Once created the correspondence template check whether it resembles as below

Click Save.

5) Call Workparty And Configure The External Assignment:

    Call the workparty in the flow by adding an utility shape and also add a step which you want the external operator to perform(Here it is collect info step named as review leave application).

External Approval Flow:

Call the workparty in Call Approver utility and provide the details as mentioned below.

Now, open the review leave application assignment and provide the detail as mentioned below.

Choose the routing option as custom since the assignment is routed to an external operator, and provide the router value as “ToWorkParty” indicating the assignment will be performed by the approver workparty.

Scroll down to the advanced tab, under the assignment details, provide the information as mentioned below 


Operator Model – Provide the operator created with an external keyword.

Days Of Expiration – Provide the expiry date of an external assignment

Instructions – For instructing the external operator about the assignment

Party- Provide the workparty data transform name

Subject – Indicates the mail subject

Message –  Indicates the message displayed on the mailto the external operator.

Corr Name – Correspondence template name 

Harness Purpose – This assignment is performed by an external operator so provide       perform-external

Work-Status – Indicates the status of step 

Hurray!! We have successfully configured the  external assignment !!

6) Make The Assignment As Confirm External:

  Open the review leave application flow action, under the action tab, make the show harness as confirm external

Show Harness: Confirm External

Save the flow and flow action.

7) Provide The External URL:

   Provide the URL for external access by following the path:

Configure–> System—> Setting—-> URL’s

Under the Resource URL tab, provide the URL for external access.

 NOTE : Copy the Dev URL till prweb and then add  /PRServlet.

Click Save

Hurray!!! The implementation part is done!!! Let’s run and check it.

Run the DWA case type and provide the necessary details for the first step and click submit.

In the department approval step, review the leave detail and provide the comments. Since the requested leave days are more than 10 days and the  student is  taking part in a sports event, sports head approval is required. You can view the sports head detail on the approver detail property

Click submit. Check the approver’s inbox for  the email.

Yahoo!! The email containing the external assignment is received! Let’s perform it!!

Click the link, now the external operator can  perform the assignment via direct we access.

Click submit. You can see the confirm external screen below.

The data provided by the external operator will be saved in PEGA Database.

Happy Learning!!!