Has workflow limit? or strange behavior

Hello

I set up 23 workflows that are triggered during lead conversion.
All workflows individually works well.
BUT they work in a very strange way when all of them are active.
By iterating over combinations of active-inactive each of them, I looked at which workflows are causing the problem.
And I found that without two workflow everything works well.

My all workflows (the first two is a problem)

If I disable (inactive) the first two workflows then everything works well
But if All workflows are active then it seems like losing some data
for example,
right after converted lead in this screen
image

if I click on a new created People recorder I will see Error retrieving record
image

and if I go to the module and find this record I can see it and see that some data was lost

Please see a screenshot here is a separate module where most of workflow should create a new record(all records created well ) and set there People field (it’s relate) so as you can see the last part was done ~ about 50%

My logs a lot of error and I don’t understand why it’ so much

It’s srange behavior because as I mentioned above if I disable the first two workflows (I manually find without which workflow everything works fine ) then I get ALL record working well

BUT my log looks the same except the last lines about Exception in Controller: Error retrieving record. This record may be deleted or you may not be authorized to view it.

Also another one thing - if I start the two problem workflow separately then it work fine

So if I can’t fix it could I put some kind of delay on individual workflows? Let’s say somehow change the code so that two of my problem processes are called 2 seconds after the conversion of the lead?

