Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix child workflow not loading custom instance content #609

Merged
merged 1 commit into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
- Improved formatting timestamps
- Fix retry on endpoint change
- Fix querying with parent instance id
- Fix loading custom instance content for child workflow

## 8.0.0 (2022-06-09)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,38 +210,26 @@ function WorkflowInstanceDetailsPage() {
getWorkflowInstance(config, id),
listChildWorkflowInstances(config, id)
]).then(([instance, childInstances]) => {
if (instance.parentWorkflowId) {
return Promise.all([
getWorkflowInstance(config, instance.parentWorkflowId),
instance.parentWorkflowId ? getWorkflowInstance(config, instance.parentWorkflowId) : Promise.resolve(undefined),
getWorkflowDefinition(config, instance.type)
]).then(([parent, definition]) => {
setDefinition(definition);
setParentInstance(parent);
setInstance(instance);
setChildInstances(childInstances);
});
}
return getWorkflowDefinition(config, instance.type)
.then(definition => {
setDefinition(definition);
setParentInstance(undefined);
setInstance(instance);
setChildInstances(childInstances);
return definition;
})
.then(definition =>
Promise.resolve(
return Promise.resolve(
config.customInstanceContent &&
config.customInstanceContent(
definition,
instance,
undefined,
childInstances
)
config.customInstanceContent(
definition,
instance,
parent,
childInstances
)
).then(content => {
setExternalContent(content);
})
);
});
});
});
}, [config, id]);

Expand Down
Loading