The Python source code is very flexible and allows the CPA user to create custom logic, API connections and sophisticated chat behaviour.
import statement has been restricted to avoid unapproved packages and keep secure the system. If violated, the execution will be terminated raising the following exception:
[x] Security error in importing a Python module: package "<package name>" is forbidden. Will be ignored
Furthermore, the following constraints are applied:
Syntax error validation The source code must be correct from the syntactical point of view, otherwise, a
System errorexception will be raised.
Result match with the list of returns Let’s say that a function has 3 returns:
assign(4)would raise the following exception:
Integration result does not match with at least of the available returns. Also, source codes must terminate their execution by calling
assign()at least once: if no return function was called by the end of the script execution, the exception
[x] No reference to 'assign()' or 'exit()' procedures found. Be sure that the source code always ends with an assignmentwill be raised.
Execution timeout: 45 second Every custom procedure must be terminated within 45 seconds, otherwise, an exception
Execution went in timeoutwill be raised.
Maximum allocation memory: 10% of the current memory availability Depending on the environment, UAT or Production, the CPA issues between 16 and 64 GB of memory that can be allocated to the execution of custom functions. If the memory allowance is exceeded, an exception
Memory errorwill be raised.