GithubHelp home page GithubHelp logo

Comments (8)

motorina0 avatar motorina0 commented on July 24, 2024

This is a problem I have encounter while trying to implement #123
The current approach might be desired way of handling the Identity Links (for performance problems).
I need confirmation/infirmation on this.

There is a comment in the GetIdentityLinksForTaskCmd class regarding the issue:

    // assignee is not part of identity links in the db.
    // so if there is one, we add it here.
    // @Tom: we discussed this long on skype and you agreed ;-)
    // an assignee *is* an identityLink, and so must it be reflected in the
    // API
    //
    // Note: we cant move this code to the TaskEntity (which would be
    // cleaner),
    // since the task.delete cascaded to all associated identityLinks
    // and of course this leads to exception while trying to delete a
    // non-existing identityLink

from flowable-engine.

motorina0 avatar motorina0 commented on July 24, 2024

I did implemented the fix. Will make a pull request with the changes.
The project owners will decide if they will merge them or not.

from flowable-engine.

tijsrademakers avatar tijsrademakers commented on July 24, 2024

Hi,

For assignee and owner the values are stored with the task entity. The participant type identity link that is created is additional and has another meaning. Every assignee of a task will be added as participant for the process instance by default.

So I think the IdentityLinkEntityManager.findIdentityLinksByTaskId method should be used and the participant type identity links created for assignee and owner belongs to the process instance execution and not to the task, so they can be ignore for the task identity links.

from flowable-engine.

motorina0 avatar motorina0 commented on July 24, 2024

Hi Tijs,

Thanks for the prompt answer. After "fixing" the issue, I have better understood how the identity links are handled :)

One topic that I consider open is the HistoricIdentityLinksForTask
In the current (implicit) approach the owner and assignee updates are not available in history.
In the explicit approach (create identity links for owner and assignee) the full history can be queried.

See new unit test:

https://github.com/motorina0/flowable-engine/blob/ccf2c6928a63a4406d3d1c085617965ebc61cf94/modules/flowable-engine/src/test/java/org/flowable/engine/test/history/HistoricTaskInstanceTest.java#L597

All changes are here:

master...motorina0:issue_133#diff-c581222409bed86ebef60c7bd5c72a81

from flowable-engine.

tijsrademakers avatar tijsrademakers commented on July 24, 2024

Hi,

I think it would be nice to have the owner and assignee updates available in the history. But in the changes I see on your branch you also changed the participant involvement into an explicit assignee and owner identity link for the runtime identity link table. The assignee and owner links are implicit because they are already stored in the act_ru_task table. I don't think this should be changed now, but making the owner and assignee updates available in the history might still be a good thing to do. What do you think?

from flowable-engine.

motorina0 avatar motorina0 commented on July 24, 2024

I think it is a god idea that has both benefits:

  • it keeps an explicit history of the task assignee and owner
  • it allows assignee and owner links to be implicit (more performant) for run-time tables

I will implement it this way.

from flowable-engine.

motorina0 avatar motorina0 commented on July 24, 2024

Implemented. Added unit tests. Created pull request.

from flowable-engine.

motorina0 avatar motorina0 commented on July 24, 2024

Pull Request merged.

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.