Bug 779532

Summary: Update API usage docs in the jBPM documentation
Product: [JBoss] JBoss Enterprise SOA Platform 5 Reporter: Tom Baeyens <mail>
Component: Documentation, JBPM - within SOAAssignee: Default User <jbpapp-maint>
Status: CLOSED WONTFIX QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: erics
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/SOA-1910
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: SOA-1910 Environment:
Last Closed: 2010-10-01 14:59:06 UTC Type: Task
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Tom Baeyens 2010-02-02 10:34:34 UTC
++ This bug is a clone of bug 779531 ++

Affects: Documentation (Ref Guide, User Guide, etc.)
project_key: SOA

This section should be rewritten in the DB and validated with tests:

"
4.1.1.  Relationship with the Configuration Framework 
Persistence API operations should be called from inside a jBPM context block. 
JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
try {
  // Invoke persistence operations here
} finally {
  jbpmContext.close();
}
"

The title should become something like "jBPM API basics".  I believe the user should be presented with the proper usage of the API on the SOA platform:

JbpmContext jbpmContext = JbpmConfiguration.getInstance().createJbpmContext();
try {
  // Invoke persistence operations here
} catch (Exception e) {
  jbpmContext.setRollbackOnly();
} finally {
  jbpmContext.close();
}

The invocation of setRollbackOnly should be validated in transactions where there is no ongoing JTA like e.g. in a web app  transaction, and in transactions where there is an ongoing JTA transaction like with a surrounding ejb that already requires a transaction.  Both situations should be tested with a successful jBPM operation and with a jBPM exception that throws an exception.

Comment 1 Mark Little 2010-02-09 18:12:56 UTC
Affects: Added: [Documentation (Ref Guide, User Guide, etc.)]