AnsweredAssumed Answered

LAST_INSERT_ID() sql statement activiti

Question asked by zilarion on May 23, 2013
Latest reply on May 23, 2013 by jbarrez
Using LAST_INSERT_ID() does not result in the correct value. Is this function not supported in activiti?

I am using the following queries:

Service task with an end listener with the expression:
sql:INSERT INTO `requisitions` ( `itemID`, `quantity`, `rejected`) VALUES ( ${itemID}, ${quantity}, "no" );

Service task with the expression:
sql:SELECT last_insert_id()

Now, the variable resulting from the second query is 0.
What is going wrong here?