I need to execute a couple of redirects in Servlet and then more complicated workflow (async calling of web service, store entity in db) so I thought about using jBPM, first i can store KnowledgeSession in HttpSession (only from one point is important to more that i can store it in DB). After redirections will be finished i can store my KnowledgeSession in DB and continue processing in another Thread or even system. Is my approach not too complicated?
Thanks for opinions
I would rather store session id in http session rather than the session itself and use a kind of object store for keeping the sessions until they are persisted into the db so on redirects you can still acess it. But why not persisting it (in other words use JPAKnowledgeService) directly?