Skip to content

Conversation

deanhannigan
Copy link
Contributor

@deanhannigan deanhannigan commented Jul 23, 2025

Description

Added a new State block to automations. Named variables can be now set in state and updated throughout the automations runtime.

  • A new State category has been added to the bindings surfacing all available state variables.
  • State can now be seen in the automation context on the bottom right of the screen.
  • FIX - Added the looping feature flag to the AI steps: Classify, Extract doc data, Generate text. In order to utilise the looping behaviour the steps will need to be recreated.
  • FIX - Fix for looping UI so that it only shows when steps are configured with the feature flag.

Screenshots

Below I have declared a variable called myVar1. In my step, Sample Step 1, I initialise the value and then update it in Sample Step 4. Before running the automation, all the State steps that modify a state variable will be listed.
Screenshot 2025-07-23 at 16 36 14

Launchcontrol

Added new state block to automations

Copy link

qa-wolf bot commented Jul 23, 2025

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

@deanhannigan deanhannigan marked this pull request as ready for review July 24, 2025 09:48
@deanhannigan deanhannigan requested a review from a team as a code owner July 24, 2025 09:48
expect(successStep.outputs.success).toBe(true)
expect(successStep.outputs.value).toBe(5)

// The failure should not cause a total automation failure
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Sam, thanks for taking a look! What I meant was that, a failure in the state block shouldn't cause any unhandled exceptions and that any state data that was correctly processed should remain intact.

Copy link
Contributor

@mike12345567 mike12345567 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for time taken to get to this - the code looks good! I had a play with it and it works the way I would expect, one thing I noticed though, the value is called "code"

image

I think Key and Value are better terms to mimic the experience we have as part of the button:
image

@mike12345567
Copy link
Contributor

I also tried using a loop with the state block and it is just saying it throws an error which is a little odd - I'll investigate this further tomorrow!

image

@github-actions github-actions bot added the stale label Aug 5, 2025
@github-actions github-actions bot removed the stale label Aug 7, 2025
Copy link
Contributor

@mike12345567 mike12345567 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gave this a test - its great! It'll be fantastic once we have the looping block in and the capability to exit branches, such a useful little utility!

Tested it with adding up array of numbers, worked really well - love it!

@deanhannigan deanhannigan merged commit d31909d into master Aug 14, 2025
30 checks passed
@deanhannigan deanhannigan deleted the feature/automation-state-block branch August 14, 2025 09:56
@github-actions github-actions bot locked and limited conversation to collaborators Aug 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants