Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

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.

Attachment exists assertions

Updated on April 5, 2022

On case types and flows, you can test whether an attachment of type file or note, which were attached in the Attach Content shape, or email, which was attached using the Send Email shape, exists.

If you have multiple attachments on a flow or test case that match the expected value of the assertion, the assertion runs for every attachment that exists. If the system finds an attachment that matches the assertion value, the assertion passes and iterates over all the attachments on the flow or case type. If no attachment exists, the assertion fails

The system compares the expected output on attachments that are recorded on the pyWorkPage page. For example, if a case type has a parent case that spins off a child case, and you record just the child case, the pyWorkPage page records attachments for only the child case and not the parent case, which is recorded on the pyWorkCover page.

In addition, if you create a test case from a parent case that generates a child case that is returned to the parent case after the child case runs, the pyWorkPage page records the attachments only on the parent case.

For example, your case has an Attach Content shape that attaches a Process immediately note in the first stage of the case type. In the third stage, your case has a Send Email shape that attaches an email with the subject Request approved. The assertion passes if you searched for either the Process immediately note or Request approved email subject.

Have a question? Get answers now.

Visit the Support 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.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us