Unbook time slot book entry

Event action – Abstract

Purpose: Releases the time slots booked by a scheduled time slot book entry.


images/download/attachments/177913173/image2021-9-1_15-52-20-version-1-modificationdate-1727094993601-api-v2.png

The event action Unbook time slot book entry expects an entity of the 'Time slot book entry' type as a reference object whose current booking is canceled or 'unbooked'.

Provided that the time slot book entry available as a reference object is currently considered to be 'booked', the booking process is similar to the interactive 'unbooking' of a time slot book entry in the context of the Booking overview:

  • All fields of the time slot book entry that were set in the course of the booking are deleted. Any reference to the user registered as the 'booker', the assigned loading point, or the occupied time slots will be lost.

  • Beforehand, the 'Unbook' event (see Time slot management tool (Events)) is triggered with the reference object as the input value. In this context, the booking data is still available so that, for example, the 'booker' can be specifically notified of the release.

Configuration

The time slot book entry to be 'unbooked' must exist as a reference object for the event action.

NOTE◄ If the reference object is an entity of a different type, nothing happens. No error message is given.

The event action does not use any parameters.

Example

By clicking on a ribbon button, the previously selected loading place can be 'deallocated' in an overview for Loading places.

Technically, all time slot book entries relating to the loading place in question and a booking period in the future must be unbooked for this purpose.

Configuration:

A Custom action event 'Deallocate loading place' is created for this purpose and then added as a Triggering event in an event handler that is configured as shown on the right:

  • The Validating rule uses a Check type to ensure that the input value is an entity of the 'Loading place' type.


  • Among the Actions on passed rule, a Search (Event action) is executed first, which uses a 'Search' to determine all relevant entities of the 'Time slot book entry' for which read access exists. The result of the search is written as a 'search value' to the variable futureBookings. More details about the search can be seen below.

  • If the Search (Event action) returns relevant matches, these are then available in the variable futureBookings as a list of time slot book entries. This list is accessed in a For each loop event action via a Variable value resolver.

  • Within the loop, there is therefore a different time slot book entry in each iteration as a reference object, with which the event action Unbook time slot book entry can be executed in order to unbook any future time slot book entry on a step-by-step basis.

images/download/attachments/177913173/image-2024-9-24_9-30-12-version-1-modificationdate-1727163012030-api-v2.png

The view on the right shows the Search (Event action) expanded, configured as follows:

  • Per Save result as, the variable name futureBookings is defined for returning the results.


  • The Mode 'List of results' specifies that the result should be a simple list of objects.

  • Selecting 'Search' for Search specifies that the result should be the same list of objects selected under Entity.

  • As Where is an AND operation of two constraints of the Field restriction type:

    • The first Field restriction requires a match between the return value of the Property projection for the bookedLoadingPlaceId field of the time slot book entry with the id field of the loading place that is present as a reference object.

    • The second Field restriction compares the value from the Property projection for the bookedRange field of the time slot book entry, with the return value of a Relative date range with time resolver that specifies the user-defined interval 'In the future' based on the system time.

NOTE◄ With this configuration, time slot book entries are unbooked, for which at least the end of the booked interval (bookedRange) still lies in the future.



images/download/attachments/177913173/image-2024-9-24_10-0-21-version-1-modificationdate-1727164820240-api-v2.png