Realtime


Packaged class

Namespace: overcast

The Realtime class houses nested classes related to Real-time Integration Scenarios.
 

Realtime.ApexType

Packaged enum

Namespace: overcast

Specifies the Apex type for a field.

Values

X is appended to the names because of naming restrings in Apex


Realtime.Direction

Packaged enum

Namespace: overcast

Specifies the dataflow direction for a type or field relative to the backend system.

Values

Notes

Direction in regards to TypeInfo

Direction in regards to FieldInfo

 

Realtime.StructureType

Packaged enum

Namespace: overcast

Specifies the possible structure types for a backend system API type.

Values

Notes

STRUCTURE indicates that the API type is a single record/object of data, not a collection.

TABLE indicates that the API type will return multiple records of data, a collection.

 

Realtime.Scenario

Packaged interface

Namespace: overcast

The Scenario interface is the interface that all Real-time Integration Scenario Apex classes implement. It is inherited by sub-interfaces to provide more specific operations according to the API type. The Scenario interface is used in generated code. It should not be used to create a class manually.

Methods

 

get(typeName)

Gets the data for the specified structure/type. Only used when running the Scenario Apex class from an Overcast Component. Do not use when calling the Scenario Apex class directly.

Signature

Object get(String typeName)

Parameters

typeName

Type: String

The name of the type to get. This is used in conjunction with getMetadata() and looping over the TypeInfos.

Return Value

Type: Object

The data for the specified structure/type. Must be cast to the expected type. If the type is a STRUCTURE, then cast it to Map<String, Object>. If the type is a TABLE, then cast it to a List<Object>, where each entry is a Map<string, Object>.

 

getMetadata()

Gets the metadata for the Scenario.

Signature

Map<String, TypeInfo> getMetadata()

Return Value

Type: Map<String, TypeInfo>

 

getTopTypeName()

Gets the name of the top type/structure. The top type is the type that is the top of the hierarchy of types for the API. For example, for an OData function call, there is the function name, parameters and response types. The top type in this example would hold the function name, fields for the parameters and a field for the response.

Signature

String getTopTypeName()

Return Value

Type: String

 

loadAsyncResponse(responseBody)

Loads response data into the current instance. This is only used when the Real-time Integration Scenario is run using a Continuation.

Signature

void loadAsyncResponse(String responseBody)

Parameters

responseBody

Type: String

The response from the Continuation.

Return Value

Type: void

 

serialize()

Serializes the Scenario instance into a JSON document.

Signature

String serialize()

Return Value

Type: String

 

set(typeName, body)

Sets the data for the specified structure/type. Only used when running the Scenario Apex class from an Overcast Component. Do not use when calling the Scenario Apex class directly.

Signature

void set(String typeName, Object body)

Parameters

typeName

Type: String

The name of the type.

body

Type: Object

The data to set for the type.

Return Value

Type: void

 

Realtime.ScenarioExtension

Packaged virtual class

Namespace: overcast

The ScenarioExtension class is a base class that is used as an extensible way to provide improvements to the Scenario interface without producing a new interface for each change. This class extended by all Real-time Integration Scenario Apex classes.

Methods

 

getBackendMessage()

getBackendMessage() is optionally implemented by Real-time Integration Scenario Apex classes to provide access to response data from a non-query function call. This is currently implemented in the OpenAPI connection type only.

Signature

virtual String getBackendMessage()

Return Value

Type: String

Properties

ovcProperties

Type: overcast.Realtime.OvercastProperties

A property for Overcast service to return application-specific data.

Realtime.OvercastProperties

Packaged class

Namespace: overcast

A class for Overcast service to return application-specific data.

Properties

fileLink

Type: overcast.Realtime.FileLink

SAP Document Viewer / SAP Attachments data for loading a document.

options

Type: Map<String,String>

General purpose application-specific key/value options.

Realtime.FileLink

Packaged interface

Namespace: overcast

SAP Document Viewer / SAP Attachments data for loading a document.

Properties

url

Type:String

A URL that the SAP Document Viewer / SAP Attachments application uses to access the requested SAP document.

Realtime.Runnable

Packaged interface

Namespace: overcast

