Announcement

Collapse
No announcement yet.

BPMN: unable to set reminders on task creation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • BPMN: unable to set reminders on task creation

    Hi,

    As part of a flowchart I need to create a task (see screenshot) and assign a reminder to it. I don't know why in this particular case i'm not getting my reminder set.... In other simple cases it works like a charm. Any ideas?

    thanks,
    regards
    Michele

    Click image for larger version

Name:	Schermata 2019-03-29 alle 15.38.51.png
Views:	549
Size:	81.2 KB
ID:	47405


    Attached Files

  • #2
    Hi,

    I started digging into this issue which seems really silly.
    I see that application/Espo/Modules/Advanced/Core/Workflow/Actions/BaseEntity.php is used to getValue() for the new Task entity so I traced with a print_r() what is the result there and what is the return of GetDataToFill():

    Code:
    [2019-04-02 14:43:25] Espo.DEBUG: Workflow\Actions\BaseEntity: getDataToFill() Array (     [name] => Reperire materiale     [dateEnd] => 2019-04-03 14:43:25     [description] => - Invio richiesta per materiale.  - Una volta ottenuto il materiale รจ caricato su dropbox, cartella cliente.     [reminders] => Array         (             [0] => stdClass Object                 (                     [type] => Email                     [seconds] => 3600                 )          )  )  [] []
    This seems ok and in application/Espo/Modules/Advanced/Core/Workflow/Actions/CreateEntity.php : 36 is immediately passed into set() method of newEntity.

    Code:
     $newEntity = $entityManager->getEntity($linkEntityName);  
    $data = $this->getDataToFill($newEntity, $actionData->fields);
    $newEntity->set($data);
    So I traced before newEntity->save print_r of newEntity->get('reminders') and...

    Code:
    [2019-04-02 15:10:35] Espo.DEBUG: Workflow\Actions\createEntity newEntity->get('reminders'): Array (     [0] => stdClass Object         (             [type] => Email             [seconds] => 3600         )  )  [] []
    It seems ok... so why the final task (== newEntity) did not have it????
    It seems that reminders is not storable in task entity def so where is it saved?
    Any ideas where to look?

    regards,
    Miche
    Last edited by michib; 04-02-2019, 04:09 PM.

    Comment


    • #3
      Hi,

      Problem solved thanks to Yuri.
      It was tricky: setting reminders for a task requires having an assigned user to the task too. So the solution was to add a 3rd action to the task adding the reminder after the 2nd that assigned the user via auto-assignment rule.

      Michele

      Comment

      Working...
      X