elsa-workflows / elsa-workflows/elsa-core
v2 Elsa Parent WF will not resume if a child workflow faults after Suspended
- Dominant language
- C#
- Stars
- 7.9k
- Forks
- 1.5k
- Avg merge
- 15h 22m
- Merged PRs (30d)
- 114
Description
## Description
When a parent workflow executes a child workflow with blocking then the child workflow sleeps and faults after resuming, the parent workflow will remain suspended.
## Steps to Reproduce
1. Import the below parent and child workflows.
2. Execute a HTTP GET /workflows/sleepychildtest
3. **Attachments**:
Parent
```json
{
"$id": "1",
"definitionId": "a0fd410f43bd4bd0b173b44a345c0e6a",
"versionId": "5b77d31aa4074e9982f404a6fbd8cef7",
"displayName": "Parent",
"version": 5,
"variables": {
"$id": "2",
"data": {}
},
"customAttributes": {
"$id": "3",
"data": {}
},
"isSingleton": false,
"persistenceBehavior": "WorkflowBurst",
"deleteCompletedInstances": false,
"isPublished": true,
"isLatest": true,
"createdAt": "2025-03-05T15:45:16.873609Z",
"activities": [
{
"$id": "4",
"activityId": "34eb1549-4264-4b09-b85d-6c67d944ddff",
"type": "RunWorkflow",
"displayName": "Run Workflow Sleepy Child",
"persistWorkflow": false,
"loadWorkflowContext": false,
"saveWorkflowContext": false,
"properties": [
{
"$id": "5",
"name": "WorkflowDefinitionId",
"expressions": {
"$id": "6",
"Literal": "0dc6e30b198647828273d49d27a5c1cc"
}
},
{
"$id": "7",
"name": "Input",
"expressions": {
"$id": "8"
}
},
{
"$id": "9",
"name": "PossibleOutcomes",
"expressions": {
"$id": "10",
"Json": "[\"This\",\"That\"]"
}
},
{
"$id": "11",
"name": "Mode",
"expressions": {
"$id": "12",
"Literal": "Blocking"
}
},
{
"$id": "13",
"name": "TenantId",
"expressions": {
"$id": "14"
}
},
{
"$id": "15",
"name": "CorrelationId",
"syntax": "JavaScript",
"expressions": {
"$id": "16",
"JavaScript": "correlationId"
}
},
{
"$id": "17",
"name": "ContextId",
"expressions": {
"$id": "18"
}
},
{
"$id": "19",
"name": "CustomAttributes",
"expressions": {
"$id": "20"
}
},
{
"$id": "21",
"name": "RetryFailedActivities",
"expressions": {
"$id": "22"
}
}
],
"propertyStorageProviders": {
"$id": "23"
}
},
{
"$id": "24",
"activityId": "3bd6d92e-a62e-4e40-b706-4f96820c8719",
"type": "WriteLine",
"displayName": "Write Line",
"persistWorkflow": false,
"loadWorkflowContext": false,
"saveWorkflowContext": false,
"properties": [
{
"$id": "25",
"name": "Text",
"expressions": {
"$id": "26",
"Literal": "This"
}
}
],
"propertyStorageProviders": {
"$id": "27"
}
},
{
"$id": "28",
"activityId": "00fea8d2-7f25-4c27-bb15-b70d67d9f30a",
"type": "WriteLine",
"displayName": "Write Line",
"persistWorkflow": false,
"loadWorkflowContext": false,
"saveWorkflowContext": false,
"properties": [
{
"$id": "29",
"name": "Text",
"expressions": {
"$id": "30",
"Literal": "That"
}
}
],
"propertyStorageProviders": {
"$id": "31"
}
},
{
"$id": "32",
"activityId": "260056f6-f0c5-40a0-98cd-e21660fc53b6",
"type": "WriteLine",
"displayName": "Write Line",
"persistWorkflow": false,
"loadWorkflowContext": false,
"saveWorkflowContext": false,
"properties": [
{
"$id": "33",
"name": "Text",
"expressions": {
"$id": "34",
"Literal": "Done"
}
}
],
"propertyStorageProviders": {
"$id": "35"
}
},
{
"$id": "36",
"activityId": "8bc01856-18bc-4c88-ad8e-a35e483938f3",
"type": "HttpEndpoint",
"displayName": "HTTP Endpoint",
"persistWorkflow": false,
"loadWorkflowContext": false,
"saveWorkflowContext": false,
"properties": [
{
"$id": "37",
"name": "Path",
"expressions": {
"$id": "38",
"Literal": "/sleepychildtest"
}
},
{
"$id": "39",
"name": "Methods",
"expressions": {
"$id": "40",
"Json": "[\"GET\"]"
}
},
{
"$id": "41",
"name": "ReadContent",
"expressions": {
"$id": "42"
}
},
{
"$id": "43",
"name": "TargetType",
"expressions": {
"$id": "44"
}
},
{
"$id": "45",
"name": "Schema",
"syntax": "Literal",
"expressions": {
"$id": "46",
"Literal": ""
}
},
{
"$id": "47",
"name": "Authorize",
"expressions": {
"$id": "48"
}
},
{
"$id": "49",
"name": "Policy",
"expressions": {
"$id": "50"
}
},
{
"$id": "51",
"name": "AuthorizeWithCustomHeader",
"expressions": {
"$id": "52"
}
},
{
"$id": "53",
"name": "CustomHeaderName",
"expressions": {
"$id": "54"
}
},
{
"$id": "55",
"name": "CustomHeaderValue",
"expressions": {
"$id": "56"
}
}
],
"propertyStorageProviders": {
"$id": "57"
}
}
],
"connections": [
{
"$id": "58",
"sourceActivityId": "34eb1549-4264-4b09-b85d-6c67d944ddff",
"targetActivityId": "3bd6d92e-a62e-4e40-b706-4f96820c8719",
"outcome": "This"
},
{
"$id": "59",
"sourceActivityId": "34eb1549-4264-4b09-b85d-6c67d944ddff",
"targetActivityId": "00fea8d2-7f25-4c27-bb15-b70d67d9f30a",
"outcome": "That"
},
{
"$id": "60",
"sourceActivityId": "34eb1549-4264-4b09-b85d-6c67d944ddff",
"targetActivityId": "260056f6-f0c5-40a0-98cd-e21660fc53b6",
"outcome": "Done"
},
{
"$id": "61",
"sourceActivityId": "8bc01856-18bc-4c88-ad8e-a35e483938f3",
"targetActivityId": "34eb1549-4264-4b09-b85d-6c67d944ddff",
"outcome": "Done"
}
],
"id": "5b77d31aa4074e9982f404a6fbd8cef7"
}
```
Sleepy Child
```json
{
"$id": "1",
"definitionId": "0dc6e30b198647828273d49d27a5c1cc",
"versionId": "84dd7be866e3493d81222c043a7e3534",
"displayName": "Sleepy Child",
"version": 11,
"variables": {
"$id": "2",
"data": {}
},
"customAttributes": {
"$id": "3",
"data": {}
},
"isSingleton": false,
"persistenceBehavior": "WorkflowBurst",
"deleteCompletedInstances": false,
"isPublished": true,
"isLatest": true,
"createdAt": "2025-03-05T15:45:50.567773Z",
"activities": [
{
"$id": "4",
"activityId": "4fd80b7d-770f-4663-ad89-b9827104ce68",
"type": "Timer",
"displayName": "Timer causing 10s sleep",
"persistWorkflow": false,
"loadWorkflowContext": false,
"saveWorkflowContext": false,
"properties": [
{
"$id": "5",
"name": "Timeout",
"expressions": {
"$id": "6",
"Literal": "00:00:00:10"
}
}
],
"propertyStorageProviders": {
"$id": "7"
}
},
{
"$id": "8",
"activityId": "e73c7805-b40c-4f1b-a77e-5dec44395b7d",
"type": "WriteLine",
"displayName": "Write Line",
"persistWorkflow": false,
"loadWorkflowContext": false,
"saveWorkflowContext": false,
"properties": [
{
"$id": "9",
"name": "Text",
"expressions": {
"$id": "10",
"JavaScript": "",
"Literal": "Getting sleepy"
}
}
],
"propertyStorageProviders": {
"$id": "11"
}
},
{
"$id": "12",
"activityId": "0b55d90b-92b8-4912-8f38-4e88c488739c",
"type": "Fault",
"displayName": "Fault",
"persistWorkflow": false,
"loadWorkflowContext": false,
"saveWorkflowContext": false,
"properties": [
{
"$id": "13",
"name": "Message",
"expressions": {
"$id": "14",
"Literal": "Good bye"
}
}
],
"propertyStorageProviders": {
"$id": "15"
}
}
],
"connections": [
{
"$id": "16",
"sourceActivityId": "e73c7805-b40c-4f1b-a77e-5dec44395b7d",
"targetActivityId": "4fd80b7d-770f-4663-ad89-b9827104ce68",
"outcome": "Done"
},
{
"$id": "17",
"sourceActivityId": "4fd80b7d-770f-4663-ad89-b9827104ce68",
"targetActivityId": "0b55d90b-92b8-4912-8f38-4e88c488739c",
"outcome": "Done"
}
],
"id": "84dd7be866e3493d81222c043a7e3534"
}
```
4. **Reproduction Rate**: 100%
## Expected Behavior
The child workflow faulting after resuming should also fault the parent workflow or at very least resume.
## Actual Behavior
The Resumed child workflow which then faults leaves the parent workflow in a suspended state
## Screenshots
Both Parent and Sleepy Child workflow suspended

Suspended Parent with Faulted Child

## Environment
- **Elsa Package Version**: v2.14
- **Operating System**: Windows
- **Browser and Version**: Edge vLatest
Contributor guide
Assessment
This issue has not been assessed yet.