I'm thinking about how to work out solution to keep state of service using CMP fields. I composite my service from:
- root sbb,
- child sbb
- external app, which communicates with SBBs using SleeConnection and NullActivity
Root sbb handles service processing when gets specific initial event (Event1) from given activity, create and attache child sbb to that activity, and send information to external application with some sessionId (stored in root sbb, and in child sbb for example using CMP fileds). Now I need to send back information with same sessionId from external app to slee service using SleeConection but I can't send it to child sbb directly because this event (Event2) wouldn't be handled by child sbb entity created before (this child sbb entity has attached activity to further service processing - this from Event1).
I'm thinking about solution where: Event2 is handled by root sbb and using ChildRelation and sbb local interface find sbb child entity which have given sessionId and dispatch Event2 to that child sbb.
And here is a question: when Event2 comes SLEE create new root sbb entity (Event2 is initial event) and when I get ChildRelation in root sbb will I get all child sbb entity created before, or I will get empty collection because SLEE creates a new sbb entity tree with only root sbb entity?