Orchestration & Audit Events
Author:
Holger Lierse
Changed on:
26 Feb 2025
Overview
This describes the details of the different events in the Fluent platform and provides the required base knowledge for troubleshooting. This expects that you have a good understanding of the Fluent Event Execution process and how Events are matched before the corresponding business logic is executed.
Key points
- There are two types of Orchestration Events and the corresponding subtypes:
- There are multiple types of Audit events: snapshot, ruleSet, rule, ACTION, CUSTOM, Exception
- All events follow the same structure.
Orchestration vs. Audit Events
In the Fluent Platform we distinguish between Orchestration and Audit Events. Both types follow the below format, also known as the Fluent Event Structure.
1{
2 "id": "{{id of the event (UUID)}}",
3 "name": "{{name of the event}}",
4 "type": "{{type of the event (ORCHESTRATION or ORCHESTRATION_AUDIT)}}",
5 "accountId": "{{Fluent account id of the event}}",
6 "retailerId": "{{Fluent retailer id of the event}}",
7 "category": "{{the category of the event (snapshot, ruleSet, rule, ACTION, CUSTOM, exception, ORDER_WORKFLOW)}}",
8 "context": {
9 "sourceEvents": ["{{id of the orchestration event (if applicable)}}"],
10 "entityType": "{{type of the orchestratable entity which this event relates to}}",
11 "entityId": "{{id of the orchestratable entity which this event relates to}}",
12 "entityRef": "{{reference of the orchestratable entity which this event relates to}}",
13 "rootEntityType": "{{type of the top level entity which this event relates to}}",
14 "rootEntityId": "{{id of the top level entity which this event relates to}}",
15 "rootEntityRef": "{{reference of the top level entity which this event relates to}}"
16 },
17 "eventStatus": "{{the status of the event (PENDING, NO_MATCH, FAILED, SUCCESS, SCHEDULED, COMPLETE}}",
18 "attributes": ["{{custom section. e.g. custom attributes or audit information}}"],
19 "source": "{{source of the event (e.g. Fluent-API)}}",
20 "generatedBy": "{{user which generated the event}}",
21 "generatedOn": "{{UTC date when the event was generated in ISO-8601 format}}"
22}
Orchestration Events
Orchestration Events are events which are processed by the Fluent Orchestration Engine (Rubix) and, if matched, are executing the business logic of the corresponding part of a . We can distinguish between 2 types of Events and the corresponding subtypes:
- External Events - generated outside of a Workflow, intended to begin the execution of a Ruleset in a Workflow.
- Internal Events - generated inside of a Workflow, intended to execute another Ruleset in the same Workflow.
External Events
The following are examples of an :
- User Action Event e.g. clicking a button in the Fluent OMS or Fluent Store web apps
- Cross Workflow Event e.g. sending an inventory reservation event from the order workflow
- Integration Event e.g. inventory delta event sent using the Event API
Furthermore the source of an can be the following:
- Event API using the event/sync (user action) or event/async REST API endpoint
- On the back of a GraphQL
`create`
mutation triggering a`CREATE`
event for the corresponding entity - From a Rule action which has the
`scheduledOn`
field set to the current Date i.e.`scheduledOn(new Date())`
and the event is intended for a different domain.
Internal Events
The following are examples of an :
- Inline Event e.g. cancel all fulfilments for an order cancellation
- Scheduled Event / Future Dated Event e.g. expire a fulfilment in 3 hours
External & Scheduled Event vs. Inline Event
External and Scheduled Events initiate their individual Event Execution Context whereas Inline events form part of an existing Event Execution Context and can be used to link multiple Rulesets together, forming a Process or Sub Process.
External and Scheduled Events will have a unique identifier in form of a UUID. During execution, multiple Audit Events are generated.
Unlike an Inline Event, an External Event is added to the platform's Event Queue and executed by an available Fluent Orchestration Engine ().
Audit Events
Orchestration Audit Events or Audit Events are events which a produced by the Fluent Orchestration Engine on the back of of an Orchestration Event execution. They give detailed information on the execution of the and provide a detailed audit of what and when logic was executed. Each Audit Event is linked to its originating Orchestration Event via the id in the sourceEvents field in the .
We can distinguish between the following categories of Audit Events, each providing different details on what was executed:
- snapshot
- ruleSet
- rule
- ACTION
- CUSTOM
- Exception

