Question

How to make Pega API calls to Pre-activity of Flow Action, How to interact with Pages "parallel to pyWorkPage" through Pega API

I have the following questions related to Pega API.

A)Pre activity and post activity are configured in a flow action, we want to make one Pega API REST service call to call Pre-Activity and another Pega API service call to perform flow action(UI submission and calling post activity) . We see POST method call in Pega API "Assignments" takes Assignment ID and Flow Action name as input and it does Perform FlowAction and executes Post Activity. Is there any suitable Pega API REST service OOTB using which we can make call to Pre-activity of the Flow Action and get the pages populated in that pre activity as part of REST repose in JSON format.

B) My pre-activity of flow action creates "pages parallel to pyWorkPage" and populates data into the pages, how can I send these "pages parallel to pyWorkPage" as response of Pega API REST service call. Also in Pega API POST Assignments service request I want to pass data to "pages parallel to pyWorkPage". Using Pega API for REST services how can we send data to these "page parallel to pyWorkPage" as REST request and after processing send these "pages parallel to pyWorkPage" as REST response.

***Updated by Moderator: Vidyaranjan. Removed user added Ask the Expert tag. Apologies for confusion, shouldn't have been an end-user option***

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

August 28, 2016 - 8:41am

I'm afraid the OOTB Pega APIs do not support either of your use cases.

August 29, 2016 - 11:01am
Response to PraneethPurighalla

Praeneeth -

For Use Case # 1 -
This forces us to have a separate code for the users accessing the application directly by logging into the app, and the external users accessing the app through services? What's the best way to handle this scenario?

Shouldn't there be an API OOB which accepts "Processing Type" as an input parameter with values as "Pre", "Post" for processing the Flow Actions?

For Use Case # 2 -
In the real world scenarios, you would defnitely hold data on multiple Pages i.e. Pages parallel to pyWorkPage for separating the transaction data from the Workflow data. What's the best way t handle this scenario?

Is writing a separate REST Service for each of the Flow Action only way to expose the flows? Why isn't there a Wizard to do this?

September 6, 2016 - 10:58am
Response to PraneethPurighalla

Praneeth, is there any way to customize Pega API response for example I want to execute a flow action using POST method in "ASSIGNMENTS" Pega API or POST method in "CASES" Pega API and I want to return customized reponse. Is there any way to do that using OOTB functionality. Thanks.

September 6, 2016 - 11:52pm
Response to PraneethPurighalla

Do you have any plans to address the above scenarios in future Pega PRPC releases. I have one more question. We want to expose any Pega activity(dozens of activities) as a RESTful Web Service,is there any Generic API using which we can expose any Pega activity as RESTful web service. 

February 16, 2017 - 2:38pm

Hi,

It is observed that the validation rule on the Flow Action is successfully getting executed however the PEGA API services are not able to fetch the Validation messages returned by the flow action. Do we have any option to get the validation messages returned by the Flow Action through the PEGA OOTB Assignment/Post or Cases/PUT methods?