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).
– expand the script code window.
– collapse the script code window.
– search text in the script code.
– 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:
Next
•[Connect process to object] process element
See also
•An example of using the built-in object process. How to add auto-numbering to the edit page field