Access the output variables of an activity inside a notification activity in Orchestration workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2016 12:20 AM
I have a powershell activity and the activity is having two outputs (result and errorMessage), i need to send a notification after the execution of the powershell activity with the result and errorMessage inside the body in the email notification . Currently, i am not able to get the result and errorMessage variable inside the notification.
Is there any way to access the output variable of an activity inside another activity ?
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2016 12:59 AM
Hello,
Save the output in a scratchpad variable.
Like :
workflow.scratchpad.psOutput= activity.output;
workflow.scratchpad.psError= activity.error;
Use the variables in your notification block in workflow. workflow.scratchpad.psError and workflow.scratchpad.psOutput
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2016 01:07 AM
Thanks for the reply Prasun, but if i am trying to set the scratchpad variable in the post-processing of the activity i am getting an error like
Cannot set property "new_user_id" of undefined to "1020"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2016 01:19 AM
can you please share the code in which can I look at?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2016 01:45 AM
this is my workflow i need to get the output value of get_user_id in the notification body
here you can see the output variable name new_user_id
in the post processing i am trying to add the variable to a scratchpad
here i am getting an error as
Cannot set property "new_user_id" of undefined to "1020"