fyi, start with sybase support following http://docs.codehaus.org/display/ACT/How+to+add+support+for+new+databases guidlines. I'm in contact with Bernd Rücker to provide CI asap.
—
fyi, start with sybase support following http://docs.codehaus.org/display/ACT/How+to+add+support+for+new+databases guidlines. I'm in contact with Bernd Rücker to provide CI asap.
Who had the idea of a unique constraint on a nullable column? For each database there is a given workaround expect Sybase.
Wich column are you reffering to?
Activiti Core Developer
searching for workaround for h2 expression
alter table ACT_RU_EXECUTION
add constraint ACT_UNIQ_RU_BUS_KEY
unique(PROC_DEF_ID_, BUSINESS_KEY_);
alter table ACT_HI_PROCINST
add constraint ACT_UNIQ_HI_BUS_KEY
unique(PROC_DEF_ID_, BUSINESS_KEY_);
Found a solution for Sybase 15:
create unique index ACT_UNIQ_RU_BUS_KEY on ACT_RU_EXECUTION
(case when BUSINESS_KEY_ is null then ('pk-' + ID_) else ('bk-' + BUSINESS_KEY_) end, PROC_DEF_ID_);
But next problem raises on ant task 'create.db.schema' cause of the sql autocommit default which is false. Sybase can not create a functional index on a multi-statement transaction. The autocommit could be set over the specific db properties file which can lead to an undefined db state if one transaction cause an error.
The CycleDbSqlSessionFactory#dbSchemaCreate() must also be able to switch the autocommit mode.
Another option is to use mutiple sql files each executes in one transaction.
Feedback?
By the way: The same problem one of our customers experienced on Informix. The nullable but unique business key seems to get a problem on some databases...
The Autocommit-Mode sounds reasonable
camunda services GmbH
Providing Activiti Training & Consulting: http://www.camunda.com/activiti
Providing a supported and stabilized version of Activiti: http://www.camunda.com/fox/
Our Blog: http://www.bpm-guide.de/
Scripts for Sybase 15
activiti.sybase.create.sql
activiti.sybase.drop.sql
To support these scripts is it necessary to add autocommit="true" at sql on target name="create.db.schema"
Hi all,
I have ported activiti 5.5 to Sybase Adaptive Server Anywhere (>= Rel 9). But i'm not familar with Maven and though a have not followed the tips explained in the wiki. If subject of interest, I can post these scripts here.
But my problem was, that the Sybase JDBC driver jConnect does not Support JDBC-conform BLOB/CLOB access.
Though I have changed all mybatis mappings like that:
Another problem is, that the used alias name membership refers to a reserved word. Though I have changed this to membershp to solve the problem.
In the global mappings.xml I have added the type handlers
With best regards, Torsten
Patches for version 5.5 attached to http://jira.codehaus.org/browse/ACT-726
@Torsten
- How you solve the constraint problem with nullable columns?
- How you find the problem with the reserved key word membership? All maven tests run successfully on sybase.
I used the sybase sql type image instead of blob/clob. So no changes to the mapping are necessary.
Hi hrabe,
No problem on ASA using
create index ACT_UNIQ_RU_BUS_KEY on ACT_RU_EXECUTION (PROC_DEF_ID_, BUSINESS_KEY_);create index ACT_UNIQ_HI_BUS_KEY on ACT_HI_PROCINST (PROC_DEF_ID_, BUSINESS_KEY_);After startup, some action (I think the deployment of BARs) failed with an error message pointing to a problem with reserved words.
I used also Image-Type in the database column in ASA. But the mybatis configuration uses Blob/Clob, the jConnect driver does not support. Dou You have used jConnect or jTDS? On ASA jTDS does not work, only jConnect.
You have to a use unique index. So you did not solve the constraint problem with nullable columns.
Membership is only on ASA a reserved keyword not on ASE.
I used jTDS. On ASE jTDS works.
Do you need to use ASA?
Hi hrabe,
You are right, this is not accurate. But I have assumed, Activiti works fine on other DBs, though the Java code is working and no unique constraint violation will occur.
Yes, we have OEMed that DB in our products.