{"action":"created","issue":{"url":"https://api.github.com/repos/SpineEventEngine/core-java/issues/632","repository_url":"https://api.github.com/repos/SpineEventEngine/core-java","labels_url":"https://api.github.com/repos/SpineEventEngine/core-java/issues/632/labels{/name}","comments_url":"https://api.github.com/repos/SpineEventEngine/core-java/issues/632/comments","events_url":"https://api.github.com/repos/SpineEventEngine/core-java/issues/632/events","html_url":"https://github.com/SpineEventEngine/core-java/issues/632","id":280199555,"node_id":"MDU6SXNzdWUyODAxOTk1NTU=","number":632,"title":"Simplify the command router construction for `ProcessManager`s","user":{"login":"dmdashenkov","id":18305364,"node_id":"MDQ6VXNlcjE4MzA1MzY0","avatar_url":"https://avatars1.githubusercontent.com/u/18305364?v=4","gravatar_id":"","url":"https://api.github.com/users/dmdashenkov","html_url":"https://github.com/dmdashenkov","followers_url":"https://api.github.com/users/dmdashenkov/followers","following_url":"https://api.github.com/users/dmdashenkov/following{/other_user}","gists_url":"https://api.github.com/users/dmdashenkov/gists{/gist_id}","starred_url":"https://api.github.com/users/dmdashenkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmdashenkov/subscriptions","organizations_url":"https://api.github.com/users/dmdashenkov/orgs","repos_url":"https://api.github.com/users/dmdashenkov/repos","events_url":"https://api.github.com/users/dmdashenkov/events{/privacy}","received_events_url":"https://api.github.com/users/dmdashenkov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-12-07T16:45:05Z","updated_at":"2018-07-17T15:49:07Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Currently, to create a `CommandRouter` in a `ProcessManger` the user has to do following:\r\n```java\r\n@Assign\r\nCommandRouted on(MyCommand message, CommandContext context) {\r\n    // Create new command messages here.\r\n    return newRouterFor(message, context)\r\n            .add(messageOne)\r\n            .add(messageTwo)\r\n            .routeAll();\r\n}\r\n```\r\nThe issue here is that we know both the `message` and `context` when calling this command handler and there is no reason to make the user specify them explicitly.\r\n\r\nMoreover, sometimes, the `CommandContext` argument would be redundant if it's not for the `newRouterFor(Message, CommandCotext)` method.\r\n\r\nIt might be better to hide these arguments from the users and allow them to create instances of `CommandRouter` as `newRouter()`.\r\nSame applies to the `newIteratingRouterFor(Message, CommandCotext)` method."},"comment":{"url":"https://api.github.com/repos/SpineEventEngine/core-java/issues/comments/405631211","html_url":"https://github.com/SpineEventEngine/core-java/issues/632#issuecomment-405631211","issue_url":"https://api.github.com/repos/SpineEventEngine/core-java/issues/632","id":405631211,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTYzMTIxMQ==","user":{"login":"armiol","id":82468,"node_id":"MDQ6VXNlcjgyNDY4","avatar_url":"https://avatars0.githubusercontent.com/u/82468?v=4","gravatar_id":"","url":"https://api.github.com/users/armiol","html_url":"https://github.com/armiol","followers_url":"https://api.github.com/users/armiol/followers","following_url":"https://api.github.com/users/armiol/following{/other_user}","gists_url":"https://api.github.com/users/armiol/gists{/gist_id}","starred_url":"https://api.github.com/users/armiol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/armiol/subscriptions","organizations_url":"https://api.github.com/users/armiol/orgs","repos_url":"https://api.github.com/users/armiol/repos","events_url":"https://api.github.com/users/armiol/events{/privacy}","received_events_url":"https://api.github.com/users/armiol/received_events","type":"User","site_admin":false},"created_at":"2018-07-17T15:49:07Z","updated_at":"2018-07-17T15:49:07Z","author_association":"CONTRIBUTOR","body":"@alexander-yevsyukov this issue may also be affected by your planned changes to command routing from a `ProcessManager`."}}
{"actor":{"display_login":"armiol"}}