Workflow diagnosics

Hello,
i am trying to create a workflow that would log call automatically when the status of a lead is changed. For now, the workflow is eighter stuck in running or failed.
Conditions are related to leads:

  1. if field changed
  2. if feld is set X
    Actions are;
    Create record in module calls that is related to the workflow module
    subject called
    direction outbound
    status held

And most of the time this fails, i think it works 60% of tries, it works better when i am logged as admin wher it finishes in almost 100% of cases.

How can i diagnostic this workflow and see where it gets stuck and why?

Can you provide us a screenshot of your configuration? Is there anything in the error log file? What level do you have the error log file set to? What version of SuiteCRM are you running?

sieberta

Hello and thank you for the reply,
log lever is error, most of errors in log are:
Sun Aug 28 15:56:09 2016 [24884][1][FATAL] Job ec6c3496-36a6-5211-58c6-57c2df0d77a5 (Run Report Generation Scheduled Tasks) failed in CRON run
Sun Aug 28 14:55:10 2016 [24018][1][ERROR] Unable to get proper side for link contact
Sun Aug 28 14:53:00 2016 [24010][1][ERROR] convert: Conversion of 28.08.2016 11:53 from Y-m-d H:i:s to d.m.Y failed
Thu Aug 25 15:04:15 2016 [6202][9b7d89f6-ec9c-3fbf-019c-577fa6cba222][ERROR] Unable to load related bean by id
Version 7.5.3Sugar Version 6.5.23 (Build 1061)

I noticed on each
WF that was stuck in running i get:
Mon Aug 29 14:37:15 2016 [8275][9b7d89f6-ec9c-3fbf-019c-577fa6cba222][ERROR] Unable to get proper side for link contact
Mon Aug 29 14:37:18 2016 [8275][9b7d89f6-ec9c-3fbf-019c-577fa6cba222][FATAL] SugarPHPMailer encountered an error: Invalid address:
Mon Aug 29 14:37:34 2016 [3539][9b7d89f6-ec9c-3fbf-019c-577fa6cba222][ERROR] Unable to load related bean by id

I don’t see anything obvious… who is the email supposed to go to? The lead themselves, or someone else?

I would suggest trying the following…

  1. Remove all actions
  2. Run the workflow and make sure it works
  3. Add the actions one by one, testing between each
  4. Look for which action “breaks” the workflow.

You might also look into your security settings, since you said it almost always works when you’re logged in as the administrator. Maybe the user the WF is pretending to be doesn’t have the permissions required to create or modify the respective record?

sieberta

Hello,
the mail goes to the lead.
it always breaks at the create record for the call. About the security settings, i have a security group wich only cannot import/export. Sure there could be some things saved wrong,but i am afraid to play around with the users.
I noticed that the user that is regular user has the most problems with this, strange is that it;s jut working some of times, if it wouldn;t be working all of the time then it would be easier to diagnose.
Where else can i look for errors and what with the error messages
Mon Aug 29 14:37:15 2016 [8275][9b7d89f6-ec9c-3fbf-019c-577fa6cba222][ERROR] Unable to get proper side for link contact
Mon Aug 29 14:37:18 2016 [8275][9b7d89f6-ec9c-3fbf-019c-577fa6cba222][FATAL] SugarPHPMailer encountered an error: Invalid address:
Mon Aug 29 14:37:34 2016 [3539][9b7d89f6-ec9c-3fbf-019c-577fa6cba222][ERROR] Unable to load related bean by id

If the only limitation on permissions is import/export, I wouldn’t expect that to be a problem. Where I wondered if a problem might arise if some people only have permission to modify their own records for example.

Regarding the errors:

Mon Aug 29 14:37:15 2016 [8275][9b7d89f6-ec9c-3fbf-019c-577fa6cba222][ERROR] Unable to get proper side for link contact

This means that the related item couldn’t be found, I believe. I’m not sure if this is on the contact side or the other side. I’m a little surprised to see it, since you’re trying to deal with leads, not contacts.

Mon Aug 29 14:37:18 2016 [8275][9b7d89f6-ec9c-3fbf-019c-577fa6cba222][FATAL] SugarPHPMailer encountered an error: Invalid address:

This means that it didn’t find an email address to send to. Not surprising if it could connect to the right record in the previous message… or perhaps does the contact/lead not have an email address specified? At least as primary?

Mon Aug 29 14:37:34 2016 [3539][9b7d89f6-ec9c-3fbf-019c-577fa6cba222][ERROR] Unable to load related bean by id

I believe this is similar to the first one… it isn’t finding the related record.

I got back to my original suggestion, if you think security settings aren’t a problem, you should take this WF down to the bare bones and run it, then add actions in one-by-one until you determine where it is breaking. I have to do this all the time with WF to determine what I’ve done wrong.

The fact it works sometimes, and not others, and has more trouble when logged in as a regular user… is why I suggested investigating security settings.

Best,
sieberta

Hello,
yesterday i set the user as admin and no errors, today the errors appeared again.
The WF is stuck again in running, alltho it added the call and also added email, and in the email there is a to address.
Funny thing is that i don’t find anything on yesterday in the logs and created emails…

Pleas direct me to where i can read more about security roles because something is fishy here…

Another thing to try would be turning your log in Administrative Settings to “DEBUG” and running the workflow as admin then as regular user and see what differences exist. You might need it to fail before it is helpful.

I’m sorry, I don’t know of any great resources on roles. This might be from SugarCRM, so searching SugarCRM Role Management, or something of the like might be helpful.

Documentation is unfortunately a bit lacking for SuiteCRM… but often SugarCRM documentation helps to bridge the gaps.

sieberta