I have Suitecrm 7.11.18 / PHP 7.4 / nginx…

Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Unable to load related bean by id
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Unable to load related bean by id
Thu Apr 15 17:34:55 2021 [642416][1][FATAL] SugarPHPMailer encountered an error: Invalid address:  (to): 
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Given parameter should contains index "copy_email_addresses"
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Email address copy error occured, bean was: Leads
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Unable to load related bean by id
Thu Apr 15 17:34:55 2021 [642416][1][FATAL] SugarPHPMailer encountered an error: Invalid address:  (to): 
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Given parameter should contains index "copy_email_addresses"
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Email address copy error occured, bean was: Leads
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Unable to load related bean by id
Thu Apr 15 17:34:55 2021 [642416][1][FATAL] SugarPHPMailer encountered an error: Invalid address:  (to): 
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Given parameter should contains index "copy_email_addresses"
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Email address copy error occured, bean was: Leads
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Unable to load related bean by id
Thu Apr 15 17:34:55 2021 [642416][1][FATAL] SugarPHPMailer encountered an error: Invalid address:  (to): 
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Given parameter should contains index "copy_email_addresses"
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Email address copy error occured, bean was: Leads
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Unable to load related bean by id
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Given parameter should contains index "copy_email_addresses"
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Email address copy error occured, bean was: Leads
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Unable to load related bean by id
Thu Apr 15 17:34:55 2021 [642416][1][FATAL] SugarPHPMailer encountered an error: Invalid address:  (to): 
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Given parameter should contains index "copy_email_addresses"
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Email address copy error occured, bean was: Leads
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Unable to load related bean by id
Thu Apr 15 17:34:55 2021 [642416][1][FATAL] SugarPHPMailer encountered an error: Invalid address:  (to): 
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Given parameter should contains index "copy_email_addresses"
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Email address copy error occured, bean was: Leads
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Unable to load related bean by id
Thu Apr 15 17:34:55 2021 [642416][1][FATAL] SugarPHPMailer encountered an error: Invalid address:  (to): 
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Given parameter should contains index "copy_email_addresses"
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Email address copy error occured, bean was: Leads
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Unable to load related bean by id
Thu Apr 15 17:34:55 2021 [642416][1][FATAL] SugarPHPMailer encountered an error: Invalid address:  (to): 
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Given parameter should contains index "copy_email_addresses"
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Email address copy error occured, bean was: Leads
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Unable to load related bean by id
Thu Apr 15 17:34:55 2021 [642416][1][FATAL] SugarPHPMailer encountered an error: Invalid address:  (to): 
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Given parameter should contains index "copy_email_addresses"
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Email address copy error occured, bean was: Leads
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Unable to load related bean by id
Thu Apr 15 17:34:55 2021 [642416][1][FATAL] SugarPHPMailer encountered an error: Invalid address:  (to): 
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Given parameter should contains index "copy_email_addresses"
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Email address copy error occured, bean was: Leads
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Unable to load related bean by id
Thu Apr 15 17:34:55 2021 [642416][1][FATAL] SugarPHPMailer encountered an error: Invalid address:  (to): 
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Given parameter should contains index "copy_email_addresses"
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Email address copy error occured, bean was: Leads
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Unable to load related bean by id
Thu Apr 15 17:34:55 2021 [642416][1][FATAL] SugarPHPMailer encountered an error: Invalid address:  (to): 
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Given parameter should contains index "copy_email_addresses"
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Email address copy error occured, bean was: Leads
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Unable to load related bean by id
Thu Apr 15 17:34:55 2021 [642416][1][FATAL] SugarPHPMailer encountered an error: Invalid address:  (to): 
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Given parameter should contains index "copy_email_addresses"
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Email address copy error occured, bean was: Leads
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Unable to load related bean by id
Thu Apr 15 17:34:55 2021 [642416][1][FATAL] SugarPHPMailer encountered an error: Invalid address:  (to): 
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Unable to load related bean by id
Thu Apr 15 17:34:55 2021 [642416][1][FATAL] SugarPHPMailer encountered an error: Invalid address:  (to): 
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Given parameter should contains index "copy_email_addresses"
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Email address copy error occured, bean was: Leads
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Unable to load related bean by id
Thu Apr 15 17:34:55 2021 [642416][1][FATAL] SugarPHPMailer encountered an error: Invalid address:  (to): 
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Given parameter should contains index "copy_email_addresses"
Thu Apr 15 17:34:55 2021 [642416][1][ERROR] Email address copy error occured, bean was: Leads
Thu Apr 15 17:34:56 2021 [642416][1][ERROR] Unable to load related bean by id
Thu Apr 15 17:34:56 2021 [642416][1][FATAL] SugarPHPMailer encountered an error: Invalid address:  (to): 
Thu Apr 15 17:34:56 2021 [642416][1][ERROR] Given parameter should contains index "copy_email_addresses"
Thu Apr 15 17:34:56 2021 [642416][1][ERROR] Email address copy error occured, bean was: Leads
Thu Apr 15 17:34:56 2021 [642416][1][ERROR] Unable to load related bean by id
Thu Apr 15 17:34:56 2021 [642416][1][FATAL] SugarPHPMailer encountered an error: Invalid address:  (to): 
Thu Apr 15 17:34:56 2021 [642416][1][ERROR] Given parameter should contains index "copy_email_addresses"
Thu Apr 15 17:34:56 2021 [642416][1][ERROR] Email address copy error occured, bean was: Leads
Thu Apr 15 17:34:56 2021 [642416][1][ERROR] Unable to load related bean by id
Thu Apr 15 17:34:56 2021 [642416][1][FATAL] SugarPHPMailer encountered an error: Invalid address:  (to): 
Thu Apr 15 17:34:56 2021 [642416][1][ERROR] Given parameter should contains index "copy_email_addresses"
Thu Apr 15 17:34:56 2021 [642416][1][ERROR] Email address copy error occured, bean was: Leads
Thu Apr 15 17:34:56 2021 [642416][1][ERROR] Unable to load related bean by id
Thu Apr 15 17:34:56 2021 [642416][1][FATAL] SugarPHPMailer encountered an error: Invalid address:  (to): 
Thu Apr 15 17:34:56 2021 [642416][1][ERROR] Given parameter should contains index "copy_email_addresses"
Thu Apr 15 17:34:56 2021 [642416][1][ERROR] Email address copy error occured, bean was: Leads
Thu Apr 15 17:34:56 2021 [642416][1][FATAL] SugarPHPMailer encountered an error: Invalid address:  (to): 
Thu Apr 15 17:34:56 2021 [642416][1][ERROR] convert: Conversion of 04/15/2021 14:34 from Y-m-d H:i:s to m/d/Y H:i failed
Thu Apr 15 17:34:56 2021 [642416][1][ERROR] convert: Conversion of 04/15/2021 14:34 from Y-m-d H:i:s to m/d/Y H:i failed
Thu Apr 15 17:34:56 2021 [642416][1][ERROR] fromUser: Conversion of  from user format m/d/Y H:i failed
Thu Apr 15 17:34:56 2021 [642416][1][ERROR] fromUser: Conversion of  from user format m/d/Y H:i failed
Thu Apr 15 17:34:56 2021 [642416][1][ERROR] Unable to load related bean by id
Thu Apr 15 17:34:56 2021 [642416][1][FATAL] SugarPHPMailer encountered an error: Invalid address:  (to): 
Thu Apr 15 17:34:56 2021 [642416][1][ERROR] Given parameter should contains index "copy_email_addresses"
Thu Apr 15 17:34:56 2021 [642416][1][ERROR] Email address copy error occured, bean was: Leads
Thu Apr 15 17:36:04 2021 [642420][1][FATAL] Exception handling in /var/www/html/suitecrm/include/MVC/Controller/SugarController.php:400
Thu Apr 15 17:36:04 2021 [642420][1][FATAL] Exception in Controller: Error retrieving record. This record may be deleted or you may not be authorized to view it.
Thu Apr 15 17:36:04 2021 [642420][1][FATAL] backtrace:
#0 /var/www/html/suitecrm/include/MVC/View/views/view.detail.php(102): sugar_die()
#1 /var/www/html/suitecrm/include/MVC/View/SugarView.php(226): ViewDetail->display()
#2 /var/www/html/suitecrm/include/MVC/Controller/SugarController.php(435): SugarView->process()
#3 /var/www/html/suitecrm/include/MVC/Controller/SugarController.php(375): SugarController->processView()
#4 /var/www/html/suitecrm/include/MVC/SugarApplication.php(113): SugarController->execute()
#5 /var/www/html/suitecrm/index.php(52): SugarApplication->execute()
#6 {main}

