Question
Anthem Inc.
US
Last activity: 5 Feb 2016 3:50 EST
How to pass parameters for flow through create new work action in Pega 7.1.7??
I have a requirement where i need to call another flow from the repeating grid when user clicks on a button.
I have used Create Work action for button action and passed the flow params along with class name and flow name.But at run time the parameters are not getting passed to the new tab.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
IN
Hi,
Have you tried to trace the events ? Are you seeing anything interesting in tracer like any error / exception !
Going thru the tracer should be the first step to understand what is going wrong here !
Anthem Inc.
US
hi Santanu,
I dont see any error in the tracer. My issue here is i am able to execute the flow in a new tab but my flow need some parameters and those are not getting passed to the new tab created.
Murex
LB
Where are you passing the parameters to the flow?
Pegasystems Inc.
IN
- could we try with Dynamic class referencing and share the observations, Thank you!
- [D_CreateWork.ClassName & D_CreateWork.FlowName applied from selected row of repeat grid in a data transform]
Murex
LB
Hi Gajjala,
What do you mean at run time the parameters are not getting passed to the new tab? I have used that exact same procedure to pass a parameter to a flow using the create new work and this method was successful. Can you provide us with a screenshot? Are you sure you are using the parameters in the flow? Or are you trying to pass them to a data transform or activity?
Thanks.
Joe
Anthem Inc.
US
Hi Joe,
I am trying to pass parameters to the flow. I am able to run the flow using create work action item but the params defined in the flow are not getting passed at run time. The values given for the params AuthID, isAuthIDExists are not available to the flow.
I tried using custom control as well, but still I am not able to send the params to the flow:
<script>
function startUpdateFlow(){
var safeURL = new SafeURL();
safeURL.put("className",'Antm-FW-UMFW-Work-SR-AuthInquiry');
safeURL.put("flowType","SearchAuthorization");
safeURL.put("HarnessVersion",'1');
safeURL.put("AuthID",'1234567890');
safeURL.put("isAuthIDExists",'true');
pega.desktop.createNewWork(safeURL);
}
</script>
<button class='buttonTdButton' alt='' title='' onclick="startUpdateFlow;">update auth rev test</button>
Murex
LB
Hey Gajjala,
How can you tell that the parameters aren't available to the flow? Also you've configured the parameters to be input parameters right?
I had a similar case to this, where I was unable to access/use the parameters I passed to the flow (I was trying to use these parameters later on and assumed that since I had passed the to the flow then I would have access to them). What I resorted to doing is this: in the flow, I saved these parameters to properties in the class, then I used those properties to get the values needed:
This is where I pass the parameter:
This is the parameter tab of the flow:
And here in the diagram tab of the flow, in the properties of the connector, I am setting a local propertie to be equal to the value of the parameter:
Hey Gajjala,
How can you tell that the parameters aren't available to the flow? Also you've configured the parameters to be input parameters right?
I had a similar case to this, where I was unable to access/use the parameters I passed to the flow (I was trying to use these parameters later on and assumed that since I had passed the to the flow then I would have access to them). What I resorted to doing is this: in the flow, I saved these parameters to properties in the class, then I used those properties to get the values needed:
This is where I pass the parameter:
This is the parameter tab of the flow:
And here in the diagram tab of the flow, in the properties of the connector, I am setting a local propertie to be equal to the value of the parameter:
Later on, in 1 of my activities, I use that property:
I hope this helps. Let us know what comes up so we can try to go from there.
Thanks,
Joe
Anthem Inc.
US
Hi Joe,
I have tried in the same way what you explained above but it is not working:
Create Work:
Flow Params:
Flow connector:
Run time tracer:
Hi Joe,
I have tried in the same way what you explained above but it is not working:
Create Work:
Flow Params:
Flow connector:
Run time tracer:
I think the issue is with, the new flow is not getting executed in the same thread, since we are using tabbed format the work object is getting created in a new tab and a new thread thus the param page of 1st thread is not getting passed to second thread. but I might be wrong.
Murex
LB
Mmm. I'm unsure but I don't believe that should be the case. When you saved the property "AuthIDSearchedForField", where later on did you use it?