Lead from Landing page. Process error - Failed to get the context for the background operation
Hello,
Maybe someone can give a solution or a hint how to resolve this situation.
We have several processes with starting signal 'Lead added'. Everything works fine when Lead is added manualy. But when Lead comes from Landing page processes are not started and we see following error in BusinessProcess.Log:
Error while running process [ebda75d0-3e3b-4cb9-ac04-2cc30f61d512] for Lead (Id: [071ded65-fe59-4641-b265-2f04c733b509])
System.InvalidOperationException: Failed to get the context for the background operation. For services without authorization it is necessary to call Terrasoft.Web.Common.SessionHelper.SpecifyWebOperationIdentity.
at Terrasoft.Core.ServiceBus.BusUtils.CreateUserContext(String userName, String sessionId, Guid externalAccessId)
We have tried several solutions:
1. Disabled CSRF protection in web.confing
and even
This didn't help
2. Modified starting signal, setting 'Run following elements in the background'. This gave some results, but the process haven't got values from the Lead, so we have tried to add timer. But as there can be a lot of such processes, timer has crashed regulary, so processes were stayed in Running status forever. That's why we have refused to use timer.
3. Than we have created process in the Lead object on message LeadInserted calling usual Process with Lead.Id parameter. This actualy works on our environment, but still raise error 'Failed to get the context for the background operation' on Customer's environments.
So, there is probably some differences in configuration.
Do you have any ideas what this can be? Or any ideas for more workaround solutions?
Thank you!
Like
Hello,
can you please clarify which version of the site do you use as it may affect the process?
Also, please, check if the "Run in background" checkbox is on. If it is, please disable it so the process won't run in the background. After that, you can try performing the action again and notify us about the result.
Thanks.
Kind regards,
Gleb.
Gleb,
Thank you for your replay.
1) Our client uses version 7.16.3 now. We have tested this process on version 7.18.5 (but only on our environment) - it works correctly. Also we have similar process on 7.13.2 - it also works correctly. But I am not sure if environment configurations are the same.
Besides, it would be nice to resolve this issue without upgrade now.
2) We've set 'Run in background' to off. In that case process starts correctly, but there is another problem - some values of Lead are not available in the process (e.g. default values from Landing page are not set yet). So, this solution doesn't fit our case. (I've described this in p.2 with timer)
Vladimir Sokolov,
thank you for the additional information.
Unfortunately, there might be quite a lot of reasons for the missing values in Lead (e.g. access rights, configuration, etc).
We would recommend you create a separate case for the support team so that we will be able to reproduce the error on the instance.
Also, it is recommended to update to the newest version to avoid errors that were fixed in the latest updates.
Regards,
Gleb.