{"action":"created","issue":{"url":"https://api.github.com/repos/akka/akka/issues/16255","labels_url":"https://api.github.com/repos/akka/akka/issues/16255/labels{/name}","comments_url":"https://api.github.com/repos/akka/akka/issues/16255/comments","events_url":"https://api.github.com/repos/akka/akka/issues/16255/events","html_url":"https://github.com/akka/akka/pull/16255","id":48200620,"number":16255,"title":"+per #15279 FSM for PersistentActor","user":{"login":"leonidb","id":2226323,"avatar_url":"https://avatars.githubusercontent.com/u/2226323?v=3","gravatar_id":"","url":"https://api.github.com/users/leonidb","html_url":"https://github.com/leonidb","followers_url":"https://api.github.com/users/leonidb/followers","following_url":"https://api.github.com/users/leonidb/following{/other_user}","gists_url":"https://api.github.com/users/leonidb/gists{/gist_id}","starred_url":"https://api.github.com/users/leonidb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonidb/subscriptions","organizations_url":"https://api.github.com/users/leonidb/orgs","repos_url":"https://api.github.com/users/leonidb/repos","events_url":"https://api.github.com/users/leonidb/events{/privacy}","received_events_url":"https://api.github.com/users/leonidb/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/akka/akka/labels/validating","name":"validating","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":42,"created_at":"2014-11-09T12:50:54Z","updated_at":"2015-01-11T23:00:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/akka/akka/pulls/16255","html_url":"https://github.com/akka/akka/pull/16255","diff_url":"https://github.com/akka/akka/pull/16255.diff","patch_url":"https://github.com/akka/akka/pull/16255.patch"},"body":"Located in akka-persistence because persistence is experimental and probably should not be used in akka-actor"},"comment":{"url":"https://api.github.com/repos/akka/akka/issues/comments/69516363","html_url":"https://github.com/akka/akka/pull/16255#issuecomment-69516363","issue_url":"https://api.github.com/repos/akka/akka/issues/16255","id":69516363,"user":{"login":"leonidb","id":2226323,"avatar_url":"https://avatars.githubusercontent.com/u/2226323?v=3","gravatar_id":"","url":"https://api.github.com/users/leonidb","html_url":"https://github.com/leonidb","followers_url":"https://api.github.com/users/leonidb/followers","following_url":"https://api.github.com/users/leonidb/following{/other_user}","gists_url":"https://api.github.com/users/leonidb/gists{/gist_id}","starred_url":"https://api.github.com/users/leonidb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonidb/subscriptions","organizations_url":"https://api.github.com/users/leonidb/orgs","repos_url":"https://api.github.com/users/leonidb/repos","events_url":"https://api.github.com/users/leonidb/events{/privacy}","received_events_url":"https://api.github.com/users/leonidb/received_events","type":"User","site_admin":false},"created_at":"2015-01-11T23:00:47Z","updated_at":"2015-01-11T23:00:47Z","body":"@patriknw  thanks!\r\n\r\nI've implemented a callback block you've mentioned, here is how it looks in code:\r\n```Scala\r\ncase Event(Buy, _)  ⇒ goto(Paid) applying OrderExecuted thenDo { case NonEmptyShoppingCart(items) => reportActor ! PurchaseWasMaid(items)}\r\n```\r\n\r\nI've implemented it as a `D ⇒ Unit` function, having a state data as an argument feels useful..\r\n\r\nAfter going through a few names for this handler in DSL I've ended up with `thenDo` - looks concise and works well with the rest of the DSL, I think. Although if not used as the last statement, it won't fit in naturally.\r\n\r\nTell me what you think."}}