[
http://jira.jboss.com/jira/browse/JBPM-913?page=comments#action_12360248 ]
David Lloyd commented on JBPM-913:
----------------------------------
I think this constraint is inherently flawed. While most sensible RDBMSes will not index
null values, this index also includes PROCESSDEFINITION_, which will not ever be null in
this case. A unique index would still be the best way to enforce this constraint at the
database level would probably be a function-based index which enters nulls for both values
if KEY_ is null - obviously not an option for a portable application.
Another option would be the introduction of a "UNIQUEKEY_" column to the table.
Then a unique constraint can be added on this single String nullable column. This column
would be used to maintain uniqueness; the setKey can be modified to look something like
this:
public void setKey(String key) {
this.key = key;
if (key == null) {
setConstraint(null);
} else {
setConstraint(Long.toString(getProcessDefinition().getId()) + ":" +
key);
}
}
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