Discussion

Enforcing API conformance activities

Continuing my line of questions from Wednesday: in object-oriented languages, it's expected for an overriding function to match the basic signature of the base function. Input parameters and output types match. Of course, common compilers aren't all-knowing; some functions may write to STDOUT, some may not, and the compiler doesn't really care. But the user might care.

The Pega activity compiler catches many things, but it doesn't check parameters, pages used/created, or, for that matter, output. The latter is can be checked in Pega, for the most part: for most activity types (aside from Activity), it should not send output via Show-Page or Show-Property.

Yet here we have Pega-WB's Rule-Utility-Function.ValidateDelete. Most of the ValidateDelete's behave politely and append a message to the page. But, upon finding an error, this ValidateDelete activity calls a Show-Page and an Activity-End. So these basically trip-up your modal dialog box process.

This is probably a rare error, and should not be so much concern (and, since it's unfinal, I'm going to fix it right now). But the main point is, if there *were* a way to ensure conformance, we could better mitigate these risks.

Jon

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

July 14, 2011 - 11:38am

I asked this over a year ago -- any thoughts from Pega?

quote:


Originally posted by JONGARFUNKEL

Continuing my line of questions from Wednesday: in object-oriented languages, it's expected for an overriding function to match the basic signature of the base function. Input parameters and output types match. Of course, common compilers aren't all-knowing; some functions may write to STDOUT, some may not, and the compiler doesn't really care. But the user might care.

The Pega activity compiler catches many things, but it doesn't check parameters, pages used/created, or, for that matter, output. The latter is can be checked in Pega, for the most part: for most activity types (aside from Activity), it should not send output via Show-Page or Show-Property.

Yet here we have Pega-WB's Rule-Utility-Function.ValidateDelete. Most of the ValidateDelete's behave politely and append a message to the page. But, upon finding an error, this ValidateDelete activity calls a Show-Page and an Activity-End. So these basically trip-up your modal dialog box process.

This is probably a rare error, and should not be so much concern (and, since it's unfinal, I'm going to fix it right now). But the main point is, if there *were* a way to ensure conformance, we could better mitigate these risks.

Jon