[
http://jira.jboss.com/jira/browse/JBPM-891?page=comments#action_12356082 ]
David Lloyd commented on JBPM-891:
----------------------------------
It should be as simple as an insert statement like the following:
insert into JBPM_JOB
(ID_,
CLASS_,
VERSION_,
DUEDATE_,
PROCESSINSTANCE_,
TOKEN_,
TASKINSTANCE_,
ISSUSPENDED_,
ISEXCLUSIVE_,
LOCKOWNER_,
LOCKTIME_,
EXCEPTION_,
RETRIES_,
NAME_,
REPEAT_,
TRANSITIONNAME_,
ACTION_,
GRAPHELEMENTTYPE_,
GRAPHELEMENT_)
select
ID_,
'T',
0,
DUEDATE_,
PROCESSINSTANCE_,
TOKEN_,
TASKINSTANCE_,
ISSUSPENDED_,
'N', -- This is a boolean - adapt to your platform
NULL,
NULL,
EXCEPTION_,
0,
NAME_,
REPEAT_,
TRANSITIONNAME_,
ACTION_,
GRAPHELEMENTTYPE_,
GRAPHELEMENT_
from JBPM_TIMER;
However, one of the values is a boolean. If I recall correctly, some platforms will have
a native boolean type (like MySQL) and some won't (like Oracle), so there should be a
note to that effect.
db conversion script for timers
-------------------------------
Key: JBPM-891
URL:
http://jira.jboss.com/jira/browse/JBPM-891
Project: JBoss jBPM
Issue Type: Task
Components: Core Engine
Reporter: Tom Baeyens
Assigned To: David Lloyd
Fix For: jBPM jPDL 3.2
i thought that there would be no db conversion necessary. only a schema update. but i
think there is one conversion necessary in the db: timers.
for messages, you can simply make sure that the webapp does not accept incoming requests
and then leave the command executor running for a while till all async messages are
processed. (that also needs to be documented)
so we need to make a migration guide in the release notes of 3.2. The schema updates are
already there (those need another update, but i can do that later).
to be added is guidance on how to convert the timers. wether a conversion script and
code is required, i don't know yet. please evaluate the strategies with me:
1) writing a conversion tool based on hibernate. The tool could just take the old
Timer.hbm.xml and the new Job.hbm.xml, load from one table and insert in the other. all
with the same session cause you can assume that the job table will be in the same db as
the old jbpm tables.
2) we could also just give one or more sql statements on how to convert the timers into
jobs. of course this will cause more problems with db compatibility.
... any other strategy ?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira