Business process setup guide (BPMS)
PDF
This documentation is valid for Creatio version 7.15.0. We recommend using the newest version of Creatio documentation.

[Script task] process element

The [Script-task] process element is a system action that executes the C# code and provides its interaction with other elements of the business-process. Use this element to implement logic that the standard process elements cannot provide.

To edit the script code, double-click the diagram. The element setup area will open, where you can enter and edit the script code (Fig. 1).

Fig. 1 Editing tab of the script task code

chapter_process_designer_script_task_code.png 

btn_script_task_bigger_window.png – expand the script code window.

btn_script_task_window_small.png – collapse the script code window.

btn_com_show_hide_outline.png – search text in the script code.

btn_com_show_hide_hidden_characters.png – show the hidden symbols (spaces, tabulations, etc.) in the text code.

Note

Creatio enables you to execute processes without publishing them. However, the use of methods and [Script-task] elements requires the schema publication. For more information about calling business process methods, please refer to the dedicated article.

Code syntax for interpreted processes

Starting with version 7.12.3, all new business processes in Creatio are interpreted. Use get and set methods (Fig. 2) to reference the parameter values of an interpreted process.

The Get method returns the value of an item or process.

Method signature:

Get<T>(string path)

where:

T — parameter value type.

path — a string that specifies the path to a parameter or property. The path is built according to these rules:

“parameter name”

“property name”

“element name.parameter name”

“element name.property name”

The Set method sets the value of an item or process.

Method signature:

Set(string path, T value)

where:

value — the specified value.

path — a string that specifies the path to a parameter or property. The path is built according to the rules described above for the Get method:

Fig. 2 The [Script-task] element body that contains the call to the interpreted process parameter

chapter_process_designer_script_task_integrating_code.png 

Next

[Connect process to object] process element

[User task] process element

See also

An example of using the built-in object process. How to add auto-numbering to the edit page field

How to run a process from client module

Did you find this information useful?

How can we improve it?