Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Activities:: Work-.Addwork Work-.Add

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Activities:

1. What are the Pega Activities we used?


Work-.Add Creates a new work object (without any cover work object) and performs a Commit
method, which saves the work object and releases all locks.
Work-.AddWork Use Work-.AddWork rather than Work-.Add in situations where the Commit
method is not wanted until later.

AddCoveredWork Creates a new cover work object but does not perform a Commit method, so
current locks are retained.
Work-.AddCovered Use Work-.AddCovered rather than Work-.AddCoveredWork to commit the
new work object.

AddWork Creates a new covered or non-covered work object. Called with a primary page that
inherits from the Work- base class. Commits the new work object if there is no flow execution to
start; if it starts a flow execution, the commit operation typically occurs when that flow execution
creates an assignment.

New Called by harness processing to create a (non-covered) work object and display the work object
form.
NewCovered Called by harness processing to create a covered work object and display the work
object form.

Assign-Worklist Creates a normal assignment (Assign-Worklist class) added to a user's worklist.

Assign-Workbasket Creates a normal assignment (Assign-Workbasket class) added to a


workbasket. If the workbasket doesn't exist, the assignment can be routed to the current user.

Notify Send an e-mail message as correspondence to a party identified through a parameter.


NotifyAll Send a single e-mail message to each work party identified in the work object.

ToCreateOperator Route the assignment to the user who entered the work object.
ToWorkbasket Routes the assignment to a workbasket identified in a parameter.
ToWorklist Routes the assignment to the worklist of a specific user, identified in a parameter.

CorrNew Send correspondence (that requires no user interaction), and save it as an attachment to the
work object. For email output, can send all work object attachments or selected work object
attachments as email attachments. The optional Priority parameter allows the outgoing mail to be
marked as high or low priority in certain e-mail client programs, such as Microsoft Outlook.

Assign-.NewDefaults Called from Work-.NewAssign and Work-.NewAssignBasket on the


assignment. Allows the developer to customize or extend the steps that are performed when a new
assignment is created.
Work-.NewDefaults Called from Work-.New and Work-.NewCovered. Override to customize or
extend the steps that are performed while creating new work page for the New harness.
2. What's the difference between parameters and local variables? How are they used in an
activity?
Values stored in parameter values can be shared between two activities but the scope of local
variables is confined to the activity in which they are declared.
Parameters can be referenced as Param.parametername.
Local variables are referenced as Local.variablename.

3. How can we pass parameters between activities? Explain.


By using In/Out parameters. In parameters means that its expecting a values from another activity
and Out parameter stores the values to be used by another activity.

4. Explain with an example how can we reuse an activity?


By parameters itself. Say for example we have an activity to append two strings which keeps
changing as the application proceeds.
So declare two parameters of type Strings and pass different values to it, but the business logic to
append them will always remain the same, only parameter values keeps on changing.

5. What is a step page what role does it play in an activity?


Each step in an activity may have a designated step page. When creating or updating an activity, the
developer identifies an existing or new clipboard page for the method (or instruction) in that step to
act on, in a column of the tab labeled Step Page.
The step page becomes the primary page for the duration of this step's execution.
So any rule referenced in this step will be looked upon in the class associated with that step page, if
there is no step page than the Applies To class will considered.

6. How to write a java code in a activity? Explain with a small example.


Just by using an API “java” in method tab.
Eg. If we want to access a clipboard property then the java code will be like,
Tools.findPage(“pageName”).getString(“.PropertyName”);

7. Consider this scenario, I have an activity in ruleset A and I want to call this activity from an
acitivity in ruleset B.Is this possible? If yes, how?
Yes, this is possible through ruleset prerequisites.It is defined under Rule-Ruleset-Version.
Note : Process Commander enforces RuleSet version prerequisites only during development (as a
developer adds or saves rules) and as rules are imported during Import Archive operations.
Prerequisites are not enforced at runtime; the user's RuleSet list and the rule resolution algorithm
determine which rules are available for the user to execute.

8. What is show-page and show-html? Explain with example.


Show-Page is used to display any clipboard page in XML form (name-value pair).
Show-HTML method is used to cause the activity to process an HTML rule and send the resulting
HTML to a user for display by Internet Explorer. Also known as stream processing. This may
involve the interpretation of JSP tags (or the older HTML directives), which can access the clipboard
to obtain property values, or can insert other HTML rules, and so on.
9. Explain about Onchange Activity?
OnChange activity to be executed automatically by a Declare OnChange rule, Such activities must
not use any methods that directly change the properties or the database.
Declare Expression rules do not evaluate during the execution of an OnChange.activity. OnChange
activities must not perform any forward chaining themselves.

10. Explain about Trigger Activity?


Trigger activity to be executed automatically by a Declare Trigger rule. Because triggered activities
run during database commits, they cannot themselves commit database transactions.

11. How do we create a Work Object from Activity?


First Create NewPage with a Page-New
Within the Page-New step specify the “model” and “NewClass”
On the new page Set the properties
.pyFlowName with FlowName
.pyDescription
.pyOrigOrg
.pyLabel
Call Add activity in the next step and specify the StepPage where we have to call the
WorkObject
Call Add Creates the WorkObject where the activity belongs to type of the class.

You might also like