Smart Bots overview

Smart Bots is a plug-in for the Instant Messaging Server. It allows the application designer to create and run automated programs, called bots, which execute a set of operations in response to fulfillment of conditions. Examples of the use of Smart Bots includes the following.

  • Application forms.

  • Job orders.

  • Field Service Management.

  • On-site inspections work flow.

  • Smart Assistants.

Smart Bots are designed to automate recurrent daily tasks, currently executed by operators and administrators manually. Describing and formalizing the process in terms of parametrized states and transitions between them allows defining flexibly nearly any existing process.

Deployment

The Smart Bots plug-in is available as part of PcVue's installation. To install it select the Custom installation and select the Smart Bot feature.

  • Bots are loaded from the folder <projectFolder>/MsgData/Bots. Plugin and bots are started along with the Instant Messaging Server.

  • Bots store the local data in the folder <projectFolder>/MsgData/Bots/Data.

  • Schedules are loaded from the folder <projectFolder>/MsgData/Schedulers. Scheduler is started along with the Instant Messaging Server.

  • The bots configuration file is loaded from the folder <projectFolder>/MsgData/C. This configuration is used by Smart Bots at run-time for corresponding operations.

Smart Bots nomenclature

  • Smart Bot - A process blueprint described by a finite-state machine with a set of operations in each state and conditions defined for every transition. Sometimes abbreviated to just Bot.

  • Bot agent - A thread running the given Smart Bot in the given chat. An instance of Bot agent is created for every chat where this Smart Bot has access to. A bot agent runs a finite state machine with defined states and transitions between states. Every Smart Bot has an initial state. When the bot agent arrives to a defined state, a corresponding set of operations is executed. After that, a set of conditions is continuously verified. If a certain condition is met, the bot will pass to the next state following the transition.

  • Trigger - A special state containing conditions instead of operations. Triggers are only verified when the bot agent is idle, that is when it is running but cannot move forward on any transition. If all conditions of a trigger are met, the bot will pass to the trigger state. After the triggered scenario is finished, that is when bot agent arrives to the final state in the trigger branch, the bot will stop, return to the last state or reset from the initial state depending on the specified behavior.

  • Scheduler - A thread running at the Instant Messaging Server process. It monitors the loaded schedules and execute Bot agents at the planned time.

Bot permissions

An independent bot agent is started for each chat that the bot has access to. This implies two cases:

  • The bot agent is started in a chat when the bot is invited to the chat.

  • The bot agent is started in a chat if the bot belongs to a super profile (with a profile level greater than the level of all chat participants).

Each bot agent has permissions according to its role in the chat. For example, if the bot agent is invited as a guest, it will be able to send and read messages, but will not be able to invite other users to the chat. See Instant Messaging book for further details on user permissions.

The bot has the same set of permissions as any other user with the same role.