Refactor AR WFL into smaller tasks

Goal

As a customer I want the resources used on the Camunda Engine used more efficiently to speed up the AR WFL for massive batch throughput.

This can be achieved by starting the WFL only on a single asset (horizontally) instead of processing the whole AR WFL for multiple assets which would lead to vertical processing in the single steps (in a for-loop the whole autoretouch task needs to be performed for all assets).

Horizontal processing also allows for much more concise and atomic steps which again in conjunction with using transaction-boundaries (async before/after) is much safer as more intermediate results can be saved in between these steps. Contrary to the all-or-nothing notion we had before.

Behavior

This has changed now:

  • The past behavior was:

    • All AR HTTP requests are contained in a single task which deprives us of the ability to easily store intermediate results

  • The new behavior is:

    • The AR HTTP requests are split up into separate smaller chunks which enables us to use the job processor’s "transaction borders"

    • The performance should improve

Consequences

Consequences for manually starting the AR Workflow:

The AR Workflow can now only handle one single asset at a time and hence must be started on one asset only. For example if the WorkflowStartParametersBuilder is used you should use it with a single asset only (not a list of assets):

WorkflowStartParameters.builder()
                .taskName("AI-AutoRetouch-Path-Workflow-" + assetId)
                .asset(assetId)
                .parameters(workflowParameters)
                .build();

Otherwise the AR workflow will return an error.

Welcome to the AI Chat!

Write a prompt to get started...