Using JavaScript variables and objects
You can use JavaScript in many components in Process Designer in order to improve the behavior of your model. For example, you can write JavaScript to implement a step in your process and embed that script in an activity.
About this task
Process Designer provides
a number of JavaScript methods and variables to customize your BPDs
and to interact with:
- The design-time aspects of Process Designer
- The installation status
- The performance information
- The system data available at run time
- Serialized and deserialized Process Designer objects
- Users, groups and roles
While Process Designer supports using JavaScript to implement an activity, in most cases it is best to create a service that includes a server script component and then use the service to implement the activity.
Procedure
- Declare your BPD-level variables through the graphic interface.
- Click to select an activity in the BPD diagram or a server script component in a service.
- Click the Implementation tab in the properties.
- If you selected an activity, in the Implementation section, select JavaScript from the drop-down list.
- Type your JavaScript code in the Script text box.