Server extensibility scenario examples - SmartPlant Foundation - IM Update 42 - Help - Hexagon

SmartPlant Foundation Extensibility

Language
English
Product
SmartPlant Foundation
Search by Category
Help
SmartPlant Foundation / SDx Version
10

Server extensibility enables external applications to perform tasks based upon events happening within the SmartPlant Foundation system. The following are examples of tasks based upon events:

Auditing

Using the event payload, you can monitor what actions users are performing, such as create or delete.

How

When an event is received, the EventType property of the event payload is checked for the action of interest, such as OnCreated. If there is a match then the user value and object data is recorded.

Backup

You can listen for when a file is created and then upload a duplicate of the new file as a backup to another file store.

How

When an event is received, it checks for the Types array property for ISPFFolder and the EventType is OnCreated to copy to the backup file store.

Metrics

You can capture the events so that you can see how often certain actions are being performed.

How

Store events as they are received into a database. This allows you to make queries and reports that will give you insights in how your SmartPlant Foundation system is being used.

Multiple Event Subscribers

You can have multiple event subscribers depending on whether you have setup your broker with either:

  • A topic (multicast), which gives each subscriber a copy of the event

  • A queue (anycast), which operates on a first come first served basis

Notifications

You can send an email every time a type of object is created.

How

Inspect the Types and EventType property of the event payload as the event is received. If the properties match, then it sends an email.

Overriding Default Server Behaviour

Extensibility allows you to send OData requests back to the SmartPlant Foundation system in reaction to events to change the data of an object.

How

Listen for the appropriate event. For example, the EventType is OnCreated and the Type is ISPFDesignDocVersion which sends an PATCH OData request back to the SmartPlant Foundation system to update the object that was created.

Synchronisation

If you have the same file in multiple locations, such as SmartPlant Foundation, you can listen to the file update event and automatically update the file accordingly.

How

Look for DocVersionType and OnUpdated EventType in the event payloads. When this event is received, it makes a OData request to SmartPlant Foundation system to locate and update the file using the relevant DocVersion client API.

Workflow

You can set up custom workflow process steps to perform actions when that step of the workflow is reached.

How

When your custom process step is reached within your workflow, an event is sent with the name of the custom workflow process step used as the Types value. When you receive these events, you can react and perform the tasks as required.