GithubHelp home page GithubHelp logo

Comments (5)

tijsrademakers avatar tijsrademakers commented on June 26, 2024

Hi,

Is this something you would like to contribute? Or did you report this issue as an idea to improve performance?

from flowable-engine.

motorina0 avatar motorina0 commented on June 26, 2024

Hi Tij,
This issue is based on the "Flowable roadmap" wiki page.
I would like to contribute, but I would like to get some feedback on the approach before I start implementing.

from flowable-engine.

tijsrademakers avatar tijsrademakers commented on June 26, 2024

Cool, sub tasks should be handled by the TaskEntityManager I think, because sub tasks are attached to a parent task, not to an execution. The implementation points look good to me.

from flowable-engine.

motorina0 avatar motorina0 commented on June 26, 2024

Implementation completed. Added unit tests. Updated affected unit tests.

Main changes:

ProcessEngine - updated version, added task relationship count
ProcessEngineConfigurationImpl - added flag enableTaskRelationshipCounts
AddIdentityLinkCmd, DeleteIdentityLinkCmd, RemoveTaskVariablesCmd - call task.forceUpdate() in order to update the identityLinkCount
GetIdentityLinksForTaskCmd - minor change
ValidateTaskRelatedEntityCountCfgCmd, CountingTaskEntity - initial commit
AbstractEntityManager - added logic for task reltionship counting flag state (enabled/disabled
IdentityLinkEntityManagerImpl, VariableInstanceEntityManagerImpl - increase/decrease IdentityLinkCount on instert/delete
TaskEntityImpl - implements CountingTaskEntity
TaskEntityManagerImpl - check identityLinkCount and variableCount before delete
TaskDataManager, MybatisTaskDataManager - added updateAllTaskRelatedEntityCountFlags() method
ProfilingDbSqlSession - call super.flushUpdates() after collecting data
TaskServiceTest, VerifyDatabaseOperationsTest, ChangeTaskCountConfigAndRebootEngineTest - added unit tests identityLinkCount and variableCount
DatabaseTablePrefixTest, DatabaseTablePrefixTest - updated unit test after the new flag was added 
Updated SQL Scripts

Implementation Comments

  • Sub-task Count flag not added (yet) for the following reasons:

    • in order to update the flag a new update must be made on the parent task for the subTaskCount flag
    • we would add two update statements (on sub-task create and delete) in order to remove one select statement (select all sub-tasks when the parent task is completed)
    • not sure of the possible concurrency side effects if the (parent) TaskEntity is being updated and at the same time a sub-task is being completed (this trying to update the count on the parent).
  • Some Commands now have a task.forceUpdate() in order to update the variableCount and indentityLinkCount: AddIdentityLinkCmd, DeleteIdentityLinkCmd, RemoveTaskVariablesCmd

from flowable-engine.

tijsrademakers avatar tijsrademakers commented on June 26, 2024

Merged the PR, thanks!

from flowable-engine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.