Service Data Provider 2

ServiceDataProvider 2 (SDP2) is a stateless DataProvider implementation that fetches data from a REST service endpoint, and that can be used with an instance factory variable.

Note:

SDP2 was introduced to help simplify the task for users who want to use JET classes, or their own custom classes, with a Visual Builder variable. SDP2 is based on the InstanceFactory type, which allows you to plug your type into a variable without writing any extra JavaScript code. For details on instance factory types and variables, see InstanceFactory Types.

The legacy Service Data Provider is based on an extended type, and does not support InstanceFactory types. For details, see Service Data Provider.

A variable that uses this built-in type can be directly bound to collection components like listView, table, combobox/select, chart and other JET components that accept a data provider. It can also be referenced by another instance factory variable that uses a JET type, like a ojs/ojlistdataproviderview, which in turn can be bound to components.

SDP2 can be used to fetch collections of data either 'implicitly' using the configured endpoint, or 'externally' by delegating to an external action chain.

Additionally, when SDP2 uses an Oracle Cloud Applications service, the built-in Business object REST API transforms associated with the service automatically enable capabilities such as sorting, filtering, selecting fields, and pagination of the data. When used with endpoints not part of an Oracle Cloud Applications service, it's important for service authors to provide a custom transforms implementation that supports these capabilities. For details refer to the description of the transforms property in Service Data Provider2 Properties and to its associated sections on request and response transforms.

A variable of this type can be defined like this:

"sdpVar": {
  "type": "vb/ServiceDataProvider2",
  "constructorParams": [
    {
      "endpoint": "demo-data-service/getIncidents",
      "keyAttributes": "id",
      "itemsPath": "result",
      "uriParameters": "{{ $variables.technicianURIParams }}"
    }
  ]
},

Note:

When any of the properties in the constructorParams change, a new instance of the ServiceDataProvider2 is created.