Bug 973132 - When BAM deployed with jBPM Console - tables bamtasksummary & processinstancelog not created
Summary: When BAM deployed with jBPM Console - tables bamtasksummary & processinstance...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: BAM
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ER2
: 6.0.0
Assignee: David Gutierrez
QA Contact: Jan Hrcek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-11 10:53 UTC by Jan Hrcek
Modified: 2014-08-06 20:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:12:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
server log with errors - deployed with H2 database (2.32 KB, text/x-log)
2013-06-11 10:53 UTC, Jan Hrcek
no flags Details

Description Jan Hrcek 2013-06-11 10:53:45 UTC
Created attachment 759558 [details]
server log with errors - deployed with H2 database

Description of problem:
The scrips used to create initial database structure should be consolidated between BAM and jBPM Dashboard. Currently each application initializes its own version of shared tables (processinstancelog and bamtasksummary) and their definitions are not consistent. See "Actual results" section for details.


Version-Release number of selected component (if applicable):
dashbuilder DR5

How reproducible:
Always.
Deploy productized dashbuilder with kie-ide (aka business-central, kie-workbench in upstream) + dashboard builder on JBoss EAP 6.1

Steps to Reproduce:
1. Configure configure H2 (and then MySQL) datasource in JBoss EAP
2. Deploy DR5 build into server (Can be downloaded from http://jawa05.englab.brq.redhat.com/candidate/BPMS-6.0.0-DR5/)
3. Check the content of the datasource after both applications are deployed

Actual results:
1) H2 database datasource:
there are several exceptions in the application log because BAM is trying to create several tables, that are already created by the jBPM console (see log file)

2) MySQL datas source:
Two different tables BAMTaskSummary(created by jBPM console) and bamtasksummary (created by BAM) are created.
The same with ProcessInstanceLog / processinstancelog

--> In both cases the integration between the console and BAM will not be working


Expected results:
The tables user for the 2 applications to interact should be consolidated in both applications. In either case the integration between the 2 applications should work.

Additional info:

Comment 1 Jan Hrcek 2013-06-11 11:46:34 UTC
Additional note - there is also mismatch in names of primary keys in processinstancelog tables.

In H2 database:
    processinstancelog - primary key declared with name "pk"
    ProcessInstanceLog - primary key declared with name "id"


See error in application log attached:
Error executing CREATE INDEX idx_ps_pk on processinstancelog(pk): Column "PK" not found; SQL statement:
----------------
Also ProcessInstanceLog created by jBPM console has some extra columns not taken into account by BAM.

Comment 2 Lukáš Petrovický 2013-06-12 13:14:09 UTC
This issue needs to be looked at complexly:

- Dashbuilder is supposed to read data from jBPM. Why does it try to recreate jBPM tables from its own DDL files?

- Is low-level DB access really the best way to expose the data? Exposing implementation to outside world is almnost always a bad idea.

- If it absolutely must do the above, then we must make sure that it is always deployed after jBPM - so that jBPM tables never get changed.

Comment 3 David Gutierrez 2013-07-05 14:54:16 UTC
All that issues were caused by having the jBPM dashboard as part of the generic dashboard-builder project. The real problem is:

1.- When installed standalone (no kie-wb present) dashbuilder creates the jbpm history log tables needed by JBPM dashboard and everything works fine.

2.- But when was installed togheter with kie-wb we run into the issues you commented because jbpm tables are already created.

What we've done is to move to a separated repo all the jBPM related stuff. This new repo https://github.com/droolsjbpm/jbpm-dashboard is used to generate the artifacts belonging to the BPMS stack whereas, now, the original dashboard-builder repo only contains the generic dashboard builder stuff. 

So to sum up,

1.- dashboard-builder project no longer contains jBPM related stuff. It's a generic project which in fact is being used by other projects like Teiid https://github.com/teiid/teiid-dashboard.

2.- jbpm-dashboard project is intented to be installed togheter with kie-wb or the jbpm console. If installed alone then the provided jBPM dashboard will fail because will not find the required jbpm history log tables.
 
With this new approach all the issues reported no longer apply.

Comment 5 Jan Hrcek 2013-09-06 11:00:56 UTC
Verified with BPMS 6.0.0 ER2


Note You need to log in before you can comment on or make changes to this bug.