Question
Smart Communications
HU
Last activity: 24 Sep 2024 1:07 EDT
Using the Assignment Service advanced shape
Hi,
The use-case: from a Pega case, initiate a long running process in an external system. When the external process finishes, it calls back to Pega (REST API) with some business data and the case continues. The external process could take several days. The process is initiated by calling a REST endpoint on the external system, the endpoint returns a process ID for reference.
After doing some reading, it seems to me that the right candidate for this integration is the Assignment Service shape: https://docs-previous.pega.com/case-management/87/assigning-task-external-application#Assigning_a_task_to_an_external_application
I read the above linked documentation and also the one linked below, also the related questions in the support center but a few things are still unclear to me.
The questions:
1. when configuring the Assignment Service shape, the activity specified in the Type must be a connect activity? I'm using now an activity that calls a data page that is backed by a Connect REST rule. The activity is called and seems to work. The following documentation says that a Connect Activity is an activity that calls a Rule-Connect- external system interface. These activities may be referenced by an Integrator shape ( Integrator ) on a flow. Another documentation says that Connect HTTP rules are deprecated.
Hi,
The use-case: from a Pega case, initiate a long running process in an external system. When the external process finishes, it calls back to Pega (REST API) with some business data and the case continues. The external process could take several days. The process is initiated by calling a REST endpoint on the external system, the endpoint returns a process ID for reference.
After doing some reading, it seems to me that the right candidate for this integration is the Assignment Service shape: https://docs-previous.pega.com/case-management/87/assigning-task-external-application#Assigning_a_task_to_an_external_application
I read the above linked documentation and also the one linked below, also the related questions in the support center but a few things are still unclear to me.
The questions:
1. when configuring the Assignment Service shape, the activity specified in the Type must be a connect activity? I'm using now an activity that calls a data page that is backed by a Connect REST rule. The activity is called and seems to work. The following documentation says that a Connect Activity is an activity that calls a Rule-Connect- external system interface. These activities may be referenced by an Integrator shape ( Integrator ) on a flow. Another documentation says that Connect HTTP rules are deprecated.
https://docs-previous.pega.com/sites/default/files/help_v718/definitions/a/activitytype.htm
https://docs-previous.pega.com/reference/87/about-connect-http-rules?
2. how should the callback from the external system be handled? What REST endpoint should the external system call? Is there an OOTB endpoint for these integrations (in the DX API for example) or a custom one has to be created? If custom endpoint is needed what should it do to complete the Assignment Service step? The documentation only mentions this: At run time, your flow pauses when it reaches the Assignment Service shape, and resumes when it receives an incoming service request of the expected type. What does the expected type mean and what should the service do?
What I tried in a PoC implementation is that for the callback I use the Perform assignment action endpoint of the Constellation DX API with the right assignment and action ID. This results in the completion of the assignment service step and continuation of the case.
The problem with this is that the external system needs to know the assignment ID and action, and depending on the flow action of the outgoing connector of the assignment shape, the assignment action can not always be called (the assignment ID is not found).
Another option would be a custom REST service which somehow does the advancement of the case (how?). I'm not sure which one is the right solution.