Suitecrm 7.11.18 doesn’t work with PHP 7.4, it gives all sorts of errors.

thanks for reply

I’ll rollback php version to 7.3
But what you think will it solve my issue?

change PHP version to 7.3 didn’t make any effect, it’s still the same issue and errors in log

add the field to the necessary steps module, and after processing by the processes, change it, and in the processes, configure it so that the condition has a specific step.
this can solve your problem, and streamline your workflow

good idea, but how can I know what of my 20 workflows will end last?
is there any queue mechanism?

Are you sure you shouldn’t be using a logic hook that could do this more intelligently?

You might be simply hitting PHP settings limits like max_execution_time or even memory_limit.

But you probably don’t need to do 23 things, you just need to do one thing that happens to have 23 variants. I bet this could be done all in one place, from code, in a single logic_hook.

I’m not sure writing logic hook will be easy for me

I’ve already increase PHP default settings

I think I found a problem - there is the first workflow on the screenshot, inside this workflow I create a new record and set some “problem” field - it’s relationship field between a new record created via this current workflow and the record created via converted Lead… without whit relationship all going well

upd

almost all of my other workflows also create a new record and set relationship , so it looks like this problematic workflow throws an error and other workflows can no longer get id to make a relationship

ok

The problem was in one-to-many relationship between my custom module and Leads
For improving my CRM I rebuild all custom relationship following a guide http://www.jsmackin.co.uk/suitecrm/suitecrm-nice-relationships/

The problem was in this step
Unfortunately the above has now broken the products subpanel in accounts. Let’s fix this.

We just need to add the relationship definition to custom/Extension/modules/Accounts/Ext/Vardefs/accounts_aos_products_1_Accounts.php:

$dictionary["Account"]["relationships"]['accounts_aos_products_1'] = array(
    'lhs_module' => 'aos_products',
    'lhs_table' => 'aos_products',
    'lhs_key' => 'account_id',
    'rhs_module' => 'Accounts',
    'rhs_table' => 'accounts',
    'rhs_key' => 'id',
    'relationship_type' => 'one-to-many',
    );

My working case now looks like it should reverse value for keys ‘lhs_key’ and ‘rhs_key’
just this

$dictionary["Account"]["relationships"]['accounts_aos_products_1'] = array(
    'lhs_module' => 'aos_products',
    'lhs_table' => 'aos_products',
    'lhs_key' => 'id',
    'rhs_module' => 'Accounts',
    'rhs_table' => 'accounts',
    'rhs_key' => 'account_id',
    'relationship_type' => 'one-to-many',
    );
1 Like