Skip to main content
LinkedIn
Copied!

Table of Contents

runActivity

Version:

Only available versions of this content are shown in the dropdown

Runs an activity from a script.

Signature

runActivity(options)

Returns

Not applicable.

Parameters

Name Description Type Required
name Specifies the name of the activity that the API launches. String
parameters Specifies the parameters for the activity in an array. JSON object
contextPage Specifies the name of the context page for the activity. By default, the activity runs in the primary page context. String
event Specifies the event that launches the activity. DOM event object

In the following example...

var options = {
                name: “activityName ",
                parameters: [{name: "param1", value: "Page1.prop1", isProperty: true},  {name: "param2", value: 123, isProperty: false}],
                contextPage: "page1.page2 ",
                event: eventObject
            };

            pega.api.ui.actions.runActivity(options);
Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us