Hi all,
I was trying to used objects to store information for processes to be used in other objects without passing them, but failed.
I try to better explain here:
I collect all errors I have during a process in some structures (collections and variables), I then send those errors in mail (or I write them in an excel file).
As I do this in all my processes, I would like to have objects that incorporate these functionalities.
I thought to have understood that memory space of an object is one for every object, that is I cannot have two instances of a same object running in a process, or, in other words, every object is a singleton within a process.
I thought to use this property to have:
- an Error Collection Object
- a Mail Object
- a Report Generator Object
Inside the mail object I have an action "mail the errors" (same in Report generation with a "make error report"), and I tried to have those action call the "Error collection" Object, without having to pass parameters from the main process .
What I have is that If I use the "Error Collection Object" inside the process, I can see my errors just like I wanted., even in different pages, without having to share variables or so.
But the "Mail Object" called by the same process, isn't seeing the same "Error Collection Object" used by the caller process.
What have I misunderstood?
Thank you,
marco
I would like to