Question
Optum Inc
US
Last activity: 14 Aug 2018 22:13 EDT
Return results from activity
How can you return results from an activity?
Let's say I have an activity named Sum taking param1 and param2, both integers. I have An ActivityStarted event and need to return the sum of the param1+param2. I know that one can define the parameters of the Sum in the interaction.xml but I see no place to define the output of any activity.
I think I could use the Context and have the activity set the result in there and thus return anything that way but that feels like using global variables. Wanted to make sure there is no way of returning a result before using the Context.
Thanks!
***Moderator Edit-Vidyaranjan: Updated Platform Capability***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
AU
This is the purpose of an Out parameter, that being said if the use case is addition or concatenation would a function be more fit for purpose?
Optum Inc
US
Perhaps I oversimplified my problem statement. I will try to rephrase:
I have 2 web apps, each with its own adapter project. I have a 3rd project that is supposed to control the other 2. This 3rd project has a chain of 3 activities, each taking its input from the previous one:
A1=Read some values from the first web app
A2=Update web app 2 based on values harvested from the first
A3=Update web app 1 based on the result of the A2 (status of update).
I figured initially that activities are like functions: they take input and return some value as output. I was surprised that it isn't so, as far as I see. The thing that comes closest is the SetCompletionStatus for RobotActivity but I only use plain Activity.
So, is there a way to carry info from one activity to the next, w/o using the Context?
Thanks!
CollabPartnerz
IN
Can you try setting OutParam.
CollabPartnerz
IN
You can use the Output param
Pegasystems Inc.
IN
Yeah define a param in parameters tab and that should be Out param.
Optum Inc
US
Thank you all for your comments. Where exactly is this Parameters tab? A screenshot woudl help :)
As far as I know you configure activities' parmeters in the Interactions.xml. Is there some syntax I could use to configure an Out parameter there?
It is also worth mentioning I am talking about the OpenSpan functionality (desktop automation), not the Pega on server side.
Pegasystems Inc.
AU
I believe people are referring to the Pega 7 Platform version of activities; I'll forward this discussion to a Robotics specialist for comment.
Optum Inc
US
Thank you! Also, could you please change the tag to OpenSpan.