More about Activities
 

  1. About 
  2. New 
  3. Steps 
  4. Parameters 
  5. Pages & Classes 
  6. Security 
  1. Test Cases 
  2. History 
  3. Methods 
  4. More... 

Activity Types

Most activities referenced in a flow are defined in the Work- base class, or a class derived from the Work- base class. To become a Notify, Integrator, Utility, Routing, or Assignment activity, they must meet other constraints and have this type recorded in the Activity Type field of the Security tab.

Examples

See the PDN article Introduction to Activities for an example of a simple activity and the development process.

Verbalization display

Select Actions > Preview or type the equivalent keyboard shortcut CTRL+ALT+P to see a step-by-step verbalization or English text description of this activity (informally known as the "Describe This Rule" presentation). The system creates an HTML topic describing each step of the activity, with links to other rules referenced by the step.

Processing and presentation of failed activities and uncaught exceptions

When a top-level activity completes but produces no HTML display, by default a "No content" form appears with a green checkmark and the message "The operation completed successfully, but returned no content.

When an activity fails or encounters an uncaught exception, by default a "Please contact your system administrator" window appears with a red X mark:

Your application can override and localize standard harnesses that present these two windows, and can override the standard activities that call the harnesses. See See How to customize the activity success and exception windows.

Calling an activity within an expression

The standard function callActivity() in the Pega-RULES Utilities library calls an activity, but returns only void, not a value result. You can execute an activity in an expression, but only for its side effects. Identify the primary page, the activity, and the parameter page. For example:

@Pega-RULES:Utilities.callActivity(pyWorkPage,
      MyActivity, tools.getParameterPage());

Note: To learn how to invoke callActivity() indirectly (as an extension) in a custom hybrid mobile app, see also callActivity action as extension.

Java code display

When you save an activity, the system converts the steps to Java source code. As a learning or debugging aid, you can review this Java code.

Select Actions > View Java to see the system-generated Java code that implements the activity. The window presents a read-only preview of the Java that implements this rule instance. This Java code is not identical to the Java that is executed at runtime, which includes Java code inlined from other rule instances and reflects rules in the requestor's ruleset list.

Security

If your application rulesets contain activities with Java steps, run the Rule Security Analyzer before locking a ruleset version, to look for possible security issues.

Definitions instruction, method, step
Related topics Activity-List-Add method
Branching to another activity
Calling another activity
Debugging with the Tracer
Finding methods by function
How to create activities for use in flows
How to test method results using a transition
Using Java in an activity step
Standard rules Atlas — Standard methods by name

UpAbout Activities