State machine - Referencing a message
Description
The following state machine presents a message creation process. The process starts with an INITIAL state. A message can be created from an MS Outlook add-on see. Throughout its lifecycle, the message object created could have the following state :
REFERENCED: object is created with a unique easyId and can be referenced by other objectElement of payload :
sender and receiver persons : refer to abstractPerson(s), being the one who sends the message and the one who received it. In case of email, sender and receiver can be deducted. In case of call entry, sender and received can be choosen.
A guard checks that id's of persons representing sender and receiver exist. If not, the person(s) should be referenced through state machine "reference a person", according to the type of person (natural, company...)
media : type of message. If message is an email, type "email" should be selected automatically
PROVISIONEDElement of payload :
- subject : in case of email media = object of the email
- comment : free text
- content : in case of email media = copy of the email body
Diagram
For more information abohe message collection : see here