Comments (8)
@kaibocai Do you have any ETA on this?
from durabletask-java.
Hi @kanupriya15025 , sorry for the delay. Based on my research, I don't think we currently support querying status while the orchestration is still running. This may be an improvement we can add in the future.
@cgillum, @davidmrdavid have you ever gotten customers asking for a feature like this?
from durabletask-java.
I know there's a showHistory flag which returns the history of what is happening with my orchestration, but I want to store some custom activity status messages after each completion.
We don't have the ability to store custom status for activity results, unfortunately. Just the activity output. I'm not sure if it makes sense for this to be a feature of Durable Functions, or if it's better to do that in some external storage.
The output is returned in the API once the entire orchestration completes, but I need to get partial statuses even if the orchestration is running. Is there a way to achieve that?
It should be possible to query orchestration history even when the orchestration is still running. Is that not the case from what you're seeing?
from durabletask-java.
@cgillum @kaibocai
By custom status, I meant the task output itself. In a case, where an activity takes too long to complete due to some error, the entire output of previous tasks is stalled in that case.
It is possible to query history table but querying the history can be slow as it is huge. If this can be embedded as a response in the /instances API, it would make it quicker, easier and more intuitive.
from durabletask-java.
In a case, where an activity takes too long to complete due to some error, the entire output of previous tasks is stalled in that case.
You should be able to get the output of previously completed tasks of a running orchestration already. Can you provide an example of where this is not the case for you?
It is possible to query history table but querying the history can be slow as it is huge. If this can be embedded as a response in the /instances API, it would make it quicker, easier and more intuitive.
This is already possible with the HTTP API: https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-http-api#get-instance-status. Something like this should work:
GET /runtime/webhooks/durabletask/instances/abc123?showHistory=true&showHistoryOutput=true
Field | Parameter type | Description |
---|---|---|
showHistory | Query string | Optional parameter. If set to true, the orchestration execution history will be included in the response payload. |
showHistoryOutput | Query string | Optional parameter. If set to true, the function outputs will be included in the orchestration execution history. |
from durabletask-java.
@cgillum Is this the field you are aiming at - "output"?
Here's a response where I can see a few activities completed but the output is still null. This only populates when all the activities complete.
{
"name": "WorkflowOrchestrator",
"instanceId": "instanceId",
"runtimeStatus": "Running",
"input": {
"input" : "someInput"
},
"customStatus": "",
"output": null,
"createdTime": "2023-10-05T08:20:14Z",
"lastUpdatedTime": "2023-10-05T08:20:35Z",
"historyEvents": [
{
"EventType": "ExecutionStarted",
"Input": "SomeInput,
"Correlation": null,
"ScheduledStartTime": null,
"Generation": 0,
"Timestamp": "2023-10-05T08:20:14.576414Z",
"FunctionName": "WorkflowOrchestrator"
},
{
"EventType": "TaskCompleted",
"Result": "{\"testTask1\":{\"startDate\":\"2023-10-05T08:20:17.399572\",\"firstTask\":{\"status_code\":500,\"reason\":\"Internal Server Error\",\"headers\":\"[Lorg.apache.http.Header;@33ad2eb2\",\"body\":\"org.apache.http.impl.io.EmptyInputStream@180fb89\"},\"state\":\"SUCCESS\",\"endDate\":\"2023-10-05T08:20:18.583269\"}}",
"Timestamp": "2023-10-05T08:20:18.843449Z",
"ScheduledTime": "2023-10-05T13:50:16.908051+05:30",
"FunctionName": "AEPHTTPPollingOperator",
"Input": null
},
{
"EventType": "TimerCreated",
"FireAt": "2023-10-05T08:20:24.893Z",
"Timestamp": "2023-10-05T08:20:19.919621Z"
},
{
"EventType": "TimerFired",
"FireAt": "2023-10-05T08:20:24.893Z",
"Timestamp": "2023-10-05T08:20:19.919683Z"
},
{
"EventType": "TaskCompleted",
"Result": "{\"testTask1\":{\"startDate\":\"2023-10-05T08:20:17.399572\",\"firstTask\":{\"status_code\":500,\"reason\":\"Internal Server Error\",\"headers\":\"[Lorg.apache.http.Header;@33ad2eb2\",\"body\":\"org.apache.http.impl.io.EmptyInputStream@180fb89\"},\"state\":\"SUCCESS\",\"endDate\":\"2023-10-05T08:20:18.583269\"},\"testTask2\":{\"startDate\":\"2023-10-05T08:20:26.186607\",\"firstTask\":{\"status_code\":500,\"reason\":\"Internal Server Error\",\"headers\":\"[Lorg.apache.http.Header;@6526546a\",\"body\":\"org.apache.http.impl.io.EmptyInputStream@180fb89\"},\"state\":\"SUCCESS\",\"endDate\":\"2023-10-05T08:20:27.304066\"}}",
"Timestamp": "2023-10-05T08:20:28.005728Z",
"ScheduledTime": "2023-10-05T13:50:25.686154+05:30",
"FunctionName": "AEPHTTPPollingOperator",
"Input": null
},
{
"EventType": "TimerCreated",
"FireAt": "2023-10-05T08:20:34.153Z",
"Timestamp": "2023-10-05T08:20:29.186666Z"
},
{
"EventType": "TimerFired",
"FireAt": "2023-10-05T08:20:34.153Z",
"Timestamp": "2023-10-05T08:20:29.186671Z"
},
{
"EventType": "TaskScheduled",
"Name": "AEPHTTPPollingOperator",
"Input": null,
"Timestamp": "2023-10-05T08:20:35.579164Z"
}
]
}
from durabletask-java.
@kanupriya15025 I'm able to see the activity output in the Result
properties of the TaskCompleted
events:
{
"EventType": "TaskCompleted",
"Result": "{\"testTask1\":{\"startDate\":\"2023-10-05T08:20:17.399572\",\"firstTask\":{\"status_code\":500,\"reason\":\"Internal Server Error\",\"headers\":\"[Lorg.apache.http.Header;@33ad2eb2\",\"body\":\"org.apache.http.impl.io.EmptyInputStream@180fb89\"},\"state\":\"SUCCESS\",\"endDate\":\"2023-10-05T08:20:18.583269\"}}",
"Timestamp": "2023-10-05T08:20:18.843449Z",
"ScheduledTime": "2023-10-05T13:50:16.908051+05:30",
"FunctionName": "AEPHTTPPollingOperator",
"Input": null
},
...
{
"EventType": "TaskCompleted",
"Result": "{\"testTask1\":{\"startDate\":\"2023-10-05T08:20:17.399572\",\"firstTask\":{\"status_code\":500,\"reason\":\"Internal Server Error\",\"headers\":\"[Lorg.apache.http.Header;@33ad2eb2\",\"body\":\"org.apache.http.impl.io.EmptyInputStream@180fb89\"},\"state\":\"SUCCESS\",\"endDate\":\"2023-10-05T08:20:18.583269\"},\"testTask2\":{\"startDate\":\"2023-10-05T08:20:26.186607\",\"firstTask\":{\"status_code\":500,\"reason\":\"Internal Server Error\",\"headers\":\"[Lorg.apache.http.Header;@6526546a\",\"body\":\"org.apache.http.impl.io.EmptyInputStream@180fb89\"},\"state\":\"SUCCESS\",\"endDate\":\"2023-10-05T08:20:27.304066\"}}",
"Timestamp": "2023-10-05T08:20:28.005728Z",
"ScheduledTime": "2023-10-05T13:50:25.686154+05:30",
"FunctionName": "AEPHTTPPollingOperator",
"Input": null
},
from durabletask-java.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
from durabletask-java.
Related Issues (20)
- Durable Task Client Wait for Instance Completion Failure - UNKOWN HOT 1
- Add async API via Project Reactor HOT 5
- Add functionality to restrict number of parallel runs for a workflow HOT 2
- Incorrect retry count returned in case of Activity Function HOT 4
- Error querying Instance Table from function HOT 2
- Handlings errors from activity functions when fan-out/fan-in pattern is used HOT 11
- Enhanced capabilities for Azure Monitor metrics for functions HOT 1
- Throwing OrchestratorBlockedException from finally block to handle any exception without interrupting orchestration flow HOT 2
- Vulnerability issue
- protobuf-java CVE
- Fan-out/ Fan-in Pattern | Access output of successful tasks HOT 1
- Eternal Orchestrator is replaying external event infinitely HOT 1
- Deserialize Exception got swallowed when use `anyOf` with external event.
- Loop inside orchestration causing external events being ignored? HOT 1
- Should we have timeout paramter for `PurgeInstanceCriteria`? HOT 2
- Support orchestration ID reuse policy
- GRPC error when calling DurableClientContext.getClient
- String parameters enclosed in quotes in activity functions HOT 1
- Custom Durable Entities implementation HOT 5
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 durabletask-java.