Support Article
avoid hard coding pyWorkPage in activity
SA-1754
Summary
An Activity is used to retrieve customer data. The activity is working as expected but pyWorkPage has been hardcoded. This service request was a “how to” question really on how to parameterized the pyWorkPage.
Scenario:
1. An Activity has been created to retrieve customer data.
2. The pyWorkPage is currently hardcoded on the activity.
3. Said hardcoding isn’t ideal because the Work Object could be on any page and not only on pyWorkPage.
Error Messages
No specific error message
Steps to Reproduce
- Create an Activity with pyWorkPage hardcoded.
- Open a WorkObject on another page (not pyWorkPage)
- Activity will not be working as expected of course
Root Cause
This is the hardcoding effect, the page name has to be parameterized in order to avoid those type of unexpected behaviour.
Resolution
A local change has been provided in order to parameterized the working page:
- Use getStepPageName function to get the step page name
- The parameter need to be of type Page Name
- Then on the activity use the parameter not the pyWorkPage hardcode
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.