Extends Realtime.Scenario

The Runnable interface is implemented by Real-time Integration Scenario Apex classes for SAP RFC Integration Scenarios.

Methods

 

run()

Runs the Integration Scenario.

Signature

overcast.Realtime.Runnable run()

Return Value

Type: overcast.Realtime.Runnable

 

run(logger, namedCredential)

Runs the Integration Scenario specifying a Logger and Named Credential.

Signature

overcast.Realtime.Runnable run(Logger logger, String namedCredential)

Return Value

Type: overcast.Realtime.Runnable

 

runAsync(logger, namedCredential, con)

Runs the Integration Scenario asynchronously using a Continuation, specifying a Logger and Named Credential.

Signature

String runAsync(overcast.Logger logger, String namedCredential, Continuation con)

Return Value

Type: String

 

Realtime.Queryable

Packaged interface

Namespace: overcast

Extends Realtime.Scenario

The Queryable interface is implemented by Real-time Integration Scenario Apex classes for Integration Scenarios that integrate with queryable entities like database tables, SAP tables, or OData APIs, etc.

Methods

 

runQuery()

Runs the Integration Scenario to query the backend system API.

When calling this method from within an Overcast Component plugin class, the response data is accessed from the get(typeName) method. The the data properties in the class do not get populated when executed in the Component Framework context.

Signature

overcast.Realtime.Queryable runQuery()

Return Value

Type: overcast.Realtime.Queryable

 

runQuery(logger, namedCredential)

Runs the Integration Scenario to query the backend system API, specifying a Logger and Named Credential.

Use this method when you want to control when to save the logs, particularly, when you need to make multiple Scenario calls. Salesforce platform does not support making an HTTP callout after saving records to the database, so we need to make all our Scenario calls before saving any logs and data.

When calling this method from within an Overcast Component plugin class, the response data is accessed from the get(typeName) method. The data properties in the class do not get populated when executed in the Component Framework context.

Signature

overcast.Realtime.Queryable runQuery(overcast.Logger logger, String namedCredential)

Parameters

logger

Type: overcast.Logger

An instance of the Overcast Logger class.

namedCredential

Type: String

The name of the Named Credential to use for this Scenario call. Configuration guide.

Return Value

Type: overcast.Realtime.Queryable

 

runQueryAsync(logger, namedCredential, con)

Runs the Integration Scenario asynchronously to query the backend system API, using a Continuation, specifying a Logger and Named Credential.

Signature

String runQueryAsync(overcast.Logger logger, String namedCredential, Continuation con)

Parameters

logger

Type: overcast.Logger

An instance of the Overcast Logger class.

namedCredential

Type: String

The name of the Named Credential to use for this Scenario call. Configuration guide.

con

Type: System.Continuation

Salesforce System.Continuation. Used in conjunction with loadAsyncResponse(responseBody).

Return Value

Type: String

 

Realtime.Updatable

Packaged interface

Namespace: overcast

Extends Realtime.Queryable

The Updatable interface is implemented by Real-time Integration Scenario Apex classes for Integration Scenarios that integrate with updatable entities like database tables or OData APIs, etc.

Methods

 

runInsert()

Runs the Integration Scenario to perform an insert on the backend system entity.

Signature

overcast.Realtime.Updatable runInsert()

Return Value

Type: overcast.Realtime.Updatable

 

runInsert(logger, namedCredential)

Runs the Integration Scenario to perform an insert on the backend system entity, specifying a Logger and Named Credential.

Signature

overcast.Realtime.Updatable runInsert(Logger logger, String namedCredential)

Return Value

Type: overcast.Realtime.Updatable

 

runInsertAsync(logger, namedCredential, con)

Runs the Integration Scenario to perform an insert on the backend system entity, using a Continuation, specifying a Logger and Named Credential.

Signature

String runInsertAsync(overcast.Logger logger, String namedCredential, Continuation con)

Return Value

Type: String

 

runUpdate()

Runs the Integration Scenario to perform an update on the backend system entity.

Signature

overcast.Realtime.Updatable runUpdate()

Return Value

Type: overcast.Realtime.Updatable

 

