If you are trying to read a property from a work object then that means you are trying to extract the content from BLOB. So far I am not aware of a Rule-Utility-Function written to do this job, since it should be done by UDFs like pr_read_from_stream at database.
Best way is to expose the property from BLOB as a column, 'optimize for filtering' wizard can do that job for you. Else you can create a column with the name as same as defined on the property and mapping the appropriate column type to its relevant property type, once this is done at database you can run prpcUtils.bat commandline utility tool with the action as 'expose' by mentioning the class name (where the property resides) in the prpcUtils.properties file
Posted: 5 years ago
Posted: 11 Apr 2017 11:07 EDT
Eric Osman (ericosman_GCS)
Senior Software Solutions Engineer
Click on "(i) > Engine API" from the developer portal, and in the doc that pops up, see class "Database". The method you want is "open". You can open the work object by handle, and then read a property with class "ClipboardPage", for example method "GetString" if it's a string property.
Sometimes what I do is first code it up as an activity, then peek at the "action > java" to see what java got generated, if my goal is to package the work into a java step or a rule-utility-function. (Are you sure you wouldn't be better off packaging into an activity rule instead of a function?)
The relevant lines you would put in the activity for reading a property, so that you can peek at the java would be something like: