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

Unable to call child workflow from parent workflow #484

Open
SonaThaj opened this issue Jan 23, 2025 · 5 comments
Open

Unable to call child workflow from parent workflow #484

SonaThaj opened this issue Jan 23, 2025 · 5 comments
Assignees
Labels
app: api Concerns the API app: runner Concerns the Runner priority: high Indicates a high priority issue status: investigate An issue that needs to be investigated more thoroughly type: bug Something isn't working
Milestone

Comments

@SonaThaj
Copy link

SonaThaj commented Jan 23, 2025

I tried this:

Created 2 workflows and tried to call one from the other.

This happened:

The parent workflow faulted, saying that the child workflow could not be found.

But the child exists.

I expected this:

Flow should move from parent to child.

NB: It was working as expected in the earlier Synapse versions.

Is there a workaround?

No

Anything else?

type: https://serverlessworkflow.io/dsl/errors/types/runtime
title: Runtime Error
status: 500
detail: "[404 - Resource Admission Failed] Failed to admit operation 'create' on the specified resource 'synapse.io/v1/namespaces/synapse/workflow-instances/test-child-6421c94769cd2d28ae4b29b32806fe1d':\\r\\nnamespace: Failed to find the specified resource 'test-child-6421c94769cd2d28ae4b29b32806fe1d.synapse'."
instance: /do/0/testsubFlow

Platform(s)

Windows

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.name: Bug Report 🐞
@SonaThaj SonaThaj added the type: bug Something isn't working label Jan 23, 2025
@cdavernas
Copy link
Member

@SonaThaj I guess you mean workflow, not function?

@SonaThaj SonaThaj changed the title Unable to call child function from parent function Unable to call child workflow from parent workflow Jan 23, 2025
@SonaThaj
Copy link
Author

@SonaThaj I guess you mean workflow, not function?

Sorry, yes, workflow. I have made the edits :)

@cdavernas cdavernas added priority: high Indicates a high priority issue app: api Concerns the API app: runner Concerns the Runner status: investigate An issue that needs to be investigated more thoroughly labels Jan 23, 2025
@cdavernas cdavernas added this to the v1.0.0 milestone Jan 23, 2025
@cdavernas
Copy link
Member

cdavernas commented Jan 23, 2025

@SonaThaj I tried reproducing the error using the following definitions:

Child flow:

document:
  dsl: 1.0.0-alpha5
  namespace: default
  name: child
  version: 0.1.0
do:
- setFoo:
    set:
      foo: bar

Parent flow:

document:
  dsl: 1.0.0-alpha5
  namespace: default
  name: parent
  version: 0.1.0
do:
- runSubflow:
    run:
      workflow:
        namespace: default
        name: child
        version: 0.1.0
        input: {}

It works as expected. I'll therefore need more information to help you.

N.B.: You might see logs reporting said fault, which is due to the runner attempting to get the subflow instance to check whether it already exist, in case the calling flow and/or the subflow had been suspended.

@SonaThaj
Copy link
Author

Hi Charles,

I tried with the same parent and child flows you tried. I'm still getting the same error and I don't see any instances of the child being created. So I'm unable to verify the execution of the child from the parent.

Please find the screenshot below for the execution of the parent instance:

Image

Please fine the image below, stating the error:

Image

child workflow below:

Image

Operator image: ghcr.io/serverlessworkflow/synapse/runner:1.0.0-alpha5.11

@cdavernas
Copy link
Member

@SonaThaj Even using the Docker/Kubernetes flavor of Synapse (v1.0.0-alpha5.12), I just can't reproduce your issue 😢 I'm starting to run out of ideas...

@cdavernas cdavernas self-assigned this Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app: api Concerns the API app: runner Concerns the Runner priority: high Indicates a high priority issue status: investigate An issue that needs to be investigated more thoroughly type: bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

2 participants