runUpdate(logger, namedCredential)

Runs the Integration Scenario to perform an update on the backend system entity, specifying a Logger and Named Credential.

Signature

overcast.Realtime.Updatable runUpdate(Logger logger, String namedCredential)

Return Value

Type: overcast.Realtime.Updatable

 

runUpdateAsync(logger, namedCredential, con)

Runs the Integration Scenario to perform an update on the backend system entity, using a Continuation, specifying a Logger and Named Credential.

Signature

String runUpdateAsync(overcast.Logger logger, String namedCredential, Continuation con)

Return Value

Type: String

 

runDelete()

Runs the Integration Scenario to perform a delete on the backend system entity.

Signature

overcast.Realtime.Updatable runDelete()

Return Value

Type: overcast.Realtime.Updatable

 

runDelete(logger, namedCredential)

Runs the Integration Scenario to perform a delete on the backend system entity, specifying a Logger and Named Credential.

Signature

overcast.Realtime.Updatable runDelete(Logger logger, String namedCredential)

Return Value

Type: overcast.Realtime.Updatable

 

runDeleteAsync(logger, namedCredential, con)

Runs the Integration Scenario to perform a delete on the backend system entity, using a Continuation, specifying a Logger and Named Credential.

Signature

String runDeleteAsync(overcast.Logger logger, String namedCredential, Continuation con)

Return Value

Type: String

 

 

Realtime.Restful

Packaged interface

Namespace: overcast

Extends Realtime.Scenario

The Restful interface is implemented by Real-time Integration Scenario Apex classes for Integration Scenarios that integrate with REST APIs (OpenAPI Connection type).

Methods

 

getApiMetadata()

Gets the API metadata of the Integration Scenario.

Signature

Map<String, overcast.Realtime.ApiMetadata> getApiMetadata()

Return Value

Type: Map<String, overcast.Realtime.ApiMetadata>

 

getStatusCode()

Gets the response status code when called on a Restful response instance.

Signature

Integer getStatusCode()

Return Value

Type: Integer

 

run()

Runs the Integration Scenario.

Signature

overcast.Realtime.Restful run()

Return Value

Type: overcast.Realtime.Restful

 

run(logger, namedCredential)

Runs the Integration Scenario specifying a Logger and Named Credential.

Signature

overcast.Realtime.Restful run(Logger logger, String namedCredential)

Return Value

Type: overcast.Realtime.Restful

 

runAsync(logger, namedCredential, con)

Runs the Integration Scenario asynchronously using a Continuation, specifying a Logger and Named Credential.

Signature

String runAsync(overcast.Logger logger, String namedCredential, Continuation con)

Return Value

Type: String


setOperationName(operationName)

Sets the backend API operation name to call. The operation is specific to the API and not the Overcast operations, Read, Create, etc.

Signature

void setOperationName(String operationName)

Return Value

Type: void

 

Realtime.ApiMetadata

Packaged class

Namespace: overcast

Realtime.ApiMetadata is a data structure for the metadata of an API in a Realtime.Restful Integration Scenario Apex class.

Constructors

 

ApiMetadata(operationName, requestMetadata, responseMetadata)

Creates a new ApiMetadata instance.

Signature

ApiMetadata(String operationName, Map<String, TypeInfo> requestMetadata, Map<Integer, Map<String, TypeInfo>> responseMetadata)

Parameters

operationName

Type: String

The operation name.

requestMetadata

Type: Map<String, TypeInfo>

The metadata for the request.

responseMetadata

Type: Map<Integer, Map<String, TypeInfo>>

The metadata for the response.

Properties

operationName

Type: String

Gets or sets the operation name.

requestMetadata

Type: Map<String, TypeInfo>

Gets or sets the metadata for the request.

responseMetadata

Type: Map<Integer, Map<String, TypeInfo>>

Gets or sets the metadata for the response.

 

Realtime.ApiResponse

Packaged virtual class

Namespace: overcast

Realtime.ApiResponse is a data structure for the Realtime.Restful response data.

Properties

backendMessage

Type: String

A response or status message output but the API.

body

Type: Object

The full response data.

statusCode

Type: Integer

The HTTP status code.