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

Feat: Improve variable listener event query #3963

Conversation

canchito-dev
Copy link

@canchito-dev canchito-dev commented Sep 17, 2024

Trigger querying the database table ACT_RU_EVENT_SUBSCR only if the variable that is created/updated has a variable listener event associated with it.
The change only applies to processes.

Check List:

  • Unit tests: Yes. Those already available
  • Documentation: No change here

import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.*;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The project standards are to explicitly list all imports. Please see https://github.com/flowable/flowable-engine/tree/main/ide-settings

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same note as above; thanks

import org.flowable.eventsubscription.service.impl.persistence.entity.data.impl.cachematcher.SignalEventSubscriptionByProcInstAndEventNameMatcher;
import org.flowable.eventsubscription.service.impl.persistence.entity.data.impl.cachematcher.SignalEventSubscriptionByScopeAndEventNameMatcher;
import org.flowable.eventsubscription.service.impl.persistence.entity.data.impl.cachematcher.SignalEventSubscriptionByScopeIdAndTypeMatcher;
import org.flowable.eventsubscription.service.impl.persistence.entity.data.impl.cachematcher.*;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and again.

import org.flowable.eventsubscription.service.impl.persistence.entity.EventSubscriptionEntity;

import java.util.Map;
import java.util.Set;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please correct the ordering of the imports; again see the ide_settings directory

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idea settings applied ;)

@filiphr
Copy link
Contributor

filiphr commented Sep 20, 2024

@canchito-dev what kind of a problem are you trying to solve with this PR?

@canchito-dev
Copy link
Author

Hi @filiphr
The main objective is to reduce the amount of select queries to the database when there is a variable listener, by only executing it, if the variable that is being created/updated has an associated active listener.

@tijsrademakers
Copy link
Contributor

Hi @canchito-dev ,

Thank you for providing the PR, we have made some modifications and did the commit in 06be453

Best regards

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

Successfully merging this pull request may close these issues.

4 participants