Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Not able to use Connect-File for screenshots in Pega 7.1.6



When attempting to use the Connect-File method to pull files from a work object, an error is thrown on UI.

Error Messages

A valid page of class 'Data-WorkAttach-File' must be provided.

Steps to Reproduce

1. Create an Activity to Browse and Open resolved work object.
2. Then, provided mechanism to invoke Connect-File for exporting the screenshot.

Root Cause

A defect or configuration issue in the operating environment. The class "Data-WorkAttach-ScreenShot" is derived from "Data-WorkAttach-". The feature only consumes Data-WorkAttach-File pages as ScreenShot is not a child class of File caused the issue. 


Perform the local-change: create a custom Activity with following steps to resolve the issue:

1. Open Data-WorkAttach-ScreenShot page.
2. Copy the pyEncodedScreenShot value to Data-WorkAttach-File page using below java code.

//Get the current ScreenShot Clipboard page
ClipboardPage objRefPage = tools.getStepPage();
     //Import the contents of an XML document onto this page.
catch(InvalidStreamError e){
     oLog.infoForced("InvalidStreamException : " + e);
//Initialize the pyEncodedJpeg element content to the local variable
encodedJpeg = objRefPage.getProperty("pyEncodedJpeg").toString();
Note : Add the Local Paramater “encodedJpeg” of String type in activity.

3. Call Connect-File and pass Data-WorkAttach-File page.

Published January 31, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us