This macro support automatic login and logout from a Multiuser server. Which action to take is decided by the parameter serverAction.

If serverAction is set to “login” and the macro runs when the ROB-EX client is already connected to a Multiuser Server, this macro will do nothing. If the client is currently not connected this macro will make an attempt to login to the server with host and login credentials as specified in Functions->Settings->General->Multiuser. If the login action fails a setting on the macro line (abortOnFailure) decides if the entire macro should abort execution.

The intended use of this macro command is to insert it as the first macro line in integration macroes when it is important that import must only take place as long as the client is connected to the Multiuser Server. Inserting the macro will achieve two objectives:

  1. In case of unintentional logout from the server the import is put on hold
  2. Automatic reconnection to the server is established and once succesfull the import will automatically resume

An example of usage is in macroes created to carry out automatic import of XML files as setup in “Function->Settings->XML Plugin”, as shown in the picture below.

Inserting the ServerConnection macro just ahead of the “XMLImport” macro ensures that in the event of connection failure causing the integration client to be logged out from the Multiuser Server, then import of XML files are put on hold (the macro will abort) until the connection to the Multiuser Server has again been successfully established.

Note that this macro command is equally usefull for other integration plugins like CSV import, SQL import etc.

Note: this macro command is only available with license to Multiuser Server.

Example parameter configuration

Parameter descriptions

(* = configuration required)

abortOnFailure
true = if the serverAction fails (login or logout) then remaining macro execution is aborted (e.g. macro lines after the position of ServerConnection will not be executed).
false = continue macro execution even though the serverAction fails.

minSecondsBetweenRetry
An optional amount of seconds to wait between each retry of the serverAction (login or logout) – the default value is 60 seconds. If abortOnFailure is set to true, the macro execution will be silently aborted unless the number of seconds specified has passed since last attempt to carry out the specified serverAction.
Use this parameter to avoid creating a race condition on the Multiuser Server in cases where many clients would attempt to connect to the server.

prompt
true = prompt user before trying to execute the specified serverAction
false = do not prompt user before trying to execute the specified serverAction

serverAction
login = login to Multiuser Server using the host and login settings specified in Function->Settings->General->Multiuser. If already logged in this macro will do nothing.
logout = logout from Multiuser Server. If already logged out this macro will do nothing.

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment