Git Product home page Git Product logo

Comments (5)

balsarori avatar balsarori commented on May 30, 2024

Which Activiti version are you using? If pre 7.x then those versions are no longer maintained.

from activiti.

cnislow avatar cnislow commented on May 30, 2024

Hi sorry, we are using version 7.1.0.M3.1, I have updated my original question.

from activiti.

balsarori avatar balsarori commented on May 30, 2024

Thanks for adding the version info.

The save history endpoint is void rather than returning the newly added HistoricDetail entity.

Which endpoint? Can you point to that endpoint in the code?

from activiti.

cnislow avatar cnislow commented on May 30, 2024

Endpoint may have been a little misleading, allow me to try to clarify...

We are calling the updateTask endpoint from our application. And since we have history level set to FULL, the following method gets executed which inserts our variables into the activiti history detail table.

This is working as we expect, however this method has void return type, when we are actually interested in the ID that gets returned after line 650. For example, you can see the ID we are interested in being returned with the HistoricDetailVariableInstanceUpdateEntity here:

a84ded46-e0fc-4994-9e5d-46dca2b6115b

but just not with the method and therefore not to our application. I understand making this method no longer return void looks like it would have tons of consequences so that seems unlikely and probably unnecessary.

Right now we are experimenting with making a query to the history detail table after our record gets inserted, and grabbing the latest ID for the variable we are interested in. We are concerned this won't work as we test our more complicated workflows with more tasks/subtasks, and ideally we would like to grab the ID right after DB insertion.

We discussed potentially writing our own HistoryManager Implementation that would override this method and write the ID to ThreadLocal so we could access it from our application. This was our best idea at the moment.

Would love to hear if you think we are on the right track, or any other ideas you may have. Thanks!

from activiti.

balsarori avatar balsarori commented on May 30, 2024

Have you tried using HistoricVariableInstanceQuery?

You can use it to get the latest variable update filtering by taskId, variableName, etc!

from activiti.

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.