Accessing activiti database tables from java code

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2014 03:07 PM
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2014 12:32 AM
Hi Firzhan,
You can use the same DB connection settings and connect to the any DB (activiti too).
Regards
Martin
You can use the same DB connection settings and connect to the any DB (activiti too).
Regards
Martin

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2014 12:42 AM
Hi Martin,
Thanks for your prompt response.
My requirement is to store the BPMN package name with the check-sum value in the activiti DB. By doing so I can avoid users uploading same packages in to the system.
I am planning to use a separate new table in the activiti DB for this task. I am running activiti from a java server.
My question is how can I insert the above mentioned values in to the table by using activiti engine without having external connection with the activiti DB?
Thanks in advance
Thanks for your prompt response.
My requirement is to store the BPMN package name with the check-sum value in the activiti DB. By doing so I can avoid users uploading same packages in to the system.
I am planning to use a separate new table in the activiti DB for this task. I am running activiti from a java server.
My question is how can I insert the above mentioned values in to the table by using activiti engine without having external connection with the activiti DB?
Thanks in advance
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2014 07:10 AM
You can get access tot he connection through the DbSqlSession.getSqlSession() object, that one has the current connection.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2014 08:23 AM
Hi jbarrez,
Where can I find a sample to go through on accessing the connection using DbSqlSession.getSqlSession() object.
Any help or reference materials are appreciated
Where can I find a sample to go through on accessing the connection using DbSqlSession.getSqlSession() object.
Any help or reference materials are appreciated

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2014 10:06 AM
Hi Firzhan,
You can look at the implementation of the org.activiti.engine.impl.cmd.ExecuteCustomSqlCmd class for a good example.
For custom SQL you can also use the ManagementService executeCustomSql method.
Best regards,
You can look at the implementation of the org.activiti.engine.impl.cmd.ExecuteCustomSqlCmd class for a good example.
For custom SQL you can also use the ManagementService executeCustomSql method.
Best regards,
