Sie sind auf Seite 1von 41

Equivalent to a Java method or a C++ function Callable function that has access to properties related to the object it is called

d to work on
Contains logic, control constructs, local variables, etc.

Activities: Work horses behind a process flow Determine who to route a work object to, send correspondence, access database, etc.

Activities automate processing. Activity rules contain a sequence of structured steps. Each step calls a method rule or contains a control instruction such as Call or Branch. Each activity has a type that characterizes its purpose and affects which other rules can call it.

Activity Look-N-Fell
Drag and Define parameters Drop steps for this activity
List of pages it will access Define security and activity type Document your rule here

Show/hide method arguments


Insert Append DisplayRule a step a step description Show/Hide Looping / Preconditions / Transitions Delete row/step

Steps Methods Step Actions Step Pages Iterations Precondition Transition Parameters

An Activity consists of one or more steps

Steps are completed in order


A Step is a primary processing unit of an activity Defined on the steps tab of activity form A variety of conditions may alter this sequence Step 1

Distinct Operations that can be performed by an activity Step

Multiple Standard methods are provided

Are not the same as Java methods

You can review, but not alter or add methods

list of built in Methods

Step Action

1.Calling a method

2.Custom java

3.Executing another activity

Each Activity Step can Call a method, Transfer control to another activity, Execute custom in-line java

Identify the page on which this step is to act Primary Page


Is the Clipboard page created in the same class as the activity
Step running on page escalations

Step page blank, so propertyset method executes on primary page

Use the pages and classes tab to list the pages used in the steps of this activity

Use iterations to repeat a step a number of this method to times, or until a condition is met. Applyembedded page each

For each of embedded CustomerAccountData page

Valid data class for the page list property

Use a precondition to conditionally skip execution of a step.


Indicates that this step has a precondition defined and enabled.

Identify here, a when condition rule or an expression that returns true or false

Executes only if precondition is satisfied, otherwise skipped

Use transitions to specify conditions evaluated after the method in the step is performed but before the execution continues with other steps.
a checkmark indicates that this step has a transition defined.

Identify here, a when condition rule or an expression that returns true or false

Parameters

Are variables used as input or outputs for the activity When an activity is called PRPC places parameter names and values on a page Is known as the parameter page Has no name or class associated Referred to by using prefix keyword param. Example: param.depth refers to the depth parameter

parameters

Datatype

Input or Output

Click to expand all fields/parameters accepted by this method

Activity Performs general processing Assign Initiates assignments, reference from the assignment shape Connect Interface with an external system, reference from the Integrator Shape Notify send corespondence and notifications, reference from the Notify Shape OnChange Perform processing that is executed by a declare onchange rule Route Route assignments, reference from the Router Shape Trigger perform processing that is executed by a declare OnChange rule Utility perform automated processing that requires no user input, reference from the Utility Shape Validate Validate screen input

Specify the type of activity in the Security tab

Router shape can reference activities of type Route

Specific shapes can reference activities of suitable types only

Some of the standard methods we have in PRPC are as follows:


Property-Set Page-New Obj-Open Show-Page Page-Remove call ActivityName call ClassName.ActivityName Obj-Save and many more

General Template with some Methods

Step Page

When one activity calls another activity, it must specify: The page that the activity will work on (which becomes the primary page of that activity) The activity that is being called Within the called activity, its primary page is what it was called to work on Similar to the keyword this in Java and C++ Pages are referred to by name Example: PageName Properties are referred to with a . (dot) operator before the property name Example: .PropertyName Use both together like this: PageName.PropertyName

Step Page (contd)


What configuration setting we do in Pages & Classes tab of a Activity

What configuration setting we do in Pages & Classes tab of a Activity

The Page name we specify reflects in the step page of steps tab.

User Page and pyWorkPage Functionality

User Pages A structure containing all the top-level pages created by your application and normal processing, sorted alphabetically by page name pyWorkPage is associated with User Pages. pyWorkPage Represents the current work object Contains all its properties and their current values In other words the current page on which you are operating is called primary page. Think of primary page as this page Activities may use the logical page names, which may not actually exist as they are called in the clipboard. For example Activities may use a working page called Primary, a parameter page called Parameter and a local parameter page called Local.

Page Responsibility

Is an in-memory data structure that holds name-value pairs Acts as a buffer (temporary copy) of object instances that are copied from, or may later be stored in a database table Typically has: A name A class A list of properties and their values Pages are added to the clipboard by activities and user input
Name: pyWorkPage
Properties

Class: BIG-HR-TimeOff PTOAvailable PTOTotal PTORemainder 25 0 25

Property-Set Page-New Show-Page Obj-Open Page-Remove

Method: Property-Set

Step page on which properties will be set

Expand Property-Set Method

* Indicates required parameters

Literal values

Expressions
Append rows to set multiple properties

Value of other property

Used to set the values of one or more properties

Page-New

Used to create a new page on the clipboard The new page may be a top level page or an embedded page Will be named using the Step page attribute You can identify a model to initialize the newly created page
Creates an embedded page

Associated class of the page

Show-Page

Sends an XML representation of the step page to a users Internet Explorer browser session
Is used as an aid to debugging

Used to open an instance stored in the database and load it into the clipboard

Step page to populate with data

Class of step page Values required in order to locate the correct object

Used to delete one or more pages from the Clipboard Good development practice
The contents of database are not affected

Remove this page from clipboard

Testing an Activity Consists of three steps, they are as follows:


Set the May Start attribute Execute View the Results

Unit Testing an Activity

For testing purposes, you may need to check this box temporarily. Checking this allows users to start this activity directly through user input processing

Allow activity to start

While on the activity form, press the Run button

Create Test Page

Execute Activity

1. Create a test page or test without

2. Execute the activity

3. You should get a good status message

Use the clipboard tool to view the results

Value set

Temporary page created by clicking Create Page and Run Rule

Define initial values for properties of a specified class Are applied to a new empty page of a class

Are listed in the technical rule category

Similar to constructors in Java and C++ Set many property values in one processing step Are named pyDefault by convention

This model calls super class model

What is Model?

When you create a page, you can opt to specify a model Rule used to initialize a page Set property values in a model Similar to constructors in Java and C++ Does not take arguments/parameters By convention, named pyDefault Subclass models call superclass models that have the same name To create a model in work class that initializes certain properties Examine the default model for Work- before creating a model Property values set in your model override any set by the models in Work- (and other parent) classes Initialize all application-specific data

Sub Class Model may call super class models that have the same name

First uses directed inheritance to find and apply standard models


The model in the highest class is applied first

Then uses pattern inheritance to find and apply specialized models The current model is applied last 1 @baseclass pyDefault 3 2 JPM-OrderEntrySystem WorkpyDefault pyDefault JPM-OrderEntrySystem-PO 4 pyDefault

Initializing Properties in a Model:

Das könnte Ihnen auch gefallen