Skip to content

Java defined WFs tasks are serialized without the call field #1553

Description

@fantonangeli

What happened:
Workflows defined through the Java SDK are serialized without the call field.

As a result, the TypeScript SDK returns the following error:

Unable to defined task type of task named 'findPetByStatus'

The generated task contains this:

{
  "findPetByStatus": {
    "with": {
      "document": {
        "endpoint": "openapi/petstore.json"
      },
      "operationId": "findPetsByStatus",
      "parameters": {
        "status": "sold"
      }
    }
  }
}

The serialized task should also contain:

"call": "openapi"

Example:

{
  "findPetByStatus": {
    "call": "openapi",
    "with": {
      "document": {
        "endpoint": "openapi/petstore.json"
      },
      "operationId": "findPetsByStatus",
      "parameters": {
        "status": "sold"
      }
    }
  }
}

What you expected to happen:
OpenAPI tasks defined through the Java SDK should be serialized with:

"call": "openapi"

The resulting workflow should be valid according to the DSL and should be correctly recognized by the TypeScript SDK.

How to reproduce it:
Use the Quarkus Flow Petstore example:

https://github.com/quarkiverse/quarkus-flow/tree/main/examples/petstore-openapi

  1. Run the petstore-openapi example.

  2. Open:

    http://localhost:8080/q/dev-ui/quarkus-flow/workflows
    
  3. Open the workflow diagram by clicking the eye icon.

  4. Observe that the diagram cannot be rendered and the TypeScript SDK reports:

    Unable to defined task type of task named 'findPetByStatus'
    

Anything else we need to know?:
This deployment of the DiagramEditor can be used for a final check to test that the generated workflow is accepted by the typescript-sdk:
https://deploy-preview-274--openworkflow-editor.netlify.app/?path=/story/diagram-editor--component

Environment:

  • Specification version used: 1.0.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions