Method get_linked_beans() always returns empty list when triggered from Workflow

Hi,

I have set up a simple before_save logic hook for the Accounts module. When an account is saved the related contacts are retrieved using the get_linked_beans method. This works perfectly fine when manually editing and saving a record, but when using Workflow (to trigger the logic hook) the method always returns an empty list.

I assume this is because Workflow operates asynchronously in a separate process, the SugarCRM environment is not yet fully loaded.

Anyone has an idea where to look in order to fix this?

Thanks in advance!