Let's say we have a task loop with 3 tasks:
IFT1 - IF - IFT2
And IFT1 and IFT2 is also connected. (IFT = Interactive Function Task)
If i put a Regenerate on the IF task what tries to check the IFT1's status - success or failure, it's accept - reject, (not regen all, just simple regen), i will have a warning like this: " trying to get property of a non object.", at the last line of this code:

    if ($templateVariableID == null or $templateVariableID == '' ) { // logical entry it is
      //this is a logical entry.  that is, not using a variable.. need to see what the last task's status is.
      $query = db_select('maestro_queue_from', 'a');
      $query->join('maestro_queue','b','a.from_queue_id=b.id');
      $query->fields('b', array('status'));
      $query->condition("a.queue_id", $this->_properties->id,"=");
      $res = $query->execute();
      $row=$res->fetchObject();
      $lastStatus = intval($row->status);

The database query fails. For me, it seems when regenerating, cause we have a new process ID:
1) process variables are lost, inaccessible in the regenerated process . It can be problematic in complex templates.
2) Tasks can't access to basically anything from the previous task, cause the queue is not filled.

And if i take a look on the code, it makes sense:
inside MaestroEngineVersion1::newProcess(), when regenerating, only the next task's entry is written to the queue, nothing else.

Comments

_randy’s picture

Does the regenerate all in production tasks flag help alleviate this issue?

_randy’s picture

Issue summary: View changes

move around some string to make it more clear