[akka-user] Re: FSM, how to make stateTimeout relative?

2017-11-02 Thread Alexandr Sova
Should be pointed to RTFM. There is a method `forMax` that can set different timeout for particular state changes. I knew I'm missing something. Now I have different problem: how can I test that timeout occur with PersistentFSM? I can't use TestFSMRef because it's not FSM, it's PersistentFSM

[akka-user] Re: FSM, how to make stateTimeout relative?

2017-11-02 Thread Alexandr Sova
Yeah, I'm doing such thing at system.dispatcher.scheduleOnce but if I'd use this at when(state, duration) wouldn't duration be computed only at Actor start/creation? Even lazy may not be helpful because it'll compute only once and will return the same value again and again. On Thursday,

[akka-user] Re: FSM, how to make stateTimeout relative?

2017-11-01 Thread Christopher Hunt
Perhaps something like this in order to get your FiniteDuration: Duration.ofMillis( ChronoUnit.MILLIS.between( ZonedDateTime.parse("2007-12-03T10:15:30+01:00[Europe/Paris]"), ZonedDateTime.now ) ) -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: