Support Article
Property set is not working
Summary
In one of the activity on trying to set a page list property from pyWorkPage to Primary page, when both pyWorkPage and Primary are same, the property-set is not working.
When Primary page and pyWorkPage are not same, then its working fine.
Error Messages
Not Applicable
Steps to Reproduce
1. Create a case. Configure it to have a pagelist property.
2. Populate the pagelist property to have values. Check the clipboard, pyWorkPage should have the pagelist property populated with results.
3. Configure an activity on click of a button which does a Property-Set as below:
Primary.pageListProp = pyWorkPage.pageListProp
4. Click on the button. Check the clipboard, the pagelist property is null.
Root Cause
An issue in the custom application code or rules :
On trying to set pyWorkPage.pageListProp into Primary.pageListProp it clears the Primary.pageListProp and then tries to put values from pyWorkPage.pageListProp.
As Primary and pyWorkPage are same, clearing from Primary.pageListProp is clearing from the object pyWorkPage.pageListProp as well.
Resolution
Here’s the explanation for the reported behavior:
Since the Property-Set clears the current value of the property before setting a new value, perform the same only if required.
Because both source and target are same, both are getting cleared in this case.
The same works fine for string properties, because the generated java uses a different API in this case which does not clear the property before setting the value.
Published July 23, 2018 - 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.