I know there is no disconnect function in TI, but I'd like to submit you my problematic, in case you have some ideas to solve it.
I have an application where users send data via flat files. A treatment (ie several TI processes) is launched every 30 minutes, if new files have been sent. The treatment lasts less than a few minutes.
The problematic is the following: if users refresh some large reports during the treatment, they may have wrong data in the report (a mix of old and new data).
To avoid this, we have implemented two things in the first process:
1. We remove all the clients (except Admin) from the groups. It prevents users to "connect" during the treatement.
2. We delete all clients (except Admin) to force them to re-connect after the treatment so that they refresh again their reports.
We tested it and it seemed to work. But in the production environment, sometimes, the treatment remains blocked on that first process. It never ends, and the service can not be stopped properly. I guess it is linked to the fact that some users are connected, but not sure.
Here is the code:
Code: Select all
Nb_Clients = Dimsiz('}Clients');
Nb_Groupes = Dimsiz('}Groups');
i=Nb_Clients;
While (i>0);
Client=Dimnm('}Clients',i);
if(Client@<>'Admin' & Client@<>'TM1BATCH');
k=1;
While (k<=Nb_Groupes);
Groupe=Dimnm('}Groups',k);
RemoveClientFromGroup(Client,Groupe);
k=k+1;
End;
DeleteClient(Client);
endif;
i=i-1;
End;
TIA