Hi,
I'm new to the world of RMS, but have been looking into making RMS Add- Ins. I'm developing in C#.
I've got a couple of add-ins written that don't do anything particular at the moment, but do need a way of passing state to each other.
The two add-ins are hooked into the InitializeTransaction and PrintReceipt hooks. At the moment, I'm passing state around by using a session variable.
However, what I find a little odd is that the session variables appear to be implemented as a fixed 10-position array. For my initial testing I'm just arbitrarily picking one slot in the array to use. And it works a treat.
But, in a real-world deployment, I can't hard-code a slot to use. So, should I just loop through all 10 slots, looking for the first free one (if setting the variable) or one that conforms to a particular type (if retrieving the variable)? But what happens if all 10 slots are in use by other add-ins?
The only other options I can see are to either customize the database and manage state through there, or to have something like a .NET Remoting singleton to manage all the state. But those both seem like using a sledgehammer to crack a nut.
Please, someone tell me I've completely misunderstood how the session variables work, and set me straight...
Cheers Ian