<< Click to Display Table of Contents >> Create Action |
![]() ![]() ![]() |
Show/Hide Hidden Text |
Create Actions cause a new entity to be created and become active in the model. You might use a create action to cause a new animal to be born, create a new business, or establish a new loan. Choose "Kind: Create" on the properties tab of an action (Item 1 in the figure below). Next, specify what kind of entity will be created, and how many of those entities the action will create each time it is invoked. The description field is available for any notes or documentation you wish to include.
The important function of a create action is to specify the properties of each newly created entity. To facilitate this, the action has a reference to the entity to be created, named for the entity type with the prefix "new": "newchameleon", "newbusiness", or "newloan". Each create action automatically has a diagram, populated with surrogates of the attributes and stocks of the new entity. You can edit the "default initial value" field of these attributes and stocks to specify what values they will take on when a new entity is created (item 2 in the figure above).
Like all actions, create actions can also do anything command actions can do, so you can add attribute changes or stock transfers to the action and they will be carried out after the new entity is created and initialized.
Create actions initialize the created entity. Commands in create actions can affect parent, invoker, or parent's and invoker's references, just as in command actions.
|