Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflows/activities to post event notifications that could be listened to #3709

Open
sstro opened this issue Dec 14, 2022 · 5 comments
Open
Labels
enhancement New feature or request

Comments

@sstro
Copy link

sstro commented Dec 14, 2022

We would like to listen to Temporal workflow/activity lifecycle events (e.g. WorkflowExecutionStarted, ActivityTaskStarted, ActivityTaskCompleted), apply some filtering and transformation and then persist the events to our own database. Business users could query this database directly instead of querying Temporal and transforming/aggregating information at the runtime.

An additional requirement would be ability to distinguish workflow / activity replay / retry events from "first execution" events.

It would be nice if it were possible to attach some kind of listener to a workflow / an activity at the worker level.

We've considered workflow/activity inbound/outbound call interceptors, however, they only seem to fire on a subset of events (start/finish). Additionally, workflow interceptors do not distinguish first start and replay events.

We would be interested in having the functionality available in Java SDK.

Related discussions in the support forum:

@sstro sstro added the enhancement New feature or request label Dec 14, 2022
@mindaugasrukas
Copy link
Contributor

Is this a use case for having the ability to create a custom UI (user interface)?

@sstro
Copy link
Author

sstro commented Dec 15, 2022

Not exactly, it's for integration with our own process information system.

@yiminc
Copy link
Member

yiminc commented Dec 16, 2022

We have 2 options currently available:

  1. use interceptor to intercept workflow/activity, example https://github.com/temporalio/samples-go/tree/main/interceptor
  2. intercept calls using a proxy, example: https://github.com/temporalio/samples-go/tree/main/grpc-proxy

@sstro
Copy link
Author

sstro commented Dec 19, 2022

We've considered workflow/activity inbound/outbound call interceptors, however, they only seem to fire on a subset of events (start/finish). Additionally, workflow interceptors do not distinguish first start and replay events, which is important for our use case.

Is the proxy supported in Java SDK ?

@sync-by-unito sync-by-unito bot closed this as completed Mar 3, 2023
@yiminc yiminc reopened this Mar 3, 2023
@Quinn-With-Two-Ns
Copy link
Contributor

Proxy and interceptors are not a complete solution for this issue since they are not invoked on server side workflow completions like timeout or termination.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants