elsa-workflows / elsa-workflows/elsa-core

Multiple correlation fields

Open
#3,440 0 comments 0 reactions 0 assignees View on GitHub
core triaged
Dominant language
C#
Stars
7.9k
Forks
1.5k
Avg merge
15h 22m
Merged PRs (30d)
114

Description

For certain scenarios it would be useful to have multiple lookup keys for a given workflow instance.

Currently, one can lookup a workflow instance by ID or correlation ID.
Correlation ID allows us to associate a workflow instance with business domain entities. For example, a document approval workflow could be correlated to a document ID, so that all workflows related to said document can be found and exectuted when relevant events happen.

In addition to having a single correlation ID field, we should have a lookup table by which a single workflow instance can be located.
An example use case is a Telnyx telephony workflow. Telnyx sends webhook events in response to actions being sent to it. This asynchronous message flow requires correlation of these events to a workflow. Using the correlation ID is good, but this also means the correlation ID can not be used for e.g. customer ID in case one wanted to correlate by customer as well.

A correlation lookup could be implemented by storing the following fields in a table/collection:

- WorkflowInstanceId
- CorrelationName (e.g. "CustomerId", "CallControlId", "DocumentId")
- CorrelationId (the actual identifier)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.