Create incident

Event action – Abstract

Purpose: Creates an entity of the (SCEM) event type with the characteristics optionally definable by configuration. If the Incident type parameter specifies an Incident type, the event action triggers the specific event for that Incident type with the (SCEM) event entity as the input value. The (SCEM) event entity may contain a list of references to other entities called Affected Entities.

The event action Create incident creates an entity of type '(SCEM) incident' (see SCEM Incident) with the optionally definable features per configuration.

If an Incident type is specified in the Incident type parameter, the event action triggers the specific event (see Incident type (Events)) for this Incident type with the incident entity as input value.

images/download/attachments/73611126/image2021-7-9_13-39-11-version-1-modificationdate-1625830753288-api-v2.png

Configuration

  • The optional Incident type parameter defines an assignment to the corresponding 'Incident type' field (incidentType) of the created incident based on the dynamic enumeration Incident type.

  • The optional Severity parameter defines an assignment to the 'Severity' field (incidentType) of the created incident based on the dynamic enumeration Incident severity.

  • The optional State parameter defines an assignment to the 'State' field (incidentType) of the created incident based on the dynamic enumeration Incident status.

  • The optional Source parameter defines an assignment to the 'Source' field (incidentSource) of the created incident based on the dynamic enumeration Incident source.

  • The optional Association criteria parameter allows multiple selections of Association criteria for the created incident.

  • A Repeatable element optionally allows assignments that define 'Affected entities' (affectedEntities) for the new incident. Via the symbols images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/add.svg and images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/forbidden.svg such assignments can be added or deleted.

images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/warning.svg CAUTIONimages/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/warning.svg 'Affected Entities' are created successfully only if the event action is performed in the context of an entity. However, this entity does not have to be assigned as an 'Affected Entity'. If the event action Create incident is executed in the context of an event handling in which no entity exists as a reference object, then an entity must be defined as a reference object via the event action Ausführen mit, so that the new 'Affected Entities' event is actually assigned.

Example

Impending delays for the delivery of Shipments are reported via a special portal. For this purpose, the portal lists Shipments created in Lobster Data Platform / Orchestration with relevant work states for selection. If a significant delay is announced for a shipment in the list, a behaviour triggers an Custom action event, which passes a client object with various detailed data (including the internal ID of the shipment in a shipmentId field) via the variable formData. An SCEM incident is then triggered via event handling in order to log the incident and, if necessary, trigger further measures.

Configuration:

The event action Create incident is configured within the event handling as shown to the right:

  • Unlike a data input form, the portal does not provide an entity as an input value, but instead passes a client object with the form data into the Variable formData. In the shipmentId field, the internal ID (id) of a shipment is passed as a long value. This value can be 'converted' into a shipment by concatenation with an Input object (type safe) value resolver. This is done here in the Object Resolver (not expanded in the image) of an Ausführen mit event action. This creates the necessary context for an entity for the event action Create incident.

  • The configuration for the event action Create incident assigns static values to all parameters, to declare the Incident type as 'Delay' with the Severity as 'High', the State 'New' and the Source specified as 'Triggered'. The Association criteria qualifies the relevance of the incident by assigning an already configured Association criteria.

  • Below, value reolvers define three 'Affected Entities' to which the SCEM incident should apply:

    • Firstly, reference should be made to the company account of the company specified as the 'Principal' in the shipment.

    • Additionally, the User of session who triggered the default message should be specified.

    • Furthermore, the shipment itself is also referenced. An Input object (type safe) value resolver is used here for clarification purposes. Since the shipment is the current reference object, the Variable entity or an Object property value resolver (without selection of a field) is used instead.

NOTE◄ For the affected objects, only a combination of ID (id) and type (entityType) is saved in the incident. The return value from the value resolver for the User of session is sufficient for this reference, which does not contain the complete user account.

images/download/attachments/73611126/image2021-7-9_13-40-49-version-1-modificationdate-1625830851560-api-v2.png

Any measures that go beyond just logging the incident can be regulated in subsequent actions within the same event handling. However, it is also possible to define event handling for the Incident type 'Delay' (see Incident type (Events)). The event action Create incident then triggers these automatically. The incident object and the references to the 'Affected Entities' are then available there as the data context.

The configuration for an event handling (right) shows an example for the processing of incidents created for 'Delay':

  • As the Triggering event, the creation of an incident object with the Incident type 'Delay' (see Incident type (Events)) is selected.

  • The Validating rule uses Typprüfung to ensure that an incident object is present as an input value. Subsequently, the object property 'Severity' (incidentSeverity) is checked. The following Actions on passed rule should only be performed here if the 'Delay' has an incident severity of 'High' or Medium'.


The Actions on passed rule accesses the 'Affected entities' of the shipment type in the context of which a E-Mail is triggered.

  • The shipment object is identified by Ausführen mit in the list of 'Affected objects' (in the affectedEntities field). This is made possible by the Rule list resolver, which evaluates the 'Entity type' (entityId) field per Entity property rule. A value resolver for the class is used as a comparison value, which is based on the 'Shipment' and returns its full name as text.

  • Assuming that the list of affected entities contains precisely one shipment, the Resolve all as list option is not set, so that the first hit in the concatenation is passed on. For this, the Object property 'Object ID' (entityType) is resolved below. This value is passed on to the Input object (type safe) value resolver, which – if present – returns the shipment object.

  • With the shipment as a reference object, the E-Mail is executed in the action block of Ausführen mit.

NOTE◄ If data from the incident, which is not available in the context of the shipment, is used in the E-Mail, the incident variable can be used to access it. This variable has been arbitrarily named in the parameter Save incident in variable.

images/download/attachments/73611126/image2021-7-9_13-42-32-version-1-modificationdate-1625830954587-api-v2.png

images/download/attachments/73611126/image2021-7-9_13-43-55-version-1-modificationdate-1625831037358-api-v2.png