Skip to content

Starting input: https://... only shows for first iteration of loop #818

Closed
@e-gineer

Description

I have this input step with a loop:

  step "input" "approve" {
    notifier = notifier[param.approvers[0]]

    type = "button"

    subject = param.subject

    prompt = param.prompt

    option "approve" {
      label = "Approve"
      style = "ok"
    }

    option "deny" {
      label = "Deny"
      style = "alert"
    }

    loop {
      until = result.value == "deny" || loop.index >= length(param.approvers)
      notifier = notifier[param.approvers[loop.index]]
    }

    output "approved" {
      value = self.value == "approve"
    }

  }

It works well (I think), but the run output only shows the input URL for first iteration of the loop. It should show it (different each time of course) for each iteration of the loop:

2024-03-27 11:35:23 exec_co23peso47mt2en5rbag [approve.approve[0]] Starting input: http://localhost:7003/form/co23peso47mt2en5rbe0/0oqgj50m3e00d
2024-03-27 11:35:23 exec_co23peso47mt2en5rbag [approve.approve[0]] Arg cc = 
2024-03-27 11:35:23 exec_co23peso47mt2en5rbag [approve.approve[0]] Arg notifier = {
  "notifies": [
    {
      "integration": {
        "type": "http"
      }
    }
  ]
}
2024-03-27 11:35:23 exec_co23peso47mt2en5rbag [approve.approve[0]] Arg options = [
  {
    "label": "Approve",
    "style": "ok",
    "value": "approve"
  },
  {
    "label": "Deny",
    "style": "alert",
    "value": "deny"
  }
]
2024-03-27 11:35:23 exec_co23peso47mt2en5rbag [approve.approve[0]] Arg prompt = Should I square 2?
2024-03-27 11:35:23 exec_co23peso47mt2en5rbag [approve.approve[0]] Arg subject = Should I square 2?
2024-03-27 11:35:23 exec_co23peso47mt2en5rbag [approve.approve[0]] Arg to = 
2024-03-27 11:35:23 exec_co23peso47mt2en5rbag [approve.approve[0]] Arg type = button
2024-03-27 11:35:32 exec_co23peso47mt2en5rbag [approve.approve[0]] Attr value = approve
2024-03-27 11:35:32 exec_co23peso47mt2en5rbag [approve.approve[0]] Complete 8s
2024-03-27 11:35:32 exec_co23peso47mt2en5rbag [approve.approve[1]] Starting input: 
2024-03-27 11:35:32 exec_co23peso47mt2en5rbag [approve.approve[1]] Arg cc = 
2024-03-27 11:35:32 exec_co23peso47mt2en5rbag [approve.approve[1]] Arg notifier = {
  "notifies": [
    {
      "integration": {
        "type": "http"
      }
    }
  ]
}
2024-03-27 11:35:32 exec_co23peso47mt2en5rbag [approve.approve[1]] Arg options = [
  {
    "label": "Approve",
    "style": "ok",
    "value": "approve"
  },
  {
    "label": "Deny",
    "style": "alert",
    "value": "deny"
  }
]
2024-03-27 11:35:32 exec_co23peso47mt2en5rbag [approve.approve[1]] Arg prompt = Should I square 2?
2024-03-27 11:35:32 exec_co23peso47mt2en5rbag [approve.approve[1]] Arg subject = Should I square 2?
2024-03-27 11:35:32 exec_co23peso47mt2en5rbag [approve.approve[1]] Arg to = 
2024-03-27 11:35:32 exec_co23peso47mt2en5rbag [approve.approve[1]] Arg type = button

Activity

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

Metadata

Assignees

No one assigned

    Labels

    blockerbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions