[jboss-jira] [JBoss JIRA] Commented: (JBPM-913) ProcessBean.startInstance does not set ProcessInstance.key, causing second process start for any user to fail
Olga Ivanova (JIRA)
jira-events at lists.jboss.org
Tue May 15 13:18:53 EDT 2007
[ http://jira.jboss.com/jira/browse/JBPM-913?page=comments#action_12362280 ]
Olga Ivanova commented on JBPM-913:
-----------------------------------
Please correct me if I'm wrong but I believe null values are allowed with unique constraint when all columns in a constraint have null value.
In our case when key consists of process definition id and 'key' field, process definition id is never null, so it won't be possible to insert two process instances that belong to same process definition, where 'key' field is null.
I've tried to test this on Oracle with this data:
create table ri_unique (
a number,
b number,
unique(a, b)
);
then try to insert some data
insert into ri_unique values (1, 1) // ok
insert into ri_unique values (null, 1) // ok
insert into ri_unique values (null, 1) // failed, unique constraint violated
insert into ri_unique values (null, null) // ok
insert into ri_unique values (null, null) // ok
Having one additional unique key, as David proposed will solve the problem I think.
I believe issue should be reopened.
> ProcessBean.startInstance does not set ProcessInstance.key, causing second process start for any user to fail
> -------------------------------------------------------------------------------------------------------------
>
> Key: JBPM-913
> URL: http://jira.jboss.com/jira/browse/JBPM-913
> Project: JBoss jBPM
> Issue Type: Bug
> Components: Web Interface
> Affects Versions: jBPM jPDL 3.2
> Reporter: Kevin Klinemeier
> Assigned To: Tom Baeyens
>
> The web console isn't setting the ProcessInstance.key value. This value has a unique constraint across key_ and processdefinition_
> To reproduce, either:
> run against a non-hypersonic database and attempt to create two process instances for any one process definition.
> or
> run against hypersonic, writing data to a file. Inspect Process_Instances to see constraint violated by null, which apparently isn't caught by hypersonic.
> It's not clear to me how to correctly populate this field.
--
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
More information about the jboss-jira
mailing list