Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

openAssignment(assignmentID, className, options)

Updated on July 20, 2021

Opens an assignment and stores it in a target container.

Returns

A Promise associated with the action.

Parameters

NameTypeDescriptionRequired
assignmentIDstringThe ID of the assignment to be opened.

Example:

"ASSIGN-WORKLIST OPB1HW-SPACETRA-WORK RA-43001!REQUEST_FLOW_0"
classNamestringThe name of the case class associated with the assignment.

Example:

"OPB1HW-SpaceTra-Work-RequestApproval"
optionsobjectThe JavaScript object containing a property of the target container.

The following table contains the property of the options object:

NameTypeDescriptionRequired
containerNamestringThe name of the target container that will store the assignment.
Note: The default value of this property is primary.

Example:

{containerName: "primary"}

Usage example

In this example, the success callback is called if the assignment is opened successfully.

const openAssignmentPromise = getPConnect().getActionsApi().openAssignment(
     "ASSIGN-WORKLIST OPB1HW-SPACETRA-WORK RA-43001!REQUEST_FLOW_0",
     "OPB1HW-SpaceTra-Work-RequestApproval",
     { containerName: "primary" }
 );
openAssignmentPromise.then(() => {
 // open assignment success handling
}).catch(() => {
 // open assignment failure handling
});

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us