Workflow on_save not working anymore in scheduler #5165

Open
opened 2026-02-20 16:30:49 -05:00 by deekerman · 0 comments
Owner

Originally created by @attrib on GitHub (Feb 8, 2024).

Issue

  1. Have two modules with a relation.
  2. Create a scheduler workflow for module A which modifies the related record B
  3. Have a on save workflow for B, which calculates a value for a field in B

Expected Behavior

After the scheduler did run, record from module B, should have the calculated field set

Actual Behavior

The second workflow for module B, didn't run, so only the change from the scheduled workflow was applied.

Possible Fix

Introduced by https://github.com/salesagility/SuiteCRM/pull/10296

I reverted this commit locally, but this needs rework.

Context

We have a lot of processes which depend on each other. Some of our instances using this behavior a lot.

Merging the logic of the two workflows into one workflow is only viable in this small use-case. But we have multiple workflows which would trigger the on save workflow. So we would need to add the logic from the on save workflow into all other scheduler workflows. Which then get super hard to maintain.

The PR which was merged is in my mind a big breaking change for how workflows behave.

Your Environment

  • SuiteCRM Version used: 7.14.3
  • PHP 8.2 + MySQL 8
Originally created by @attrib on GitHub (Feb 8, 2024). <!--- Provide a general summary of the issue in the **Title** above --> <!--- Before you open an issue, please check if a similar issue already exists or has been closed before. ---> <!--- If you have discovered a security risk please report it by emailing security@suitecrm.com. This will be delivered to the product team who handle security issues. Please don't disclose security bugs publicly until they have been handled by the security team. ---> <!--- Please be aware that as of the 31st January 2022 we no longer support 7.10.x. New issues referring to 7.10.x will only be valid if applicable to 7.12.x and above. If your issue is still applicable in 7.12.x, please create the issue following the template below --> #### Issue <!--- Provide a more detailed introduction to the issue itself, and why you consider it to be a bug --> <!--- Ensure that all code ``` is surrounded ``` by triple back quotes. This can also be done over multiple lines --> 1. Have two modules with a relation. 2. Create a scheduler workflow for module A which modifies the related record B 3. Have a on save workflow for B, which calculates a value for a field in B #### Expected Behavior After the scheduler did run, record from module B, should have the calculated field set #### Actual Behavior <!--- Tell us what happens instead --> <!--- Also please check relevant logs (suitecrm.log, php error.log etc.) --> The second workflow for module B, didn't run, so only the change from the scheduled workflow was applied. #### Possible Fix <!--- Not obligatory, but suggest a fix or reason for the bug --> Introduced by https://github.com/salesagility/SuiteCRM/pull/10296 I reverted this commit locally, but this needs rework. #### Context <!--- How has this bug affected you? What were you trying to accomplish? --> <!--- If you feel this should be a low/medium/high priority then please state so --> We have a lot of processes which depend on each other. Some of our instances using this behavior a lot. Merging the logic of the two workflows into one workflow is only viable in this small use-case. But we have multiple workflows which would trigger the on save workflow. So we would need to add the logic from the on save workflow into all other scheduler workflows. Which then get super hard to maintain. The PR which was merged is in my mind a big breaking change for how workflows behave. #### Your Environment <!--- Include as many relevant details about the environment you experienced the bug in --> * SuiteCRM Version used: 7.14.3 * PHP 8.2 + MySQL 8
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#5165
No description provided.