In the moment of new item receiving the program checks if the item
doesn't occur as an event in any of existed cases. If it occur, an
appearances counter of a case is increased and an event state changes
on active (can't be any changes because an event state could be active
earlier). If no event cosistent with an original is found, a new event
is created. The appearances counter of a case is set as one, an event
state is given as active. Next all events are checked in next cases
whether any of them isn't related with a processed message, i.e. if
a relation like that was create through damadbud program. In case of
the relation is found, the processed event is added to a given case.
If not, a new case will be created and it will include one event for
the time being.
The first step of a service procedure is checking whether a
given case shouldn't be deleted, i.e. removed from the Database.
Otherwise it's checked whether for that case should be run any
actions (programs) and they will be run if it's true.
Individual procedures are shown below: