Saturday, January 20, 2018

How to call an activity in Data Transform

  • Use Rule-Utility-Function :  pxExecuteAnActivity 
  • Input parameters to this function are primaryPage, activityName

Example: 

Data Transform: Tata-FW-AuMobFW-Work : PreShowCustomerDetails
Activity : Tata-FW-AuMobFW-Work : GetCustomerDetails

How to call "GetCustomerDetails" activity from Data Transform "PreShowCustomerDetails"?
Answer: @Utilities.pxExecuteAnActivity(Primary, "GetCustomerDetails")

Demo:

#1Create an activity with name PreShowCustomerDetails.
#2Write RUF pxExecuteAnAcitivity which calls an existing activity GetCustomerDetails.


Run the data transform standalone. Navigate to Actions menu of DT >> Run >> Trace
We would notice form Data transform, we are able to successfully call an activity. 


Happy learning!!!


4 comments:

  1. What is purpose of the to call activity in Data transform, i mean on which scenarios we should call activity in DT.

    ReplyDelete
  2. Hi, Good question. There are many scenarios. Probably I can make a separate post on where this can be applied. To answer your question, Assume that you have Data Page >> source is connect-REST and then you specified the Response Data transform. From Response Data transform, you would like to call some existing logic( present in activity). Then this would be useful.

    I have more scenarios, let me make a new post for this one. Thanks for bringing this up.

    ReplyDelete
  3. how to pass parameters to the activity from DT in above scenario ?

    ReplyDelete


HowToPega : All rights reserved and the contents are copyrighted to Pavan Kumar Naidu