Hi,
I found the problem :-).
I used an iterator like:
Code:
private const String queryFindVersionNumbers = "select max( pd.Version ) " +
"from pd in class NetBpm.Workflow.Definition.Impl.ProcessDefinitionImpl " +
"where pd.Name = ? ";
private Int32 GetVersionNr(CreationContext creationContext)
{
int newVersion = 1;
IEnumerator iter = creationContext.DbSession.Iterate(queryFindVersionNumbers, _name, DbType.STRING).GetEnumerator();
if(iter.MoveNext())
{
Int32 highestVersionNumber = (Int32) iter.Current;
if ((Object) highestVersionNumber != null)
{
newVersion = highestVersionNumber + 1;
}
}
return newVersion;
}
The problem is that the iterator is not closed and it is blocking the rollback. I changed the source to:
Code:
private const String queryFindVersionNumbers = "select max( pd.Version ) " +
"from pd in class NetBpm.Workflow.Definition.Impl.ProcessDefinitionImpl " +
"where pd.Name = ? ";
private Int32 GetVersionNr(CreationContext creationContext)
{
int newVersion = 1;
IEnumerator iter = creationContext.DbSession.Iterate(queryFindVersionNumbers, _name, DbType.STRING).GetEnumerator();
while (iter.MoveNext())
{
Int32 highestVersionNumber = (Int32) iter.Current;
if ((Object) highestVersionNumber != null)
{
newVersion = highestVersionNumber + 1;
}
}
return newVersion;
}
Now it works fine.
Regards Philipp