Creating an Event Against an Asset
Creating your first Event
If you wish to begin tracking your Asset history, you need to create Events.
Asset Creation is the first Event. The more Events recorded against an Asset, the richer and deeper its history becomes.
Events track key moments of an Asset’s lifecycle; details of Who Did What When to an Asset.
To use the YAML Runner, please visit this link for installation instructions.
Create an Event.
When viewing your Asset, click the
To create your Event, use the action
--- steps: - step: action: EVENTS_CREATE description: Record event against My First Container. asset_label: assets/<asset-id> behaviour: RecordEvidence
asset_idmust match the Asset ID found in the details of your Asset. See Step 7 of Creating an Asset.
Add Event type and description.
You will see the following Event creation form:
Fill out metadata about your Event.
behaviour detail what class of event is being performed, by default this should always be
In the attributes section you should also add the required RKVST attributes
arc_display_type to represent
Event Description and
--- steps: - step: action: EVENTS_CREATE description: Record event against My First Container. asset_label: assets/<asset-id> operation: Record behaviour: RecordEvidence event_attributes: arc_description: Inspection Event arc_display_type: Inspection
- You may enter both Event and Asset attributes.
Event Attributes- Attributes specific to an Event, i.e. which device recorded the Event
Asset Attributes- Attributes of the Asset that may change as a result of the Event, i.e. overall weight of a container
Add Attribute button on each tab to add your key-value pairs. You may also add an attachment to your Event. In this case, we have attached a pdf document labeled
asset_attributes as key-value pairs. You may also add an attachment to your Event. In this case, we have attached a pdf document labeled
--- steps: - step: action: EVENTS_CREATE description: Record event against My First Container. asset_label: assets/<asset-id> operation: Record behaviour: RecordEvidence event_attributes: arc_description: Inspection Event arc_display_type: Inspection Cargo: Rare Metals asset_attributes: Weight: "1192kg" attachments: - filename: inspection_standards.pdf content_type: document/pdf display_name: Inspection Standards confirm: true
Here we see someone noted the type of cargo loaded in the Event, and has also recorded the total weight of the cargo using a newly defined
Every Event has an automatically generated
principal_accepted attribute that records when who performed what, as submitted to RKVST.
There is an option to append
principal_declared attributes on the Event. For example, if the Event happened offline or a third party reports it, creating a more detailed record.
PDFs or images can be recorded with an Event in the same way as an Asset. This is useful for storing associated material for posterity. For example, each
Inspection Event can store the PDF document of a specific standard for container inspection. This allows historical compliance checking of Events.
- Record your Event.
Once you have entered all data, click the
Record Event Button to add to your Asset.
Use the archivist_runner to run your YAML file!
$ archivist_runner \ -u https://app.rkvst.io \ --client-id <your-client-id> \ --client-secret <your-client-secret> \ my_first_container_inspection_event.yaml
- View your Event details.
Click the Event row to inspect the Event:
Here we see the details entered earlier and also a tab that will show both the Event Attributes and Asset Attributes:
EVENTS_LIST action can be used to view all Events, or filtered using attributes (
attrs) to view details of a specific Event.
To view all Events, use:
--- steps: - step: action: EVENTS_LIST description: List all events. print_response: true
To view the details of the Event you just created for My First Container, use:
--- steps: - step: action: EVENTS_LIST description: List inspection Events against the Asset 'My First Container'. print_response: true asset_label: assets/<asset-id> attrs: arc_display_type: Inspection asset_attrs: arc_display_type: Shipping Container
In the next section, we will learn about using Locations to group items together for both logical grouping and how to better manage access using ABAC and OBAC Policies.