You write the agent script and code in flows in the same editor:
- for the agent script on the Script tab of the server configuration;
- in flows with “…” in the Script row of a script code node, the Code row of a function or the Expression row of a branch — or by double-clicking an error in the code, see Code in flows.
Writing
- The code appears with syntax highlighting and line numbers; indentation is four spaces.
- Suggestions as you type: The editor suggests matching names, and after a
period the properties and methods of the object before it.
- In the agent script, the events are in the list; if you
choose one, the editor inserts the skeleton
public override void …with all parameters. In addition, there are the commands and the propertiesAgent,AgentConversationsandConversations. - In flows, it suggests the variables, the functions of the flow and the system variables.
- In the agent script, the events are in the list; if you
choose one, the editor inserts the skeleton
- The Expression of a branch stays on a single line; line breaks become spaces.
Errors
The editor checks the code continuously as you type:
- Faulty places are underlined; if you point at one with the mouse, the message appears.
- The bar below the code counts errors and warnings or shows a check mark. Clicking it jumps to the next location, as does Alt+F8.
- In flows, the error list and the Flow variables selection are also shown below the editor.
For the agent script, the editor also checks whether the Agent can start the script:
| Message | Remedy |
|---|---|
| Wrong class name. Use AgentScript as the class name. | Name the class AgentScript — in the namespace ilogixx.Agent or in none. |
| AgentScript must derive from MyCCAgentScript. | Write public class AgentScript : MyCCAgentScript. |
| AgentScript must not be abstract. | Remove abstract. |
| AgentScript must have a public parameterless constructor. | Give the class a public constructor without parameters, or none at all. |
With the See permission, the editor is locked.