Action
An Action is something a program does. Actions are used in the
then
and
but
clauses of an
example.
There are many kinds of Actions, described in the table below
Name | Description |
---|---|
Append | Add an item to a field that is a collection |
Arbitrary | A textually described arbitrary action |
Ask | Send a message to an entity, asynchronously process result |
Become | Instructs an entity change to a new handler |
Compound | Execute a group of nested actions |
Error | Produce an error with a message |
FunctionCall | Call a function to get a result |
Morph | Morph the state of an entity to a new state |
Publish | Publish a message to a pipe |
Reply | Provide the reply message to the entity that invoked a query |
Return | Return a value from a function |
Set | Set a field of the current state of an entity |
Tell | Send a message to an entity, do not wait for result |
Yield | Place a message on an entity’s event pipe |
Not all actions can be used in every situation. The table below show the exceptions. Examples occur in handlers and they in turn occur in contexts, entities, functions, projections, and states.
Name | Context | Entity | Function | Projection | State |
---|---|---|---|---|---|
Append | ⚠ | ✓ | ⚠ | ✓ | ✓ |
Arbitrary | ✓ | ✓ | ✓ | ✓ | ✓ |
Ask | ✓ | ✓ | ✓ | ✓ | ✓ |
Become | ⚠ | ✓ | ⚠ | ✓ | ✓ |
Compound | ✓ | ✓ | ✓ | ✓ | ✓ |
Error | ✓ | ✓ | ✓ | ✓ | ✓ |
FunctionCall | ✓ | ✓ | ✓ | ✓ | ✓ |
Morph | ⚠ | ✓ | ⚠ | ⚠ | ✓ |
Publish | ✓ | ✓ | ✓ | ✓ | ✓ |
Reply | ⚠ | ✓ | ⚠ | ✓ | ✓ |
Return | ✓ | ⚠ | ✓ | ✓ | ⚠ |
Set | ⚠ | ✓ | ⚠ | ✓ | ✓ |
Tell | ✓ | ✓ | ✓ | ✓ | ✓ |
Yield | ⚠ | ✓ | ✓ | ✓ | ✓ |
- Examples - in the
then
andbut
clauses
- Expressions - to