Discussion

Can a activity pass parameters to a flow

Hi.
I am calling an activity from a flow and in the activity I have a Out parameter which returns results back to flow from the activity.
In the flow i am saving it in the pyWorkPage. But when i test it I am not getting results from the activity to flow.
Can a activity pass parameters to a flow?

Thanks

**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

July 7, 2011 - 3:25am

Ofcourse, this is an year old topic, I'm just responding. It may be useful for someone else.

If you would like to pass many parameters to a flow from an activity, you may do like this :

set all those parameters in the .pxFlow(FlowName).pyFlowParameters property of the workobject. Then you can use those parameters in that particular flow using "Param" reference.

Eg: .pxFlow(SampleFlow).pyFlowParameters.Name = "MEGAN FOX"

In flow, you can access it as Param.Name

Hope this helps.

July 7, 2011 - 9:35am

Hey,

this task is little tricky.
Here the flow is getting resumed after calling Activity. Its not a stright forward calling flow.

Could you pleas confirm.

Thanks
Bala

July 7, 2011 - 10:15am

Yes. It should work.
Either the flow resumes or the flow has just started, it works.

Technically we are not passing the parameters here. But we are setting the params of that particular flow. When the same are being used in the flow, we feel like they are passed to this flow. :)

July 7, 2011 - 2:44pm

Thank you. Its really very usefull. Appreciate it.

August 31, 2010 - 2:44am

quote:


Originally posted by TRILOK143

Hi.
I am calling an activity from a flow and in the activity I have a Out parameter which returns results back to flow from the activity.
In the flow i am saving it in the pyWorkPage. But when i test it I am not getting results from the activity to flow.
Can a activity pass parameters to a flow?

Thanks


Why cant you set the property in activity instead in flow?

August 31, 2010 - 4:08pm

The activity is a reusable. So that flows can call directly instead of having a activity for every flow to set appropriate values on a page.
Anyways i was able to solve the issue by using method TaskStatus-Set in the activity and passing the value. In the flow i can refer to that property as pxThread.pxTaskStatus. And on the connector i saved the value on the page.

Appreciate for response.

October 23, 2012 - 5:35am

I know this is a few years old but I also wanted to know the answer to the original question: "Hi. I am calling an activity from a flow and in the activity I have a Out parameter which returns results back to flow from the activity. In the flow i am saving it in the pyWorkPage. But when i test it I am not getting results from the activity to flow."

I did some tests (PRPC v5.3) and I don't think Activity output parameters work when the activity is called from a flow. In my test the activity sets the output parameter, but the new value isn't available to the flow when the activity has finished. It's possible activities are not meant to return values to Pega flows (I cannot find any documentation one way or another).

If anyone knows please tell!