Elasticsearch Connector
Starting with 8.1.400.58, ORS enhances its Elasticsearch real-time reporting capabilities. Enhancments include a new Orchestration SCXML extension, elasticconnector. The purpose of elasticconnector scxml extension is to:
- Remove management of connectivity to Elasticsearch cluster from the SCXML strategy
- Provide simplified access to Elasticsearch APIs.
Interaction Interface Action Elements
ORS supports the following new Action elements that can be used with Composer's SCXML State block:
Name |
Required |
Type |
Def. value |
Valid values |
Description |
requestid |
False |
Location expression |
none |
Any valid location expression, which represents a string. |
This is the location for the request ID that is returned as part of this request. Standard attribute of all Orchestration actions. |
name |
True |
Value expression |
none |
Any value expression that returns a valid string. |
template name |
index |
True |
Value expression |
none |
Any value expression that returns a valid string. |
Elasticsearch index name (pattern). |
order |
False |
Value expression |
0 |
Any value expression that returns a valid integer. |
Elasticsearch template order. |
type |
True |
Value expression |
none |
Any value expression that returns a valid string. |
Elasticsearch type name. |
mapping |
True |
Value expression |
none |
Any valid ECMAScript object. |
Object that represents the whole body of Elasticsearch property of mappings.type in the mapping request. |
timeout |
False |
Value expression |
0 |
Any value expression that returns a valid integer. |
The integer returned must be interpreted as a time interval in milliseconds. This interval begins when action is executed. A failed and timed out fetch returns the error.elasticconnector.createindex event. |
Name |
Required |
Type |
Def. value |
Valid values |
Description |
requestid |
false |
Location expression |
none |
Any valid location expression which represents a string. |
This is the location for the request ID that is returned as part of this request. Standard attribute of all Orchestration actions. |
id |
false |
Value expression |
none |
Any value expression that returns a valid string |
Elasticsearch document within an index. If not specified, ID will be automatically generated. Explicit ID assignment and automatic ID generation cannot be mixed within same index. |
index |
true |
Value expression |
none |
Any value expression that returns a valid string. |
Elasticsearch index name |
type |
true |
Value expression |
none |
Any value expression that returns a valid string. |
Elasticsearch type name |
request |
true |
Value expression |
none |
Any valid ECMAScript object |
Object that represents the whole body of an Elasticsearch create document API request. |
bulk |
false |
Boolean expression |
false |
true,false |
If true, Elasticsearch request will be just added to the ORS bulk request buffer and the elasticconnector.createdoc.done event will be raised immediately. If false, a request to create document will be sent to Elasticsearch and the corresponding event and elasticconnector.createdoc.done or error.elasticconnector.createdoc will be raised after response from Elasticsearch. |
timeout |
false |
Value expression |
0 |
Any value expression that returns a valid integer. |
The integer returned must be interpreted as a time interval in milliseconds. This interval begins when action is executed. A failed and timed out fetch returns the error.elasticconnector.createdoc event. |
Name |
Required |
Type |
Def. value |
Valid values |
Description |
requestid |
false |
Location expression |
none |
Any valid location expression which represents a string. |
This is the location for the request ID that is returned as part of this request. Standard attribute of all Orchestration actions. |
id |
true |
Value expression |
none |
Any value expression that returns a valid string. |
Elasticsearch document ID within an index. |
index |
false |
Value expression |
Current session daily index. |
Any value expression that returns a valid string. |
Elasticsearch index name. If not specified, current session daily index will be used. Also, in this case, the type attribute must be not specified, or the action will fail. |
type |
false |
Value expression |
“session” |
Any value expression that returns a valid string. |
Elasticsearch type name. If not specified, the “index” attribute should be not specified as well and “session” type will be used. |
request |
true |
Value expression |
none |
Any valid ECMAScript object |
Object that represents the whole body of an Elasticsearch update document API request. |
bulk |
false |
Boolean expression |
true |
true,false |
If true, Elasticsearch request will be just added to ORS bulk request buffer and elasticconnector.updatedoc.done event will be raised immediately. If false, request to update document will be sent to Elasticsearch and corresponding event elasticconnector.updatedoc.done or error.elasticconnector.updatedoc will be raised after response from Elasticsearch. |
timeout |
false |
Value expression |
0 |
Any value expression that returns a valid integer. |
The integer returned is interpreted as a time interval in milliseconds. This interval begins when the action is executed. A failed and timed out fetch returns the error.elasticconnector.updatedoc event. |
Name |
Required |
Type |
Def. value |
Valid values |
Description |
requestid |
false |
Location expression |
none |
Any valid location expression which represents a string. |
This is the location for the request ID that is returned as part of this request. Standard attribute of all Orchestration actions. |
id |
true |
Value expression |
none |
Any value expression that returns a valid string. |
Elasticsearch document ID within an index. |
index |
true |
Value expression |
none |
Any value expression that returns a valid string. |
Elasticsearch index name |
type |
true |
Value expression |
none |
Any value expression that returns a valid string. |
Elasticsearch type name |
bulk |
true |
Boolean expression |
true |
true,false |
If true, Elasticsearch request will be added to ORS bulk request buffer and elasticconnector.deletedoc.done will be raised immediately. If false, request to delete document will be sent to Elasticsearch and corresponding elasticconnector.deletedoc.done or error.elasticconnector.deletedoc event will be raised after response from Elasticsearch. |
timeout |
false |
Value expression |
0 |
Any value expression that returns a valid integer. |
The integer returned is interpreted as a time interval in milliseconds. This interval begins when the action is executed. A failed and timed out fetch returns the error.elasticconnector.deletedoc event. |
Events
The following Events are supported:
}
Name |
Attributes |
Description |
elasticconnector.createindextemplate.done |
This event indicates the success of the request. | |
requestid |
This is the ID of the request. | |
error.elasticconnector. createindextemplate |
This indicates that an error occurred while trying to perform the createindextemplate request. | |
requestid |
This is the ID associated with the request. | |
error |
This is the type of error that occurred. The following is a specific error code:
protocol.errorcode - This represents the protocol-specific errors that occur when the attempting the request. | |
description |
This is a more detailed description of the error | |
elasticconnector.createdoc.done |
This event indicates the success of the request. | |
id |
This is ID of created document. | |
requestid |
This is the ID of the request. | |
error.elasticconnector.createdoc |
This indicates that an error occurred while trying to perform the createdoc request. | |
requestid |
This is the ID associated with the request. | |
error |
This is the type of error that occurred. The following is a specific error code:
protocol.errorcode - This represents the protocol-specific errors that occur when the attempting the request. | |
description |
This is a more detailed description of the error | |
elasticconnector.updatedoc.done |
This event indicates the success of the request. | |
Requestid |
This is the ID of the request. | |
error.elasticconnector.updatedoc |
This indicates that an error occurred while trying to perform the updatedoc request. | |
Requestid |
This is the ID associated with the request. | |
Error |
This is the type of error that occurred. The following is a specific error code:
protocol.errorcode - This represents the protocol-specific errors that occur when the attempting the request. | |
Description |
This is a more detailed description of the error | |
elasticconnector.deletedoc.done |
This event indicates the success of the request. | |
Requestid |
This is the ID of the request. | |
error.elasticconnector.deletedoc |
This indicates that an error occurred while trying to perform the deletedoc request. | |
Requestid |
This is the ID associated with the request. | |
Error |
This is the type of error that occurred. The following is a specific error code:
protocol.errorcode - This represents the protocol-specific errors that occur when the attempting the request. | |
Description |
This is a more detailed description of the error |
