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

VS Code: unnecessary cross for the Serverless workflow diagram #2221

Open
shootsoft opened this issue Mar 28, 2024 · 1 comment
Open

VS Code: unnecessary cross for the Serverless workflow diagram #2221

shootsoft opened this issue Mar 28, 2024 · 1 comment

Comments

@shootsoft
Copy link

In some cases, the rendered Serverless workflow diagram has unnecessary cross

vscode-bug

Example Serverless workflow

id: VSCodeUnecessaryCorssCross
specVersion: "0.8"
version: "1.0"
name: test
description: show the unnecessary cross issue
start: StartAction

functions:
  - name: log
    type: custom
    operation: sysout:INFO

events:
  - name: BeginEvent
    source: ""
    type: begin-event
  - name: ChangeEvent
    source: ""
    type: change-event


states:
  - name: StartAction
    type: event
    onEvents:
      - eventRefs:
          - begin-event
        actions:
          - name: begin
            functionRef:
              refName: log
              arguments:
                message: Start executing
    transition: parallelCreation

  - name: parallelCreation
    type: parallel
    branches:
      - name: create1
        actions:
          - functionRef:
              refName: log
              arguments:
                message: Creating1
      - name: create2
        actions:
          - functionRef:
              refName: log
              arguments:
                message: Creating2
    numCompleted: "2"
    transition: next

  - name: next
    type: operation
    actions:
      - functionRef:
          refName: log
          arguments:
            message: finishing
    end: true

  - name: changeEvent
    type: event
    onEvents:
      - eventRefs:
          - ChangeEvent
        actions:
          - functionRef:
              refName: log
              arguments:
                message: changing
    transition: hasFlag

  - name: hasFlag
    type: switch
    dataConditions:
      - name: Checking if there is falg.
        condition: .hasFlag
        transition: hasFlagYes
    defaultCondition:
      transition: hasFlagNo

  - name: hasFlagYes
    type: operation
    actions:
      - functionRef:
          refName: log
          arguments:
            message: Has flag
    end: true

  - name: hasFlagNo
    type: operation
    actions:
      - functionRef:
          refName: log
          arguments:
            message: Has no falg.
    end: true
@shootsoft
Copy link
Author

Expected https://serverlessworkflow.io/editor

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant