Coding Standards Quiz - 7/8/2009

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Robdunie
R
Robdunie
Community Contributor
Quizzes Created: 1 | Total Attempts: 91
Questions: 14 | Attempts: 91

SettingsSettingsSettings
Coding Standards Quiz - 7/8/2009 - Quiz


Quiz to understand the comprehension of the PRPC coding best practices and standards.


Questions and Answers
  • 1. 

    What is the preferred method for comparing two string values?

    • A.

      Use the == operator

    • B.

      Use the @equals() library function

    • C.

      Use the Lib(PegaRULES:String).equals() library function

    • D.

      Use the = operator

    Correct Answer(s)
    B. Use the @equals() library function
    C. Use the Lib(PegaRULES:String).equals() library function
    Explanation
    The preferred method for comparing two string values is to use the @equals() library function or the Lib(PegaRULES:String).equals() library function. These functions are specifically designed for comparing string values and ensure accurate results. Using the == operator or the = operator may not yield the desired outcome as they compare object references rather than the actual string values.

    Rate this question:

  • 2. 

    Explain in your own words why you chose the answers to question 1.

  • 3. 

    What must you call in order to create a .pyID on a clipboard page that is a decedent of Work-?

    • A.

      The Method Property-Set to assign a value to the property

    • B.

      The Activity GenerateID

    • C.

      The Method Property-Set-Special to assign a value to the property

    • D.

      The Activity GenerateNewID

    Correct Answer
    B. The Activity GenerateID
    Explanation
    .pyID is a property whose value needs to be unique based upon the .pyWorkIDPrefix along with an internally generated sequence number. You should not explicitly set this number. GenerateNewID is not intended to be called for work objects.

    Rate this question:

  • 4. 

    Assuming you were developing an application on a PRPC v5.1 system and you have a rule that is in a locked ruleset, what things must you do in order to deprecate a rule?

    • A.

      Unlock the ruleset and delete the rule

    • B.

      Set the availability to "No"

    • C.

      Set the availability to "Withdrawn"

    • D.

      Add the word "DEPRECATED" to the description fields

    • E.

      Set the availability to "Blocked"

    Correct Answer(s)
    D. Add the word "DEPRECATED" to the description fields
    E. Set the availability to "Blocked"
    Explanation
    To deprecate a rule in a locked ruleset on a PRPC v5.1 system, you need to add the word "DEPRECATED" to the description fields and set the availability to "Blocked". Unlocking the ruleset and deleting the rule, setting the availability to "No" or "Withdrawn" won't suffice for deprecation.

    Rate this question:

  • 5. 

    Assuming you were developing an application on a PRPC v5.2 and later system and you have a rule that is in a locked ruleset, what things must you do in order to deprecate a rule?

    • A.

      Unlock the ruleset and delete the rule

    • B.

      Set the availability to "No"

    • C.

      Set the availability to "Withdrawn"

    • D.

      Add the word "DEPRECATED" to the description fields

    • E.

      Set the availability to "Blocked"

    Correct Answer(s)
    C. Set the availability to "Withdrawn"
    D. Add the word "DEPRECATED" to the description fields
    Explanation
    To deprecate a rule in a locked ruleset on a PRPC v5.2 and later system, you must set the availability to "Withdrawn" and add the word "DEPRECATED" to the description fields. Unlocking the ruleset and deleting the rule, setting the availability to "No", or setting the availability to "Blocked" are not necessary actions to deprecate a rule.

    Rate this question:

  • 6. 

    When restricting the list of valid values for a property, the following mechanism(s) should be used to configure the list:

    • A.

      Rule-Obj-Validate to validate that the value is part of a pre-defined list

    • B.

      A local table edit should be created on the Rule-Obj-Property rule

    • C.

      Rule-Obj-FieldValue instances should be created for each of the possible values

    • D.

      A remote table edit should be used to reference an external list of possible values

    Correct Answer(s)
    C. Rule-Obj-FieldValue instances should be created for each of the possible values
    D. A remote table edit should be used to reference an external list of possible values
    Explanation
    The correct answer is that "Rule-Obj-FieldValue instances should be created for each of the possible values" and "A remote table edit should be used to reference an external list of possible values".

    To restrict the list of valid values for a property, Rule-Obj-FieldValue instances should be created for each possible value. This allows the system to validate that the value entered is part of the predefined list.

    Additionally, a remote table edit should be used to reference an external list of possible values. This allows the system to dynamically retrieve the list from an external source, ensuring that it is always up to date.

    By using both mechanisms, the list of valid values can be properly configured and enforced.

    Rate this question:

  • 7. 

    What shape type(s) must you never remove from a flow once it has been deployed to production and there are work objects started on that flow?

    • A.

      Assignment

    • B.

      Fork

    • C.

      Router

    • D.

      Connector Utility

    • E.

      Spin-off

    Correct Answer
    A. Assignment
    Explanation
    Once a flow has been deployed to production and work objects have been started on that flow, the shape type that must never be removed is the "Assignment" shape. This shape is responsible for assigning work to users or work queues and removing it could potentially disrupt the workflow and cause errors or delays in processing the work objects.

    Rate this question:

  • 8. 

    Why must you always perform an Obj-Save-Cancel when an Obj-Save fails?

  • 9. 

    What following things must be down in order to define an Activity as abstract?

    • A.

      Put the string "=Abstract=" in the usage description

    • B.

      Put a single step that is commented out indicating that the activity is abstract

    • C.

      Put a single step that throws a PRRuntimeException indicating that the activity is abstract

    • D.

      Put several steps in the activity that dictate how that activity will perform operations

    Correct Answer(s)
    A. Put the string "=Abstract=" in the usage description
    B. Put a single step that is commented out indicating that the activity is abstract
    Explanation
    To define an Activity as abstract, it is necessary to put the string "=Abstract=" in the usage description and also include a single step that is commented out indicating that the activity is abstract. This way, other developers can understand that the activity is intended to be used as a base class and cannot be instantiated directly. The "=Abstract=" string in the usage description serves as a clear indication of the abstract nature of the activity, while the commented out step provides additional documentation within the code itself.

    Rate this question:

  • 10. 

    Which of the following fields must always be populated on every rule?

    • A.

      Short description

    • B.

      Usage description

    • C.

      Instance description

    • D.

      Long description

    • E.

      None are required

    Correct Answer(s)
    A. Short description
    B. Usage description
    D. Long description
    Explanation
    The short description, usage description, and long description fields must always be populated on every rule. These fields provide essential information about the rule, such as its purpose, how it should be used, and additional details for clarification. By ensuring that these fields are filled out, it helps users understand and utilize the rule effectively.

    Rate this question:

  • 11. 

    Why should Rule-Obj-Flow and Rule-Obj-FlowAction rules always have a short description that starts with a verb?

  • 12. 

    Which of the following are good examples of names given to rules?

    • A.

      BeforeAction_AutoSubmit

    • B.

      AutoSubmit_AfterAction

    • C.

      CreateCorrLetter

    • D.

      ProcessWork

    • E.

      GetWork_Objects

    Correct Answer(s)
    B. AutoSubmit_AfterAction
    D. ProcessWork
    Explanation
    The names "AutoSubmit_AfterAction" and "ProcessWork" are good examples of names given to rules because they are clear and descriptive. The name "AutoSubmit_AfterAction" suggests that the rule is related to an automatic submission that occurs after an action is taken. Similarly, "ProcessWork" indicates that the rule is involved in processing work. These names provide a clear understanding of the purpose and functionality of the rules. On the other hand, the other names provided ("BeforeAction_AutoSubmit" and "GetWork_Objects") are not as clear and may not effectively convey the purpose of the rules.

    Rate this question:

  • 13. 

    Which of the following are clipboard page names allowed by the standards?

    • A.

      TmpClipPage

    • B.

      TempClipPg

    • C.

      PageListPg

    • D.

      PyWorkPage

    • E.

      MyPage

    Correct Answer(s)
    C. PageListPg
    D. PyWorkPage
    Explanation
    The correct answer is PageListPg and pyWorkPage. These two names are allowed by the standards for clipboard pages. TmpClipPage, TempClipPg, and MyPage are not mentioned in the question as being allowed by the standards, so they are not correct answers.

    Rate this question:

  • 14. 

    Why should you always use Rule-Obj-ListView and Rule-Obj-SummaryView rules to run reports against PRPC managed database tables instead of RDB-List rules?

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Jul 17, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jul 08, 2009
    Quiz Created by
    Robdunie
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.