Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Bug Reports » Auto assign user in workflow that starts with ADD1 task
Auto assign user in workflow that starts with ADD1 task [message #5911] Thu, 29 September 2016 16:36 Go to next message
kong is currently offline  kong
Messages: 90
Registered: December 2011
Member
If you apply http:// www.tonymarston.net/php-mysql/infrastructure-faq.html#faq161 to a workflow that starts with an ADD1 task, the ADD1 task will fail with the message "Nothing retrieved from the database".

Stepping through with a debugger shows that the error message is actually generated by the UPD4 task as triggered by the workflow engine.

It appears that upon hitting submit button on the ADD1 task, before the new record completes its commit to the database, the system will first check for and run workflow actions and as a consequence will suspend ADD1 and call UPD4 with the newly created but still uncommitted record as context. Thus, UPD4 won't be able to retrieve that new record from the database, returns the error message and the new record's commit never happens.

Re: Auto assign user in workflow that starts with ADD1 task [message #5914 is a reply to message #5911] Fri, 30 September 2016 05:14 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2371
Registered: April 2006
Location: Surrey, UK
Senior Member
I wonder why I never spotted this problem before? I fixed it by updating the commit() method inside std.table.class.inc so that the code which references the the workflow system comes AFTER the line which sets $GLOBALS['transaction_has_started'] to false.

See the attached file.


Re: Auto assign user in workflow that starts with ADD1 task [message #5915 is a reply to message #5914] Fri, 30 September 2016 11:20 Go to previous message
kong is currently offline  kong
Messages: 90
Registered: December 2011
Member
That works. Thank you.
Previous Topic: MNU_USER Incorrect Columns Spec and Cannot Re-Import
Next Topic: Out of Sync Data in DICT
Goto Forum:
  


Current Time: Tue Dec 17 23:54:49 EST 2024

Total time taken to generate the page: 0.01352 seconds