Automatiko 0.15.0 released

Know what happened by auditing your services

Posted by Automatiko team on May 04, 2022 · 5 mins read

We are pleased to announce a new release of Automatiko - 0.15.0

Highlights

  • Complete audit of the service
  • Index workflow instance for file system based persistence
  • Import workflow instance via management UI

Complete audit of the service

Nowadays being able to say what happened and by whom becomes more and more important. This could be simply because the legal requirements of the business behind the service but it can also be due to security breach that might have affected given service. Despite the source of the requirement, audit of operation is important if not crucial.

0.15.0 release comes with auditing support that is fully configurable and spans across mutliple layers of the service that is build based on workflows. Here are the categories that are available out of the box

  • workflow life cycle events - such as starting, completing, aborting and signaling workflow instances
  • workflow node life cycle events - execution of each and every node of the workflow
  • workflow instance variable events - whenever variable is changed
  • timer operations - whenever time based job is scheduled and executed
  • messaging - whenever workflow instance is publishing a message
  • persistence - read and write operations on data store

Auditing is fully configurable and by default it is disabled. It can be enabled at runtime which makes it really easy to get hold of the data whenever needed. Each category can be either included or excluded to fine tune the level of data that is required. For more advanced cases, additional filtering can be provided by implementing an interface.

Audit entries can be stored in two formats plain (which is the default) or json. Below are few examples in json format.

Audit entry for workflow instance started

  {
     "timestamp":"2022-05-04T07:35:14.683141",
     "identity":"user123",
     "workflowDefinitionId":"scripts",
     "workflowInstanceId":"468819e7-b63c-4500-98fd-0dc7abb27767",
     "workflowDefinitionName":"scripts",
     "workflowInstanceState":0,
     "description":"Simple script handling workflow for john",
     "variables":{
        "name":"john",
        "lastName":"string",
        "message":"string"
     },
     "tags":[
        "john"
     ],
     "transactionId":"54fbab10-8f96-4f48-bb79-844e003a658d",
     "message":"Workflow instance started"
  }

Audit entry for workflow instance node executed

  {
     "timestamp":"2022-05-04T07:35:15.154825",
     "identity":"user123",
     "workflowDefinitionId":"scripts",
     "workflowInstanceId":"9e96bfcf-9134-480b-a0e6-b166c87245d3",
     "workflowDefinitionName":"scripts",
     "workflowInstanceState":2,
     "description":"Simple script handling workflow for john",
     "variables":{
        "name":"john",
        "lastName":"string",
        "message":"Hello john"
     },
     "tags":[
        "john"
     ],
     "transactionId":"3729bd63-5ffd-4391-ab16-eab5d835cfda",
     "nodeInstanceId":"d2146d7c-ed87-4ee0-a273-9b7d531c5c19",
     "nodeDefinitionId":"ScriptTask_1",
     "nodeName":"Say hello",
     "nodeInstanceState":"Completed",
     "nodeType":"ActionNodeInstance",
     "message":"Workflow instance node executed"
  }
Audit entry for workflow instance variable changed

  {
     "timestamp":"2022-05-04T07:35:14.926842",
     "identity":"user123",
     "workflowDefinitionId":"scripts",
     "workflowInstanceId":"a052795f-4bed-4cf7-9aa8-78c1d79ba8a6",
     "workflowDefinitionName":"scripts",
     "workflowInstanceState":1,
     "description":"Simple script handling workflow for john",
     "variables":{
        "name":"john",
        "lastName":"string",
        "message":"Hello john"
     },
     "tags":[
        "john"
     ],
     "transactionId":"61caa194-b8fa-4cff-be83-84d6a3a9ff6d",
     "nodeInstanceId":"54c9765d-3b7f-4fb5-a55f-090b2783573d",
     "nodeDefinitionId":"ScriptTask_2",
     "nodeName":"Update message",
     "nodeInstanceState":"Active",
     "nodeType":"ActionNodeInstance",
     "variableName":"message",
     "message":"Workflow instance variable changed",
     "variablePreviousValue":"string",
     "variableValue":"Hello john",
     "variableTags":[

     ]
  }
Audit entry for workflow instance finished

  {
     "timestamp":"2022-05-04T07:35:11.920186",
     "identity":"user123",
     "workflowDefinitionId":"scripts",
     "workflowInstanceId":"c99f0ed3-166b-4a8f-8228-455ab3d0b640",
     "workflowDefinitionName":"scripts",
     "workflowInstanceState":2,
     "description":"Simple script handling workflow for john",
     "variables":{
        "name":"john",
        "lastName":"string",
        "message":"Hello john"
     },
     "tags":[
        "john"
     ],
     "transactionId":"dd477c80-7f1d-412a-bfb4-1739e65bd105",
     "message":"Workflow instance finished"
  }

As can be noticed it provides a lot of information including the identity behind the request (in this case user123). With that a complete set of information can be gathered and later on inspected when needed.

Have a look at more details about audit in Automatiko documentation.

Index workflow instance for file system based persistence

File system based persistence is a really good fit for single service instance deploymnets. It does not require additional infrastructure components to be deployed making it really light and a good fit for IoT based services. For example running on Raspberry PI will require just a single executable file (using native image).

In 0.15.0 release, the file system based persistence was improved to index workflow instances automatically to make it more efficient. Main use cases for the index are to improve speed in locating instances based on

  • workflow instance state
  • workflow instance tags
Especially tags based lookup is important as it is used by messaging components to perform correlation against potential conditates to consume the message.

Index is automatically created upon start and kept up to date based on all processed workflow instances. Note that it is a smooth upgrade plan as the index will be created if it does not exist and will automatically index all existing instances - regardless of thier state meaning completed and aborted instances will also be indexed.

Import workflow instance via management UI

Process management UI (that comes with automatiko-process-management-addon) has been enhanced to support importing workflow instances.

Import workflow instance in Process Management UI Import workflow instance in Process Management UI.

On every workflow definition card, there is an import button that allows you to upload exported workflow instance. As simple as selecting file from your local folder and clicking the Import button will bring given instance to life.

Photographs by Unsplash.