[Vtigercrm-developers] Sending Workflow Emails vt7.0.1
Alan Lord
alanslists at gmail.com
Thu Aug 17 09:19:50 GMT 2017
I think I have tracked down a problem:
Here we retrieve the Send Email Task (6) from the database:
> Thu Aug 17 09:06:22 2017,653 [622] DEBUG VT - Prepared sql query being executed : select task from com_vtiger_workflowtasks where task_id=?
> Thu Aug 17 09:06:22 2017,653 [622] DEBUG VT - Prepared sql query parameters : [6]
I added some debug statement in com_vtiger_workflow.service
> Thu Aug 17 09:06:22 2017,657 [622] DEBUG VT - In com_vtiger_workflow.service. About to getCachedEntity 12x477
> Thu Aug 17 09:06:22 2017,657 [622] DEBUG VT - Returned Entity:
> Thu Aug 17 09:06:22 2017,657 [622] DEBUG VT -
> Thu Aug 17 09:06:22 2017,657 [622] DEBUG VT - Prepared sql query being executed : select * from vtiger_ws_entity where id=?
> Thu Aug 17 09:06:22 2017,657 [622] DEBUG VT - Prepared sql query parameters : [12x477]
See above - the query is "select * from vtiger_ws_entity where id =
'12x477';
This is in VtigerWebserviceObject.php the static function
fromId($adb,$entityId)
I don't think that is ever going to return a result. The wsentity string
"12x477" needs to have been separated before this point.
In the com_vtiger_workflow.service I cannot see where this is supposed
to happen.
> function vtRunTaskJob($adb){
> $util = new VTWorkflowUtils();
> $adminUser = $util->adminUser();
> $tq = new VTTaskQueue($adb);
> $readyTasks = $tq->getReadyTasks();
> $tm = new VTTaskManager($adb);
> foreach($readyTasks as $taskDetails){
> list($taskId, $entityId, $taskContents, $relatedInfo) = $taskDetails;
> $task = $tm->retrieveTask($taskId);
> //If task is not there then continue
> if(empty($task)){
> continue;
> }
> $task->setContents($taskContents);
> $task->setRelatedInfo($relatedInfo);
> $entity = VTEntityCache::getCachedEntity($entityId);
> if(!$entity) {
> $entity = new VTWorkflowEntity($adminUser, $entityId);
> }
>
> $task->doTask($entity);
> }
> }
Am I missing something or is this never going to work?
Al
On 17/08/17 09:53, Alan Lord wrote:
> On one of our dev servers I am trying to diagnose this issue.
>
> Once the Outgoing server is configured I can send emails using the
> internal mail composer, and I get the email message about having
> successfully configured the outgoing server.
>
> However, when I trigger the default workflow email for Contact
> modification which send the Assigned user an email, the email is
> generated and added to the queue table in the database.
>
> When I run the workflow scheduler, the record is removed from the queue
> and in the log file I can see new Email records being added and
> ModTracker entries being written, but there is *nothing* about actually
> sending the email... And, the email doesn't arrive (I am the assigned
> user).
>
> Is anyone else seeing this problem?
>
> I have error_reporting set to max (except for E_NOTICE) and the debug
> log enabled but I am seeing nothing to help me track this down?
More information about the vtigercrm-developers
mailing list