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

Home » RADICORE development » Workflow » Problem with an Add1 as the starting task of a transaction (autoincrement primary key)
Problem with an Add1 as the starting task of a transaction [message #3803] Thu, 25 July 2013 15:54 Go to previous message
jjtoranzo2004 is currently offline  jjtoranzo2004
Messages: 261
Registered: September 2012
Senior Member
Tony,

I created a new workflow with an Add1 transaction as the starting task. The table in question (REPORT) has an auto_increment primary key. The workflow starts normally, but the next transaction in the workflow (an Add2) is not referenced properly, because the context passed is report_id=0 instead of the proper one (e.g. report_id=3843)
(I checked it also saving in a file the $fieldarray variable inside the _cm_post_insertRecord () method).

The context is passed correctly if the starting tak is an Update1.

After reading a bit ( http://www.tonymarston.net/php-mysql/functions-and-variables .html#notes._dml_insertrecord ) I reached the conclusion that the Framework, using the method _dml_insertRecord (), should be able to obtain the auto-generated value from the database and insert it into the output array. And therefore, to use the generated id as the context in the next task using the _examineWorkflow () method. (Am I wrong?)

The problem only surfaced after including the task as a starting point of a workflow. In itself this Add1 transaction works normally, records are inserted with no problem. And after being created, from the LIST1 task I am able to jump to child task (such as a LIST2 transaction) with the correct context.

Any help or suggestion is appreciated. Thanks in advance.
 
Read Message
Read Message
Read Message
Previous Topic: Workflow with optional transition?
Next Topic: How to create CASES.
Goto Forum:
  


Current Time: Sun Apr 28 15:44:15 EDT 2024

Total time taken to generate the page: 0.00940 seconds