Comments (3)
Based on the information provided and the related issues from the Elsa GitHub repository, it seems that the problem you are experiencing with the WriteHttpResponse
activity entering a suspended state when triggered by a cron job is related to the HTTP context not being available when the workflow is resumed from a background job.
In the context of HTTP workflows, the WriteHttpResponse
activity expects an HTTP context to be present so it can write the response back to the client. However, when a workflow is triggered by a cron job or an event that does not originate from an HTTP request, there is no HTTP context available. This is why the activity goes into a suspended state, as it's waiting for an HTTP context to become available, which never happens in the case of cron-triggered workflows.
To resolve this issue, you would need to ensure that the WriteHttpResponse
activity is only used in workflows that are triggered by HTTP requests, or you would need to modify the workflow design to not rely on HTTP context when triggered by cron jobs or events.
For workflows that need to perform actions in the background and then respond to an HTTP request, you might consider splitting the workflow into two parts: one that handles the background processing and another that handles the HTTP response. This way, the HTTP response part of the workflow is only executed in the context of an HTTP request.
If you need further assistance with this issue, you may want to reach out to the Elsa community or maintainers for more specific guidance or to check if there have been any updates or workarounds since the last known issues.
This comment was generated by Glime.
from elsa-core.
Hey, thanks, Glime-AI. But in my case, the workflow is triggered and not resumed. So, a new instance is started, and therefore, a new HttpContext should exist.
from elsa-core.
Hello,
When you manually start the Workflow, it's using an Http API and so you will have an HttpContext.
But when you start your workflow from trigger or event, you will not have any HttpContext because the Workflow is started/resume from background service.
from elsa-core.
Related Issues (20)
- ELSA 3.1.3 Getting Error when i call get /workflow-definitions endpoint HOT 2
- [BUG] MassTransit DisableConsumers Fails to Properly Disable Consumers and Disables Necessary Consumers HOT 1
- [CHORE] Elsa 3.0 设计器中 Fork的属性Branches如何设置? HOT 1
- [ENH] Enable External Interaction with Publish Event and Event Activities HOT 1
- [BUG] FailedToConnect activity in SendHttpRequest is not executed HOT 3
- [BUG] Race condition in Bookmark Management HOT 3
- [BUG] Mixed Content block after deployed to kubernetes HOT 2
- [BUG] Duplicate executions when using the default scheduling provider in single-node environment HOT 1
- [ENH] Add File Download Capability to SendHttpRequest Activity HOT 1
- [BUG]An unhandled error has occurred. Reload HOT 2
- [BUG] ELSA 3.2 rc1 with latest studio. Null reference exception when editing JavaScript expressions HOT 3
- [CHORE] Is there an example of Elsa 3.0 implementing various activities in designer mode? Thank you.
- [BUG]Is there an example of Elsa 3.0 implementing various activities in designer mode? Thank you. HOT 2
- [BUG]在Elsa 3.1.3设计器中If活动为啥有一个属性Condition,却没有Then和Else属性? HOT 2
- [BUG]Why is the If activity in designer 3.1.3 only having the Condition attribute and not the Then and Else attributes? HOT 1
- [BUG] Elsa 3.1 Fork activity wrong status HOT 1
- [BUG] I Set activity Finish after for loop break but it still call httprequest again HOT 2
- [ENH] Add UseMySql parameter HOT 6
- [BUG] Temporary Azure Service Bus subscriptions are not being deleted HOT 1
- [CHORE] Resolve Warnings HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elsa-core.