Aggregate filter not run at all

I'm trying to carry forward a year that is specified infrequently in my logs, and it seemed like the aggregate filter would work beautifully for this, however the filter doesn't seem to actually do anything (I've added the add_tag setting to see if the code was the only problem and the tag wasn't added either) other blocks in the same part of the conditional run fine (I get the one and two lines printed to stdout given the correct input).

if ([timestamp] !~ /.+/) {
   drop {}
} else if ([message] =~ /^started/) {
   ruby {code=>"puts 'one'"}
   aggregate {
      task_id => "%{path}"
      code => "map['year'] = Time.at(event['timestamp'].to_f).year"
      add_tag => ['hi']
   }
} else {
   ruby {code=>"puts 'two'"}
   aggregate {
      task_id => "%{path}"
       code => "event['timestamp'].gsub!(/(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)/,map['year'].to_s+' \1')"
       map_action => "update"
       add_tag => ['there']
   }
}

I'm completely stumped and hope someone can help.

I wound up using ruby blocks instead.

I have the same problem.
Have you fixed it?
Down below is my code. I have even set the task_id to 1.

if [operation] == "receive a request" {
  ruby {
    code => "
      event['here'] = 'here'

    "
  }
  aggregate {
    task_id => "1"
    code => "map['start_timestamp'] = event['@timestamp']"
    map_action => "create_or_update"
    add_tag => [ "aggregateStart" ]
  }
}
if [operation] == "send a answer" {
  ruby {
    code => "
      event['there'] = 'there'

    "
  }
  aggregate {
    task_id => "1"
    code => "event['duration'] = event['@timestamp'] - map['start_timestamp']"
    map_action => "create_or_update"
    end_of_task => true
    add_tag => [ "aggregateEnd" ]
    timeout => 120
  }
}

I got it work right.
The point is that I changed task_id to something like "%{msgid}".
So the %{msgid} being resolved correctly seems the key for aggregate to work properly.