Archives For Advanced Workflow

An Advanced Workflow process can only be triggered once per PHP process or HTTP request. This is intended to prevent Sugar Administrators from defining infinitely looping processes. (A real catastrophe!) But what does this mean for PHP customizations?

Assume that you have an Advanced Workflow process enabled for the Contacts module that performs an update on this Contact each time it is saved. If you have an Accounts after_save logic hook that performs an update on each related Contact SugarBean then the process will only run against the first related Contact. Any other related Contact that gets saved during your logic hook execution will not have a process run.

This affects not just logic hooks but any other class of PHP customization such as custom API endpoints or jobs.


If you really need to run that process more than once in the same request, here is a workaround:

use Sugarcrm\Sugarcrm\ProcessManager\Registry;

Calling this method will clear the internal Advanced Workflow registry that keeps track of the triggered process starts. After calling this method, the same process can then be triggered again inside the same PHP process or HTTP request.

Careful use of this method can make sure that PHP customizations play nicely with processes defined in Advanced Workflow.

Have you checked out Sugar University lately?  SugarCRM provides Hot Topic Webinars designed specifically for Sugar Developers.  This is a great way to keep on top of how to take advantage of latest technology in Sugar and keep those development skills sharp!

Sugar 7 Sidecar Essentials Webinar

For example, we have an upcoming Sugar 7 Sidecar Essentials Developer Webinar on December 10th at 9:00am PST.  Visit the link to register for this live webinar!  This will be a great one for those just getting their hands dirty with Sugar development or if you have ambitions to become a certified Sugar Developer Specialist.

Webinar Recordings

If you have been missing them or cannot make it then never fear! Each webinar is recorded and those recordings are available for download via Sugar University.

Continue Reading…