snapshot
This is generated when an Orchestration Event has been picked by the Fluent Orchestration Engine (Rubix) but before the Orchestration Event is being matched. The `attribute`
section of this will contain some core information of the ahead of the execution including the `status`
of the .
Example:
Snapshot
1{
2 "id": "f8b23900-a4dd-11ec-a45b-83d8b1ae3f6a",
3 "name": "snapshot",
4 "type": "ORCHESTRATION_AUDIT",
5 "accountId": "TEST",
6 "retailerId": "1",
7 "category": "snapshot",
8 "context": {
9 "sourceEvents": [
10 "f82191c0-a4dd-11ec-a568-2d00cfceb356"
11 ],
12 "entityType": "ORDER",
13 "entityId": "2640",
14 "entityRef": "HD_561",
15 "rootEntityType": "ORDER",
16 "rootEntityId": "2640",
17 "rootEntityRef": "HD_561"
18 },
19 "eventStatus": "SUCCESS",
20 "attributes": [
21 {
22 "name": "snapshot",
23 "value": {
24 "id": "2640",
25 "ref": "HD_561",
26 "type": "HD",
27 "items": [
28 {
29 "skuId": null,
30 "skuRef": "WSH05-32-Yellow",
31 "skuPrice": 10.0,
32 "productId": null,
33 "totalPrice": 10.0,
34 "skuTaxPrice": 1.0,
35 "requestedQty": 5,
36 "totalTaxPrice": 1.0
37 }
38 ],
39 "status": "CREATED",
40 "orderId": "2640",
41 "customer": {
42 "email": "test@fluentcommerce.com",
43 "mobile": "+614041234567",
44 "lastName": "Test",
45 "firstName": "User",
46 "customerId": 591,
47 "customerRef": null
48 },
49 "orderRef": "HD_561",
50 "retailer": {
51 "retailerId": "1"
52 },
53 "createdOn": 1647403379706,
54 "entityType": "ORDER",
55 "retailerId": null,
56 "fulfilmentChoice": {
57 "address": null,
58 "currency": null,
59 "deliveryType": "STANDARD",
60 "fulfilmentType": null,
61 "fulfilmentPrice": null,
62 "pickupLocationRef": null,
63 "fulfilmentTaxPrice": null,
64 "deliveryInstruction": null
65 },
66 "fulfilmentPlanId": null
67 },
68 "type": "OBJECT"
69 }
70 ],
71 "source": null,
72 "generatedBy": "Rubix User",
73 "generatedOn": "2022-03-16T04:03:00.089+0000"
74}
75
ruleset
This is generated for each Ruleset that is being executed. The `name`
field of the will define the name of the Ruleset which was executed and the section of this will contain:
- information when the Ruleset started executing (
`startTimer`
- in epoch format) - information when the Ruleset stopped executing (
`stopTimer`
- in epoch format) - status if the Ruleset execution was successful (
`eventStatus`
)
Example:
1{
2 "id": "7b942482-a56c-11ec-9f8f-a7305b1811a2",
3 "name": "SelectProposedFulfilment",
4 "type": "ORCHESTRATION_AUDIT",
5 "accountId": "TEST",
6 "retailerId": "1",
7 "category": "ruleSet",
8 "context": {
9 "sourceEvents": [
10 "7b57910d-a56c-11ec-a454-b551e2c80b32"
11 ],
12 "entityType": "ORDER",
13 "entityId": "2640",
14 "entityRef": "HD_561",
15 "rootEntityType": "ORDER",
16 "rootEntityId": "2640",
17 "rootEntityRef": "HD_561"
18 },
19 "eventStatus": "SUCCESS",
20 "attributes": [
21 {
22 "name": "startTimer",
23 "value": 1647464588744,
24 "type": "STRING"
25 },
26 {
27 "name": "stopTimer",
28 "value": 1647464588994,
29 "type": "STRING"
30 }
31 ],
32 "source": null,
33 "generatedBy": "Rubix User",
34 "generatedOn": "2022-03-16T21:03:08.994+0000"
35}
rule
This is generated for each Rule that is being executed. The `name`
field will define the fully qualified name of the Rule which was executed (including the id and namespace). The section of this will contain:
- information of the Ruleset in which the Rule resides in (
`ruleSet`
) - information of the configuration of the Rule (
`props`
) - information when the Rule started executing (
`startTimer`
- in epoch format) - information when the Rule stopped executing (
`stopTimer`
- in epoch format) - status if the Rule execution was successful (
`eventStatus`
)
Example:
1{
2 "id": "7b942481-a56c-11ec-9f8f-a7305b1811a2",
3 "name": "TEST.order.SelectProposedFulfilment",
4 "type": "ORCHESTRATION_AUDIT",
5 "accountId": "TEST",
6 "retailerId": "1",
7 "category": "rule",
8 "context": {
9 "sourceEvents": [
10 "7b57910d-a56c-11ec-a454-b551e2c80b32"
11 ],
12 "entityType": "ORDER",
13 "entityId": "2640",
14 "entityRef": "HD_561",
15 "rootEntityType": "ORDER",
16 "rootEntityId": "2640",
17 "rootEntityRef": "HD_561"
18 },
19 "eventStatus": "SUCCESS",
20 "attributes": [
21 {
22 "name": "ruleSet",
23 "value": "SelectProposedFulfilment",
24 "type": "STRING"
25 },
26 {
27 "name": "props",
28 "value": {
29 "eventName": "CheckProposedFulfilmentExists",
30 "excludedFulfilmentStatuses": [
31 "CANCELLED",
32 "EXPIRED",
33 "ESCALATED"
34 ]
35 },
36 "type": "STRING"
37 },
38 {
39 "name": "startTimer",
40 "value": 1647464588744,
41 "type": "STRING"
42 },
43 {
44 "name": "stopTimer",
45 "value": 1647464588994,
46 "type": "STRING"
47 }
48 ],
49 "source": null,
50 "generatedBy": "Rubix User",
51 "generatedOn": "2022-03-16T21:03:08.994+0000"
52}
Action
This is generated for each Action that is being produced by a Rule. The `name`
field will define what was produced and will contain some details of the performed. Based on the name field we can distinguish between the following Audit Events:
Send Event
Indicates that an Orchestration Event has been produced (see https://docs.fluentcommerce.com/essential-knowledge/rule-actions)
The section of this will contain information on:
- name of the event
- payload of the event
- information when the Action started executing (
`startTimer`
- in epoch format) - information when the Action stopped executing (
`stopTimer`
- in epoch format) - information on whether the event is scheduled or not (
`Future Dated`
) - status if the Action execution was successful (
`eventStatus`
)
Example:
Send
1{
2 "id": "faac8262-a4dd-11ec-a568-2d00cfceb356",
3 "name": "Send Event",
4 "type": "ORCHESTRATION_AUDIT",
5 "accountId": "TEST",
6 "retailerId": "1",
7 "category": "ACTION",
8 "context": {
9 "sourceEvents": [
10 "fa263c59-a4dd-11ec-a454-df2bec4b3a30"
11 ],
12 "entityType": "ORDER",
13 "entityId": "2640",
14 "entityRef": "HD_561",
15 "rootEntityType": "ORDER",
16 "rootEntityId": "2640",
17 "rootEntityRef": "HD_561"
18 },
19 "eventStatus": "SUCCESS",
20 "attributes": [
21 {
22 "name": "Event Name",
23 "value": "FindAndCreateOrderFulfilment",
24 "type": "STRING"
25 },
26 {
27 "name": "Event",
28 "value": {
29 "id": "fa932e02-a4dd-11ec-9683-a30765765443",
30 "meta": {
31 "models": [],
32 "simulation": false
33 },
34 "name": "FindAndCreateOrderFulfilment",
35 "type": "NORMAL",
36 "entityId": "2640",
37 "accountId": "HOLGER",
38 "entityRef": "HD_561",
39 "errorLogs": [],
40 "trailLogs": [],
41 "attributes": {
42 "latitude": -33.8850036,
43 "longitude": 151.2093216,
44 "rootEntityId": "2640",
45 "rootEntityRef": "HD_561",
46 "rootEntityType": "ORDER"
47 },
48 "entityType": "ORDER",
49 "retailerId": "1",
50 "scheduledOn": 1647403384017,
51 "entityStatus": "RECEIVED",
52 "rootEntityId": "2640",
53 "entitySubtype": "HD",
54 "rootEntityRef": "HD_561",
55 "rootEntityType": "ORDER"
56 },
57 "type": "STRING"
58 },
59 {
60 "name": "Future Dated",
61 "value": true,
62 "type": "BOOLEAN"
63 },
64 {
65 "name": "startTimer",
66 "value": 1647403384138,
67 "type": "STRING"
68 },
69 {
70 "name": "stopTimer",
71 "value": 1647403384183,
72 "type": "STRING"
73 }
74 ],
75 "source": "-1514278334.ProcessOrder",
76 "generatedBy": "Rubix User",
77 "generatedOn": "2022-03-16T04:03:04.183+0000"
78}
GraphQL (“null”)
Indicates that a mutation has been produced (see https://docs.fluentcommerce.com/essential-knowledge/rule-actions)
The section of this will contain information on:
- name of the GraphQL mutation
- information on the payload of the GraphQL mutation
- information when the Action started executing (
`startTimer`
- in epoch format) - information when the Action stopped executing (
`stopTimer`
- in epoch format) - status if the Action execution was successful (
`eventStatus`
)
Example:
1{
2 "id": "fd424870-a4dd-11ec-a568-2d00cfceb356",
3 "name": null,
4 "type": "ORCHESTRATION_AUDIT",
5 "accountId": "TEST",
6 "retailerId": "1",
7 "category": "ACTION",
8 "context": {
9 "sourceEvents": [
10 "fce81b7d-a4dd-11ec-a454-5f6bd9fa4e67"
11 ],
12 "entityType": "FULFILMENT",
13 "entityId": "2545",
14 "entityRef": "2351e169-33b2-4573-ba2f-c66841fefd08",
15 "rootEntityType": "ORDER",
16 "rootEntityId": "2640",
17 "rootEntityRef": "HD_561"
18 },
19 "eventStatus": "PENDING",
20 "attributes": [
21 {
22 "name": "response",
23 "value": {
24 "$hashCode": 0,
25 "updateFulfilment": {
26 "id": "2545",
27 "status": "PROCESSING",
28 "$hashCode": 0,
29 "__typename": "Fulfilment",
30 "$hashCodeMemoized": false
31 },
32 "$hashCodeMemoized": false
33 },
34 "type": "CUSTOM"
35 },
36 {
37 "name": "request",
38 "value": {
39 "variables": {
40 "input": {
41 "id": "2545",
42 "eta": {
43 "defined": false
44 },
45 "type": {
46 "defined": false
47 },
48 "items": {
49 "defined": false
50 },
51 "status": {
52 "defined": false
53 },
54 "attributes": {
55 "defined": false
56 },
57 "expiryTime": {
58 "value": 1647464586434,
59 "defined": true
60 },
61 "deliveryType": {
62 "defined": false
63 }
64 }
65 }
66 },
67 "type": "CUSTOM"
68 },
69 {
70 "name": "startTimer",
71 "value": 1647403388357,
72 "type": "STRING"
73 },
74 {
75 "name": "stopTimer",
76 "value": 1647403388372,
77 "type": "STRING"
78 }
79 ],
80 "source": "-1364418806.StoreFulfilment",
81 "generatedBy": "Rubix User",
82 "generatedOn": "2022-03-16T04:03:08.372+0000"
83}
Send Webhook
Indicates that a web hook has been produced (see https://docs.fluentcommerce.com/essential-knowledge/rule-actions)
The section of this will contain information on:
- request endpoint
- request header information (including the signature)
- response code
- response body (a Rule cannot process the response)
- information when the Action started executing (
`startTimer`
- in epoch format) - information when the Action stopped executing (
`stopTimer`
- in epoch format)
Example:
Send
1{
2 "id": "fba98000-a4dd-11ec-9260-c7034f005b5e",
3 "name": "Send Webhook",
4 "type": "ORCHESTRATION_AUDIT",
5 "accountId": "TEST",
6 "retailerId": "1",
7 "category": "ACTION",
8 "context": {
9 "sourceEvents": [
10 "fa7d3501-a4dd-11ec-9683-0db0c4ab3e39"
11 ],
12 "entityType": "ORDER",
13 "entityId": "2640",
14 "entityRef": "HD_561",
15 "rootEntityType": "ORDER",
16 "rootEntityId": "2640",
17 "rootEntityRef": "HD_561"
18 },
19 "eventStatus": "SUCCESS",
20 "attributes": [
21 {
22 "name": "Request Endpoint",
23 "value": "https://test.com/services/57f6308e-6b88-46a8-9a58-0ff4751905f6/webhook",
24 "type": "STRING"
25 },
26 {
27 "name": "Request Headers",
28 "value": "flex.signature=[UXbIl+T/zNs5eUO2YUFkGnGfiw6LULH+kFdn/35O+yFLGYoxxdQWudOSShD4Ntw2Q5TN6a5wkZuGz+y8dFYkq85wqvvCKGHtdnp+7OFaqw2bjlZ/xWJUjXwW8f9cU0K2+LfjEwdCYvGD1YCVDncB4WBVCHg9QSp7gNMJI+JiW4w=]&fluent-signature=[UQzRuRN9oPeERDOoFjeLArp1tuy4ikd3rxtUks38ReUjOJ4V/MkT81K0cLHj8y1x5he8BjW1FnkAvAzLTyoH/zcUnc034zZGxs0yy81oKWy6QYr1DtHWokSsp3TBfGTb2CpIy9Jpb5luvM7lq5a7mKreURHOSr2rc46VzGv+tSc=]&Content-Type=[application/json]",
29 "type": "STRING"
30 },
31 {
32 "name": "Response Body",
33 "value": "{\"requestId\": \"9f38e860-4ed7-42a1-825c-0b31a710c3c2\"}",
34 "type": "STRING"
35 },
36 {
37 "name": "Response Headers",
38 "value": "Connection=[keep-alive]&Content-Length=[53]&Date=[Wed, 16 Mar 2022 04:03:05 GMT]&Content-Type=[application/json]",
39 "type": "STRING"
40 },
41 {
42 "name": "Response code",
43 "value": 200,
44 "type": "INTEGER"
45 },
46 {
47 "name": "Response reason",
48 "value": "OK",
49 "type": "STRING"
50 },
51 {
52 "name": "startTimer",
53 "value": 1647403384230,
54 "type": "STRING"
55 },
56 {
57 "name": "stopTimer",
58 "value": 1647403385840,
59 "type": "STRING"
60 }
61 ],
62 "source": "-1189250357.SendOrderStatusWebhook",
63 "generatedBy": "Rubix User",
64 "generatedOn": "2022-03-16T04:03:05.840+0000"
65}
CUSTOM
This is generated when a Rule produces a custom log . The log in a Rule allows to generate a single custom to provide additional information (see https://docs.fluentcommerce.com/essential-knowledge/rule-actions).
The `name`
field of the will be the Rule name which has invoked the log with the postfix `_Log`
The section of this will contain information on:
- the custom payload which was generated during the execution
Example:
Custom
1{
2 "id": "3957d910-61dc-11eb-9de2-279c997416aa",
3 "name": "GetLocationsForStateAndNetwork_Log",
4 "type": "ORCHESTRATION_AUDIT",
5 "accountId": "TEST",
6 "retailerId": "1",
7 "category": "CUSTOM",
8 "context": {
9 "sourceEvents": [
10 "3838ad74-61dc-11eb-b168-1f39d1bd40bf"
11 ],
12 "entityType": "ORDER",
13 "entityId": "2080",
14 "entityRef": "HD_63",
15 "rootEntityType": "ORDER",
16 "rootEntityId": "2080",
17 "rootEntityRef": "HD_63"
18 },
19 "eventStatus": "PENDING",
20 "attributes": [
21 {
22 "name": "Date",
23 "value": "01/29/2021 02:46 UTC",
24 "type": "STRING"
25 },
26 {
27 "name": "LogCollection",
28 "value": [
29 {
30 "Title": "ContextWrapper",
31 "Message": "Attributes {\"locations\":[{\"ref\":\"LOC:1\",\"latitude\":-37.812104,\"id\":\"199\",\"type\":\"STORE\",\"longitude\":144.969574,\"status\":\"ACTIVE\"}}",
32 "Attributes": []
33 }
34 ],
35 "type": "OBJECT"
36 },
37 {
38 "name": "EventAttribute",
39 "value": {
40 "rootEntityId": "2080",
41 "rootEntityRef": "HD_63",
42 "rootEntityType": "ORDER"
43 },
44 "type": "OBJECT"
45 },
46 {
47 "name": "ThreadName",
48 "value": "SessionCallBackSchedulerThread-7",
49 "type": "STRING"
50 },
51 {
52 "name": "ClassLoader",
53 "value": "TEST.base [519]",
54 "type": "STRING"
55 },
56 {
57 "name": "message",
58 "value": "ContextWrapper",
59 "type": "STRING"
60 },
61 {
62 "name": "detailedMessage",
63 "value": "01/29/2021 02:46 UTC",
64 "type": "STRING"
65 }
66 ],
67 "source": "plugin",
68 "generatedBy": "Rubix User",
69 "generatedOn": "2021-01-29T02:46:44.758+0000"
70}
exception
This is generated when an exception during the execution of a Rule occurs. The `name`
field of the will correspond to the exception that has occurred. Further details of the error including the full stacktrace will be provided in the attributes section of the .
The section of this will contain information on:
- full stacktrace including line numbers(
`exception`
) - name of the last Rule that was executed before the exception occurred (
`lastRule`
) - name of the last Ruleset that was executed before the exception occurred (
`lastRuleSet`
) - short message on the error (
`message`
) - status(
`eventStatus`
) will always be FAILED
Example:
Exception
1{
2 "id": "7dd711e3-53cd-11eb-86d1-7ddeda25003b",
3 "name": "com.fluentretail.rubix.exceptions.PropertyNotFoundException",
4 "type": "ORCHESTRATION_AUDIT",
5 "accountId": "TEST",
6 "retailerId": "1",
7 "category": "exception",
8 "context": {
9 "sourceEvents": [
10 "7d8e4941-53cd-11eb-ae22-a7ab4e3e7a3c"
11 ],
12 "entityType": "FULFILMENT",
13 "entityId": "2038",
14 "entityRef": "aca7a28a-7999-4ac9-8c8b-e3a33c8d7177",
15 "rootEntityType": "ORDER",
16 "rootEntityId": "2044",
17 "rootEntityRef": "HD_127"
18 },
19 "eventStatus": "FAILED",
20 "attributes": [
21 {
22 "name": "exception",
23 "value": {
24 "code": 400,
25 "message": "'emailConfigSetting' is required",
26 "stackTrace": [
27 {
28 "fileName": "RuleUtils.java",
29 "className": "com.fluentcommerce.util.RuleUtils",
30 "lineNumber": 42,
31 "methodName": "validateRulePropsIsNotEmpty",
32 "nativeMethod": false,
33 "declaringClass": "com.fluentcommerce.util.RuleUtils"
34 },
35 {
36 "fileName": "ForwardEmailEvent.java",
37 "className": "com.fluentcommerce.rule.email.ForwardEmailEvent",
38 "lineNumber": 122,
39 "methodName": "validateAndGetRuleProperties",
40 "nativeMethod": false,
41 "declaringClass": "com.fluentcommerce.rule.email.ForwardEmailEvent"
42 },
43 ...
44 ],
45 "suppressed": [],
46 "classContext": [
47 "com.fluentcommerce.util.RuleUtils",
48 "com.fluentcommerce.rule.email.ForwardEmailEvent",
49 "com.fluentcommerce.rule.email.ForwardEmailEvent",
50 "com.fluentretail.rubix.plugin.registry.impl.BaseRuleProxyFactory$1",
51 "com.sun.proxy.$Proxy55",
52 ...
53 ],
54 "detailMessage": "'emailConfigSetting' is required",
55 "localizedMessage": "'emailConfigSetting' is required",
56 "suppressedExceptions": []
57 },
58 "type": "OBJECT"
59 },
60 {
61 "name": "lastRule",
62 "value": "HOLGER.base.ForwardEmailEvent",
63 "type": "String"
64 },
65 {
66 "name": "lastRuleSet",
67 "value": "ForwardEmailEvent",
68 "type": "String"
69 },
70 {
71 "name": "message",
72 "value": "'emailConfigSetting' is required",
73 "type": "String"
74 }
75 ],
76 "source": null,
77 "generatedBy": "Rubix User",
78 "generatedOn": "2021-01-11T05:26:00.927+0000"
79}