-
Notifications
You must be signed in to change notification settings - Fork 1
Transaction Logs
Transaction logs are used for storing data about the operations the workflow engine is performing, including the state of the affected data before and after each operation. They are useful for tracking / auditing of changes and include the following pieces of information:
- Workflow Name
- Request ID
- Request Parameters
- Input Data (as requested by the workflow)
- Initiating User
- Result
- State (
STARTED,COMPLETED_SUCCESSFUL,COMPLETED_FAILED) - Timestamp
Note: The data and parameters may be omitted if the workflow marks them as sensitive (for example, storing passwords in the transaction logs can compromise user security, so they are marked as sensitive). In such cases, the data and/or parameters will be marked as
redacted.
Deciding when to store transaction logs is controlled by the server.static.engine.storeLogs parameter (see example below) with the following options:
-
Never- No transaction logs are stored -
OnReadOnly- Only transaction logs for workflows marked as 'read-only' are stored -
OnWriteOnly- Only transaction logs for workflows not marked as 'read-only' are stored -
Always- All workflows generate transaction logs
The engine also requires TransactionLogContent to be set for 'read-only' and 'write' workflows, separately:
-
Empty- No data or params are stored with the transaction log -
WithDataOnly- Only data is stored with the transaction log -
WithParamsOnly- Only params are stored with the transaction log -
WithDataAndParams- The full transaction log is stored
server.static {
...
//core3.workflows.WorkflowEngineComponent
engine {
storeLogs = "OnWriteOnly" // [Never (Off), OnReadOnly (RO, Read), OnWriteOnly (WO, Write), Always (RW)]
requestTimeout = 5 //in seconds
}
...
}Elasticsearch can sometimes have issues parsing the nested objects in the data and params fields, so disabling analysis on them may be needed.
PUT /core-transaction-logs
{
"mappings":{
"store":{
"dynamic_templates":[
{
"data_not_analyzed":{
"path_match":"data",
"mapping":{
"type":"object",
"index":"not_analyzed"
}
}
},
{
"params_not_analyzed":{
"path_match":"parameters",
"mapping":{
"type":"object",
"index":"not_analyzed"
}
}
}
]
}
}
}Home | Getting Started | Structure | Containers | Workflows | Controllers