if (joinType != null)
{
CaseDatabaseImpl caseDatabaseImpl = (CaseDatabaseImpl) workflowService.getCaseDatabase();
SpiCaseDatabase caseDatabase = caseDatabaseImpl.getWrappedObject();
UserTransaction userTransaction = null;
MonitorEventResult eventResult = null;
try
{
userTransaction = caseDatabase.getUserTransaction();
if (JoinType.JOIN_AND.equals(joinType))
{
eventResult =
dispatch_andJoin(
workflowService,
workflowProcess,
operator,
event_userTransaction,
caseDatabase,
userTransaction,
workflowWork,
workflowTransition);
}
if (JoinType.JOIN_XOR.equals(joinType))
{
eventResult =
dispatch_xorJoin(
workflowService,
workflowProcess,
operator,
event_userTransaction,
caseDatabase,
userTransaction,
workflowWork,
workflowTransition);
}
if (JoinType.JOIN_OR.equals(joinType))
{
eventResult =
dispatch_orJoin(
workflowService,
workflowProcess,
operator,
event_userTransaction,
caseDatabase,
userTransaction,
workflowWork,
workflowTransition);
}
if (JoinType.JOIN_WEIGHT.equals(joinType))
{
eventResult =
dispatch_weightJoin(
workflowService,
workflowProcess,
operator,
event_userTransaction,
caseDatabase,
userTransaction,
workflowWork,
workflowTransition);
}
userTransaction.commit();
}
catch (WorkflowException ex)
{
if (userTransaction != null)
{
try
{
userTransaction.rollback();
}
catch (TransactionException e)
{
;
}
}
eventResult = new MonitorEventResult();
eventResult.setException(ex);
}
finally
{
if (userTransaction != null)
{
try
{
userTransaction.release();
}
catch (TransactionException e)
{
;
}