Table of Contents

Attachment exists assertions


Only available versions of this content are shown in the dropdown

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.

  • Configuring attachment exists assertions

    For flows and case types, you can verify that the flow or case type has an attachment of type file or note (attached using the Attach Content shape) or email (attached using the Send Email shape) attached.

  • Defining expected test results with assertions

    Use unit test cases to compare the expected output of a rule to the actual results returned by running the rule. To define the expected output, you configure assertions (test conditions) on the test cases that the test, when run, compares to the results returned by the rule.

  • Attaching content to a case

    You can use the Attach Content shape to control the kind of information that is added to a case. By attaching relevant correspondence and documentation, you can centralize the supporting information for a case.

  • Sending automatic emails from cases

    By using email, you can share information about a case with stakeholders and case participants. Add the Send Email shape to your business process, to control the number of recipients and the message format. For example, you can inform stakeholders about the approval of a job candidate in a hiring process.

Suggest Edit

Have a question? Get answers now.

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