This content has been archived.

Table of Contents

How to create a process that opens a portal from an assignment link

Application users want to click an assignment link that opens the user portal directly, without SSO credential challenge, at these contexts:

  • The assignment with the assignment open
  • The work object (Perform harness)

Problem scenarios

Two scenarios identified the need for the suggested approach described in this article.

CPM for Healthcare 7.4, PRPC 6.1 SP2

Users of Customer Process Manager (CPM) for Healthcare 7.4 running on PRPC 6.1 SP2 reported that clicking an assignment link in email correspondence triggers an SSO credential challenge and takes them to their worklists instead of directly to the CPM Service Object as they expect.

This problem does not occur with PRPC 6.2 SP1.

PRPC 6.3 SP1, Case Management

Users of PRPC 6.3 SP1 Case Management want to be able to create a case from an external application using an HTTP Post request along with additional parameters and have the work object open in a tab of the Case Manager portal. In PRPC 6.3 SP1, the harness of the work form opens without the portal.

Explanation

The Pega-provided activity ShowSelectedPortal calls only one other activity, ShowDesktop. The suggested approach explains how to solve this problem, including how to add conditional logic that opens the same portal from assignment links in both email and non-email modes.

Suggested approach

As an application developer, choose which development approach works best for your business users who want to see linked-to assignments or work displayed immediately within the Case Manager portal without SSO credential challenge.

Preview

You work with the rules identified in the following table by rule name, rule type, and comments describing what the rule does.

Rule Name

Rule Type

Comments

ShowAssignmentInPortal

Activity

Entry activity

ShowAssignment

Portal

Similar to the User portal

UserOpenAssignment

Harness

  • Similar to the User harness
  • Uses UserCenterPanelOpenAssignment instead of UserCenterPanel

UserCenterPanelOpenAssignment

Section

Modified to include a section that includes CallOpenAssignment

CallOpenAssignment

Section

  1. Reads the assignment handle stored in the pxThread page
  2. Waits a second
  3. Calls the openAssignment desktop API to open a new tab for the perform harness

How to create a process to open a portal from an assignment link

The following example shows how to create a process that opens a portal from an assignment link.

  1. The assignment link includes the entry activity ShowAssignmentInPortal.
    This activity takes one parameter, AssignmentHandle.
    The property pxThread.pxPortal tells the call to ShowDesktop that it will display the ShowAssignment portal rule.
    The assignment handle itself is stored on the pxThread page for future use.
    Activity rule ShowAssignmentInPortal Steps for Method Property-Set, pxThread.pxPortal and pxThread.AssignmentHandle
  2. The portal rule ShowAssignment is very similar to the User portal, with Spaces specified as follows:​
    Space Name field value is Work.
    Harness Class field value is Data-Portal.
    Harness Name field value is UserOpenAssignment.
    Default is selected.
    Portal rule ShowAssignment, Space specified for Work, Data-Portal, UserOpenAssignment as default
  3. The portal harness UserOpenAssignment looks very similar to the User harness, except that Center Panel, Use Section field specifies the UserCenterPanelOpenAssignment section instead of UserCenterPanel:
    Harness rule Data-Portal UserOpenAssignment, Layout, Center Panel, Use Section
  4. The portal section UserCenterPanelOpenAssignment, Layout tab specifies, at the bottom of the form, Section Include [Data-Portal CallOpenAssignment]:
    Harness rule Data-Portal UserOpenAssignment, Layout, Center Panel, Use Section
  5. The portal section CallOpenAssignment HTML for JSP is not auto generated, and the HTML Source script is as follows:
    <script>
    var assignmentHandle = "<p:r n='pxThread.AssignmentHandle'/>";
    window.setTimeout ("openAssignment(assignmentHandle)", 1000);
    </script>

    Section Data-Portal callOpenAssignment HTML Generation Source script
  6. The CallOpenAssignment HTML Source script performs the following steps:
    • Reads the assignment handle stored in the pxThread page
    • Waits one second
    • Calls the Desktop API openAssignment to open a new tab for the Perform harness
In testing, we saw some issues when first-use assembly ran. Therefore, one second may not be enough time. After first-use assembly ran, one second was sufficient. You might need to experiment with the timeout value.

How to create a process to open a portal with the work object displayed on a tab

As an alternative to opening the portal from an assignment link, use the following procedure as your development approach to open the portal at the work tab:

  1. Open a work object in review mode.
  2. Store the work object handle in the pxThread page (Step 1 of the activity ShowAssignmentInPortal).
  3. Use the Desktop API openWorkByHandle (instead of openAssignment).

Find the openWorkByHandle API in the Pega Public API Package > Desktopwrapper.
Pega API Package Desktopwrapper openWorkByHandle

Suggest Edit

60% found this useful


Related Content

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.