Looking good :+1: You are solving something that I was struggling with...

The code as written may not reset the @in_task variable if an exception occurred while processing the task. I see 2 possible solution:

1. Move the ```@in_task = false``` before the rescues on line 144 in an ensure block. It would look like:

```ruby

rescue ...
rescue ...
ensure
  @in_task = false
end
```

A more Ruby-like approach would be for ```task_lock!``` to accept a block:

```ruby
def task_lock!
  @in_task = true
  yield
ensure
  @in_task = false
end
```

You would then change your call to:

```ruby
task_lock! do
  # do the work...
end
```

You would not need to reset the flag on lines 144-145.

The same comments would apply to your changes in the ```workflow.rb``` file...