I am not particular sure where to file this one, so I will just file it here, in the ruote 'core'.
I have a Rails application with Ruote and a ruote-mon storage. In my process, a reminder is sent x-days after some participant in the flow has done her job.
The short version of the pdef looks something like:
class MyParticipant < Ruote::Participant
def on_workitem
# ...
workitem.fields['reminder'] = 20.days.from_now
end
end
This fails because I use ruote-mon. BSON does not play nice with the ActiveSupport::TimeWithZone, and only accepts 20.days.from_now.utc. That is fine by me, I do not expect the storage layer of ruote to handle with such detail.
When using the time as .utc, the final string in the reminder field turns into: '2013-02-08T17:36:10Z' - which raises
ArgumentError: cannot parse '2013-02-08T17:36:10Z'
from /.../ruby/1.9.1/gems/rufus-scheduler-2.0.17/lib/rufus/sc/rtime.rb:139:in `parse_time_string'
from /.../ruby/1.9.1/gems/ruote-2.3.0.2/lib/ruote/util/time.rb:78:in `s_to_at'
from /.../ruby/1.9.1/gems/ruote-2.3.0.2/lib/ruote/storage/base.rb:343:in `prepare_schedule_doc'
from /.../ruby/1.9.1/gems/ruote-2.3.0.2/lib/ruote/storage/base.rb:198:in `put_schedule'
... etc. etc ...
(tell me if you need more)
I believe that this notation is a viable, parsable string representation of a time that ruote (or rufus) should parse
I am not particular sure where to file this one, so I will just file it here, in the ruote 'core'.
I have a Rails application with Ruote and a ruote-mon storage. In my process, a reminder is sent x-days after some participant in the flow has done her job.
The short version of the pdef looks something like:
and my first-stab-at-a participant looked like:
This fails because I use ruote-mon. BSON does not play nice with the ActiveSupport::TimeWithZone, and only accepts
20.days.from_now.utc
. That is fine by me, I do not expect the storage layer of ruote to handle with such detail.When using the time as .utc, the final string in the reminder field turns into: '2013-02-08T17:36:10Z' - which raises
(tell me if you need more)
I believe that this notation is a viable, parsable string representation of a time that ruote (or rufus) should parse
As a work-around I am now using strftime;