An Alternative Design Approach to Achieve Pega Process Fabric Functionality
Did you ever come across any scenario where a business asks to implement a solution to have a consolidated list of cross-application assignments instead of logging into multiple portals?
Pega's Process Fabric Approach
If Yes, you might have immediately thought about Pega Process Fabric which ideally fits the above requirement!
Abstract (Wrapper) Application Approach
You might have also thought about building a wrapper application built upon source applications to achieve the requirements too! I mean for example, if you are logging into two applications, one to approve timesheets and another application to approve leave requests then build an employee management system built upon a timesheet & leave management application to get consolidate a list of the task to have a unified view of work.
Concerns
As we all know that Pega Process Fabric or Wrapper Application pattern is not a kind of middleware solution where every application can exchange information as per the need.
The wrapper application may not work if the source applications are situated at different instances.
So what exactly we are talking about here?
API Integrator & Manager Approach
I would like to talk about my perspective on an alternative design that we can think of to achieve Pega Process Fabric functionality(worklist point of view) using API designer or Integrator!!
You call it API integrator or Gateway or etc, they all do one thing called API Management / Orchestration.
WSO2 Integrator
Here I have used WSO2 API Integrator to consolidate user tasks from two different applications from different instances.
Solution Approach
In this example, we have two different instances (two independent apps) where a user has to log in to complete the tasks. These two apps (1-App & 2-App) have some open tasks to finish. Let's now understand it technically!
Here is a sample request & response of '1App'. Assume that this instance is running on a private cloud.
Here is another sample request of '2App' running on avdifferent location.
If these two applications are running on the same instance then you can have this wrapper application approach to solve the requirement!
You can have the worklist (combined) like below.
We can also use the Process Fabric connector component to connect our 1&2Apps to the Process Fabric Hub to get consolidate worklist.
Let's get back to our alternative design option to achieve Process Fabric functionality where we have seen two different instances of sample requests & responses.
WSO2 Enterprise API Integrator
Now launch WS02 Integration Studio & create an Integration Project
Create two endpoints, one for 1App and another for 2App as below
领英推荐
Do repeat the same steps for the 2App instance too and you should have both the endpoints as below (In the project explorer)
Now create a REST API (This is going to be our URL which can get the tasks from both the instances) as per below
This should open the API designer as below
Now let's use Mediators shapes like Clone (as we need club two instances output here) and Call shapes to call the created endpoints.
Add a clone shape & set two branches
Drag & drop two Call shapes.
Now call the two endpoints by dragging & dropping in the clone branches as shown below.
We need an aggregator shape to combine these endpoints responses and provide an expression(which elements from these two responses to be aggregated) as below
Once done, we need to respond to the API (MyTasks) by placing this response shape.
We have finished integrating two different endpoints into a single lightweight REST API which can then be published API Manager (Catalog of APIs for an enterprise)
We can now run this integration by exporting the required artifacts!
Once you run, you must see this runtime services window to look at the generated API details or you can use inbuilt Swagger API to test the API
I will use Postman to test this API by providing my authentication details(operator details)
As you see now, this API brings the tasks from two different applications and can be used to bring consolidated worklist tasks.
Summary
As we all know one product doesn't fit all, here Pega Process Fabric can be used to get all list of tasks from different applications from both Pega & Non-Pega applications to get a unified portal experience if required Pega UX/UI.
If we have a Non-Pega custom portal, then we can think about this API Integrator approach.
If two applications are residing in a single instance then we can go for a wrapper application pattern to achieve a unified worklist experience!
Pega Lead System Architect, Pega Decisioning, Cloud Enthusiast
3 年Very nice explanation and great thought ????
PCLSA 8.5 | Technical Architect
3 年Unified solution simplified ! Lucid explanation.?