First model: custody transfer
This exercise models the transfer of a load between two organizations. The goal is to keep the unity of the transfer and distinguish the roles of who delivers and who receives.
Examine the case
A transfer involves a load, a transferring organization, a receiving organization, a place and a moment. These participants belong to the same domain event.
Open exemplos/01-custodia/modelo.fsl in the package. The module declares the types of the participants and the TransferenciaCustodia relation, with five roles.
Verify the formation
In the publication package directory, use the executable of your version:
formasl check exemplos/01-custodia/modelo.fsl
Examine the formation output. If there is a diagnostic, locate the declaration and the category pointed out. The diagnostics guide shows how to distinguish missing source, incorrect reference and formation incompatibility.
Work with the roles
Compare the questions “which loads did the organization deliver?” and “which loads did the organization receive?”. Both use the same relation, selecting different roles.
Now consider two transfers of the same load at different moments. The identity of each instance must make it possible to relate its participants without merging the events.
Add situated information
Describe the transferring organization’s claim about the delivery and the receiving organization’s confirmation. Identify the issuers and the time conditions. The two Claims can refer to the same transfer while keeping their acts of assertion.
Also define which observations or documents can ground an evaluation. This preparation lets you choose the contract of the application that will query or judge the information.
Completion criterion
The model is understood when you can identify the unity of the relation, the role of each participant, the difference between two transfers and the distinction between the event and the claims about it. The next stage is to declare an application over these structures and verify its result under the interface of the baseline in use.