Hello,
In this part-2 we are going to see case processing once the approver - approves / rejects in teams so that approval outcome should be sent to pega application for case processing.
So lets first create Service REST rule in pega application to invoke and process the case when we get the outcome from microsoft power automate.
Step-1: Create service package like below.
step-2: Now we have to create the Service REST rule before that we have to create the classes and properties like below.
Step-3: IA-INTAPP-Int-COPApprovals_Request is used to hold the ApproverName, Outcome, pyID properties and
IA-INTAPP-Int-COPApprovals class contains page property of the above class.
Step-4: This page property is used to map & store the details which came from power automate for case processing.
Step-5: Keep the service class: IA-INTAPP-Int-COPApprovals and now go to Methods tab.
Step-6: In methods tab under POST Method in Message data map to page proeprty which we created like below.
Step-7: And create a service activity to process the case based on approve / reject and save this service rule.
Step-8: Now let's update CUSTOMER ONBOARDING FLOW in microsoft power automate for invoking service from the power automate to send the approval request outcome details to pega.
Step-9: Add a new step in flow.
Step-10: Serach for the HTTP and select like the below image.
Step-11: Now select method as POST and copy and paste the pega service REST rule in URL, and add the body like this below, and select authetication type as Basic and give the pega login credintials like below image.
Step-12: Now save the flow rule in power automate.
---------------------------------------------------------------------------------
- A new case will created for collecting basic informarion, after submitting it will sent to Admin Approval.
- Already we have configured the connect REST in part-1 of this blog and use that data page for invoking power auomate flow for sending the approval request in teams.
- Invoke this data page while routing to admin.
- Once case is created and submitted the approval request will sent via teams, and we have already configured the service rest rule used to invoke from power automate and process the case based on those details received.
- If the Request is approved in Teams then it is approved and save the customer record in customer table,else if it is rejected by approver then the case will rejected and customer record will not saved in table.
After configuration Trail Run:
Step-1: Create new case in pega and provide the required and submit the case.
Step-2: After submitting the case it will be routed to approver via teams for approval from power automate by invoking the connect rest rule by data page which we created earlier.
Step-3: Now we can see in Teams a approval request is sent.
Step-4: We can see Case-ID which came from pega and if we approve the case in teams then case should get Resolved-Approved and customer record should be saved in customer table.
Step-5: If the case is rejected in teams then the case should be Resolved-Rejected in pega and closed.
Conclusion:
This is how we integrate with microsoft power automate for teams approval's.
Still if you have any issues while configuring mention those in the comments or send issue through the mail - pegaskills7@gmail.com
0 Comments