Question
T-Mobile
US
Last activity: 16 Oct 2018 12:03 EDT
Calling a flow action in JS
Hi All,
We have a use case to build Pega case widget to update existing case by passing in certain parameters. We would like a certain flow action to launch when specific parameters is passed in from external application to Pega widget. is there a way to call flow action within a JavaScript code? Thanks for the help.
***Edited by Moderator Marissa to update categories***
**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.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
IN
Hi ,
I have seen customers getting this accomplished with below but never tried , you can have a look:
The JS function name should be of the below format,
For Pre - preFlowAction$FlowActionName
Hi ,
I have seen customers getting this accomplished with below but never tried , you can have a look:
The JS function name should be of the below format,
For Pre - preFlowAction$FlowActionName
For Post - postFlowAction$FlowActionName
During run time "preFlowAction$FlowActionName" JS function will be invoked before the section gets loaded so ideally this can be used to initialize stuff and "postFlowAction$FlowActionName" JS function will be invoked post submission of flow action so this can be used to update the status of work object or some other properties in the work page.
Ex.
function preFlowAction$CollectEmployeeDetails(flowClass) {
/* business logic goes here*/
}
function postFlowAction$CollectEmployeeDetails(flowClass) {
/* business logic goes here*/
}
Thank you
-Abhishek
T-Mobile
US
Thank you Abhishek! This looks helpful hint. I will give it a try.
Oumer
Pegasystems Inc.
IN
Hi Oumer,
You can also try the below code in your JS
call this pega js function in your js function for calling local flow action
pega.u.d.processAction('<flow action name>', '', '','','',true,event);
-
Korikana Sriraj
T-Mobile
US
Thank you Vikash. I will try it.
Oumer
TCS
FR
Hi Oumer,
Please let me know ...which one is worked i.e pega.u.d.processAction('<flow action name>', '', '','','',true,event); or
function preFlowAction$CollectEmployeeDetails(flowClass) {
/* business logic goes here*/
}
Please provide little more information ..I also need to call a flow-action from Java script
Hi Oumer,
Please let me know ...which one is worked i.e pega.u.d.processAction('<flow action name>', '', '','','',true,event); or
function preFlowAction$CollectEmployeeDetails(flowClass) {
/* business logic goes here*/
}
Please provide little more information ..I also need to call a flow-action from Java script
Thnx
Hari
Areteans Technology
NZ
Did anyone try this method and did it work?
Pegasystems Inc.
IN
Hi,
Thank you for posting your query in the PSC. This looks like an inactive post and hence, we suggest you create a new post for your query. Click on the Write Post button here. Once created, please reply back here with the URL of the new post.
You may also refer this discussion link as a reference in the new thread.