You need to be more specific than that.
If you are wondering how you can drop all tables, then you can do a create-drop in your hibernate.cfg.xml
Otherwize you can manually
cleanthe values in the database, but I don't recommend that unless you know what you are doing.
I want to clean only the ended processes and tasks records from jbpm db.
These expired records remains the database, only the end date attribute will be filled with the actual date.
Are you using HSQLDB (default IIRC) or something else like MSSQL, Oracle, etc.?
There may be a way to do this via the jmx-console if you find the right MBean...
I am not 100 percent certain of this, and please correct me, but I thought if you ended a process. ProcessInstance.end() or if you from a tasknode transit to end
<task-node name="permit"> <task name="40-ruling" swimlane="handlingOfficer"></task> <transition name="next" to="end"></transition> </task-node> <end-state name="end"></end-state>
Then it will automatically delete everything that the process has stored?
If you have put something in the business process context and want to remove it, I think you can delete it like this:
I use Postgres db, and I would like to do this automatical, avoid jmx managmanets.
thanx for your answer.
If you see the jbpm database, you will see the records remains in the database.
Anythhing else, I use the below code line to ended the process:
Yes you are right. The only thing that is different is the version number that is set to 1,2 or 3 depending on if the task or process is running, suspended or finished.
Looks like this is the behaviour of jbpm. I agree that it seems strange that these are not deleted. Maybe someone with jbpm knowledge can answer.
The reason why I think its strange why these aren't deleted is because you can never return back to a processinstance once it is ended, or a taskinstance for that matter. (am I right?)
But if only the version is set to something else, then definetly that should be possible.
But it possible it is ended the task but not the process instance.
I will see today this issue.
Thanx for your answers.
What kind of version do you think?
The version attribute in JBPMPROCESSINSTANCE and JBPMTASKINSTANCE
Can someone please clarify here.
does not delete the someName variable in JBPM_VARIABLEINSTANCE. It only sets the TOKEN, TOKENVARIABLEMAP, PROCESSINSTANCE to null. Why isn't this deleted even though you ask to delete it?
Can someone please clarify?
I think this is a general jbpm concept.
The process instance is remained available, but the business object(someName) is deleted from db
Can, you see this topic please:
What's your opinion?