Automatic email via workflow and schedule

Hello everyone,

I am currently facing the following problem. First of all: I am using a very old version of SuiteCRM (7.10.14). For reasons that I don’t want to go into at the moment, an upgrade is currently not possible. If the problem cannot be solved in this version, I am looking for a possible temporary workaround.

Unfortunately, I am also a complete beginner and have no knowledge of SuiteCRM. After a lot of trial and error, I am now looking for help here.

I am using a self-created module in which orders are saved. There is a field that contains a future date. When this date occurs, or one day before, a reminder email is to be sent.

What I have done so far:
I have created a workflow for this that looks like this:

My questions:

I thought that this workflow also needs to be included in the task planner (scheduler). I am totally unsure about the whole configuration up to this point anyway. I have interpreted that the workflow is the “job” that needs to be included in the “job URL” of the task scheduler.

Am I right about that? Or am I completely on the wrong track and my entire configuration is wrong?

I would be grateful for any help or tips on how I can solve this problem.

Many thanks in advance!

Hi, welcome to the Community! :tada:

The scheduler job that runs all Workflows is predefined, and it is called “Process Workflow Tasks”. You don’t have to add anything for specific workflows as long as that process is running successfully.

1 Like

Thanks for the quick reply :slight_smile:

I have “taken over” the system and the schedule job “Process Workflow Tasks” no longer exists. I can imagine that it was deleted or something similar.

Strange…
That listing of jobs, are you seeing it as an admin user, or a regular user?

Maybe check the database to see if it is there, maybe disabled (with deleted field set to 1), and perhaps you can reinstate it.

This might help, in case you need to recreate it fully:

1 Like

I have viewed the entries with a user with admin rights.

After further research, there was actually no such entry in the database, I have now created it manually and the workflow was also executed directly. However, this failed as I can see from the process audit.

Can I view the error further or see more information about why it failed?

yes, check the logs

The log files are totally spammed, which makes it extremely difficult for me to find the error. But one error that makes me suspicious is this “[WARN] Trying to get an empty email address.”. Even when configuring the WorkFlow, I wasn’t sure whether an email field or similar was missing.

It should be checked whether a date corresponds to todays date and then a reminder email should be sent. But I cant find an additional method to configure something like this. Where does it get the information to whom the mail should be sent?

There is a missing part in your screen, compare with screenshot here:

This is probably related to the record type you’re using to set up the Workflow, which module is it?

Try a Workflow in a common module such as Contacts to see if it changes the rendering of your screen.

About the spammed logs: timestamps are your friends, helping you focus on the relevant interactions.

The missing part from the documentation is missing for every module, including the common ones… I dont know what to do, the whole system has been somewhat neglected in recent years and not really maintained. Maybe I will try to update the system to a newer version over the holidays in the hope that it will fix the error.

The timestamps only help to a limited extent, as thousands of lines are written every minute. I think the whole project needs some work.

In Admin/ System settings, you can define your log level.

It’s a verbose log, alright, but it doesn’t have to be like you say, thousands of lines per minute, unless there are many users currently using it?

Was the system previously upgraded / migrated from an earlier version of SugarCRM?

I have come across similar problems before caused by incompatible / incomplete upgrades or cross-grades. To resolve those problems I had to do a migration from the old system to a new clean install, it is a signifncant job that requires staging a development site as the risk of a fail is high. It can be a large job but may be the best solution to trying to make many small mods/patches.

Dependant on the database, lots of log activity can be because the debug level is incorrectly set on a produciton system, so you are getting all the warnings, etc., etc…

If it’s been a long time since such a system had some routine database maintenance it might also be the case some basic database maintenance will resolve many problems. A simple backup and restore can be a good start, it is too hard to give specific advice as it depends massively on the system itself. If you have limited experience I’d suggest engaging some local support with OS / Database specific experience.