I want to send a message to
an enterprise object which after a delay then sends a message to another
statemachine to change its state. Note the simple delay will eventually be replaced by a process model using more
enterprise objects. I am just trying to figure out how this communication works.
When an entity comes out of the Enterprise object I can send a message to the Statemachine. I connected a port to the
last Enterprise object and set Out-Message-type to Entity. When I initialized the associated Active object I used
out.map(PandemicStage); I do not get any compiler errors here but I have not tried it at run time.
I can not get a compilable version for sending from the Statemachine to the Enterprise object. What do I send? Is there
a command to create a entity in the transition. The documentation says to make a custom entity and put its constructor
in the newEntity field of the object. There is no newEntity field in a transition. Maybe I send a normal
"string" message to a port and do something special in the port. Again I do not see a newEntity field in the
port. Do I need a custom Entity? I am not sending any special data yet. What port initialization code is appropriate?
How do I adddress the port?
Any insight into how this works would be appreciated.
Thanks
Victor Gleim — 12.02.08
John, you could send a message to a statechart at any time using the fireEvent method. However, it is not possible to
send a message to an Enterprise Library object as far as these objects do not process messages but only entities pass
through.
If you tell me what exactly you want to simulate, I can suggest you something. Could you make a simple example?