Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

draw.io Diagram
bordertrue
diagramNameHTTPParticipant
simpleViewerfalse
width
linksauto
tbstyletop
lboxtrue
diagramWidth760
revision1011

The HTTP participant runs a Control Loop Element to handle the REST dialogues for a particular application domain. The REST dialogues are whatever REST calls that are required to implement the functionality for the application domain.

...

A Configuration Entity describes a concept that is managed by the HTTP participant. A Configuration Entity can be created, Read, Updated, and Deleted (CRUD). The user defines the Configuration Entities that it wants its HTTP Control Loop Element to manage and provides a sequence of parameterized REST commands to Create, Read, Update, and Delete each Configuration Entity.

When a control loop is initialized, the HTTP participant starts a HTTP Control Loop element for the control loop. It reads the configuration information sent from the Control Loop Runtime runs a HTTP client to talk to the REST endpoint that is receiving the REST requests. A HTTP participant can simultaneously manage HTTP Control Loop Elements towards multiple REST endpoints, as shown in the diagram above where the HTTP participant is running two HTTP Control Loop Elements, one for Control Loop A and one for Control Loop B.

Configuring a Control Loop Element on the HTTP participant for a Control Loop

The user configures the following properties in the CLAMP GUI for the HTTP participant:

PropertyTypeDescription
baseUrlURLA well formed URL pointing at the REST server that is processing the REST requests
httpHeadersmapA map of <String, String> defining the HTTP headers to send on all REST calls
configurationEntitiiesmapA map of <String, ConfigurationEntity> describing the names and definitions of configuration entities that are managed by this HTTP Control Loop Element

The ConfigurationEntity type is described in the following table:

FieldTypeDescription
IDToscaConceptIdentifierThe name and version of the Configuration Entity
createRestSequence
restSequence
List<RestSequence>
List<RestRequest>A list of REST requests to give
to create the Configuration EntityreadRestSequenceList<RestSequence>A list of REST requests to give to read the Configuration EntityupdateRestSequenceList<RestSequence>A list of REST requests to give to update
manage the Configuration Entity
deleteRestSequenceList<RestSequence>A list of REST requests to give to delete the Configuration Entity

The RestSequence The RestRequest type is described in the following table:

FieldTypeDescription
httpMethodHttpMethod

An enum for the HTTP method {GET, PUT, POST, DELETE

pathStringThe path of the REST endopint relative to the baseUrl
bodyStringThe body of the request for POST and PUT methods
expectedResponseHttpStatusThe expected HTTP response code fo the REST request