Go to Workflow API for a detailed view of the different requests.
Easy Heading Free | ||||
---|---|---|---|---|
|
The following steps will create a new workflow and then add a single Elasticsearch Publisher (In Progress) to the onPublish event.
Request
Code Block | |||||
---|---|---|---|---|---|
| |||||
Saga_json | |||||
| |||||
{ "description": "ES Workflow" } |
Response
Code Block | ||
---|---|---|
| ||
{ "workflow": [ { "id": "9bdf3efb-c266-46ac-ab59-eb8eda87d9e9", "type": "connector", "description": "Test Workflow", "checksum": "e143d076aab367368474087d6ebf1d90377405b7c8ab227f5cb835380e6ccc4f", "templates": { "template": [ { "id": "add-static-acl", "type": "script", "description": "Add static ACLs", "ruleDescription": "Static ACL: Domain:\"${domain}\" Name:\"${name}\" Type:\"${entity}\" Access:\"${access}\"", ... }, ... ] }, "events": { "event": [ { "id": "onScan" }, { "id": "onAddUpdate" }, { "id": "onDelete" }, { "id": "onPublish" }, { "id": "onError" }, { "id": "onIdentity" }, { "id": "onIdentityError" } ] } } ] } |
Note |
---|
Notice that by default, when a new Workflow is created, all templates and events are added to it, so they can be used to create a different set of rules. |
Request
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "type": "application", "description": "Elastic", "config": "com.accenture.aspire:aspire-elasticsearch-publisher-source", "appType": "elasticsearch-publisher", "appName": "Elasticsearch Publisher", "properties": { "elasticNoUrl": false, "elasticUrl": "http://localhost:9200/_bulk", "elasticIndex": "index2", "authType": "none", "transformType": "JSON", "transformFile": "${component.home}/config/groovy/transform.groovy", "processClear": true, "deleteOnClear" : true, "connectionTimeout": 15000, "readTimeout": 15000, "maxRetries": 1, "retryDelay": 15000, "maxRetryDelay": 200000, "retryDelayMultiplier": 1, "maxResults": 1000000, "pageSize": 10000, "idField": "hits._id", "urlField": "hits.fields.url", "timestampField": "hits.fields.submitTime", "debug": false } } |
Response
Code Block | ||
---|---|---|
| ||
{
"workflow": {
"id": "9bdf3efb-c266-46ac-ab59-eb8eda87d9e9",
"type": "connector",
"description": "Test Workflow",
"checksum": "91a18e936fd07149bb29280a217df2be21f08f25f279884fa2aad88b92b53796",
"rule": {
"type": "application",
"_type": "publisher",
"description": "ES Publisher",
"config": "com.accenture.aspire:aspire-elasticsearch-publisher-source",
"appType": "elasticsearch-publisher",
"appName": "Elasticsearch_Publisher",
"properties": {
"elasticNoUrl": true,
"elasticHost": "localhost",
"elasticPort": 9200,
"elasticIndex": "index1",
"authType": "none",
"transformType": "JSON",
"transformFile": "${component.home}/config/groovy/transform.groovy",
"processClear": false,
"idleConnectionTimeout": 3600000,
"maxConnections": 100,
"maxConnectionsPerRoute": 10,
"connectionTimeout": 15000,
"socketTimeout": 15000,
"useThrottling": false,
"maxRetries": 3,
"retryWaitTime": 5000,
"batchSize": 50,
"simultaneousBatches": 5,
"batchTimeout": 5000,
"maxResults": 1000000,
"pageSize": 10000,
"idField": "hits._id",
"urlField": "hits.fields.url",
"timestampField": "hits.fields.submitTime",
"debug": false
},
"id": "f91f8807-5081-450f-a210-d1f5db349f5d"
}
}
} |
Request
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"parentId": "",
"orderId": 0,
"ruleId": "f91f8807-5081-450f-a210-d1f5db349f5d",
"enabled": true
} |
Response
Code Block | ||||
---|---|---|---|---|
| ||||
{
"workflow": {
"id": "9bdf3efb-c266-46ac-ab59-eb8eda87d9e9",
"type": "connector",
"description": "Test Workflow",
"checksum": "f8bd68229db9ac05fb6bd98a2ef37bef696b4e6ece676a7b2dcbd093014fae14",
"event": {
"id": "onPublish",
"itemId": "c80071e0-5b87-4578-b17c-63c7d7cea336",
"rule": {
"type": "application",
"_type": "publisher",
"description": "ES Publisher",
"config": "com.accenture.aspire:aspire-elasticsearch-publisher-source",
"appType": "elasticsearch-publisher",
"appName": "Elasticsearch_Publisher",
"properties": {
"elasticNoUrl": true,
"elasticHost": "localhost",
"elasticPort": 9200,
"elasticIndex": "index1",
"authType": "none",
"transformType": "JSON",
"transformFile": "${component.home}/config/groovy/transform.groovy",
"processClear": false,
"idleConnectionTimeout": 3600000,
"maxConnections": 100,
"maxConnectionsPerRoute": 10,
"connectionTimeout": 15000,
"socketTimeout": 15000,
"useThrottling": false,
"maxRetries": 3,
"retryWaitTime": 5000,
"batchSize": 50,
"simultaneousBatches": 5,
"batchTimeout": 5000,
"maxResults": 1000000,
"pageSize": 10000,
"idField": "hits._id",
"urlField": "hits.fields.url",
"timestampField": "hits.fields.submitTime",
"debug": false
},
"id": "f91f8807-5081-450f-a210-d1f5db349f5d"
}
}
}
} |