{"action":"created","comment":{"url":"https://api.github.com/repos/kiegroup/drools/pulls/comments/211646885","pull_request_review_id":148112742,"id":211646885,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTY0Njg4NQ==","diff_hunk":"@@ -0,0 +1,87 @@\n+/*\n+ * Copyright 2016 Red Hat, Inc. and/or its affiliates.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *       http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package org.kie.dmn.backend.marshalling.v1_2.xstream;\n+\n+import com.thoughtworks.xstream.XStream;\n+import com.thoughtworks.xstream.converters.MarshallingContext;\n+import com.thoughtworks.xstream.io.HierarchicalStreamReader;\n+import com.thoughtworks.xstream.io.HierarchicalStreamWriter;\n+import org.kie.dmn.model.api.DMNElementReference;\n+import org.kie.dmn.model.api.DMNModelInstrumentedBase;\n+import org.kie.dmn.model.api.InformationRequirement;\n+import org.kie.dmn.model.v1_2.TInformationRequirement;\n+\n+public class InformationRequirementConverter extends DMNElementConverter {\n+\n+    private static final String REQUIRED_INPUT    = \"requiredInput\";\n+    private static final String REQUIRED_DECISION = \"requiredDecision\";\n+\n+    public InformationRequirementConverter(XStream xstream) {\n+        super( xstream );\n+    }\n+\n+    public boolean canConvert(Class clazz) {\n+        return clazz.equals(TInformationRequirement.class);\n+    }\n+\n+    @Override\n+    protected void assignChildElement(Object parent, String nodeName, Object child) {\n+        InformationRequirement ir = (InformationRequirement) parent;\n+        \n+        if ( REQUIRED_INPUT.equals( nodeName ) ) {\n+            ir.setRequiredInput( (DMNElementReference) child );\n+        } else if ( REQUIRED_DECISION.equals( nodeName ) ) {\n+            ir.setRequiredDecision( (DMNElementReference) child );\n+        } else {\n+            super.assignChildElement( parent, nodeName, child );\n+        }\n+    }\n+\n+    @Override\n+    protected void assignAttributes(HierarchicalStreamReader reader, Object parent) {\n+        super.assignAttributes( reader, parent );\n+    }\n+\n+    @Override\n+    protected DMNModelInstrumentedBase createModelObject() {\n+        return new TInformationRequirement();\n+    }\n+\n+    @Override\n+    protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {\n+        super.writeChildren(writer, context, parent);\n+        InformationRequirement ir = (InformationRequirement) parent;\n+        \n+        if ( ir.getRequiredDecision() != null ) {\n+            writeChildrenNode(writer, context, ir.getRequiredDecision(), REQUIRED_DECISION);\n+        }\n+        // TODO or if else ?","path":"kie-dmn/kie-dmn-backend/src/main/java/org/kie/dmn/backend/marshalling/v1_2/xstream/InformationRequirementConverter.java","position":72,"original_position":72,"commit_id":"8287d33c003418456bc3cea1c8c15b4d01e3d1fd","original_commit_id":"8287d33c003418456bc3cea1c8c15b4d01e3d1fd","user":{"login":"tarilabs","id":1699252,"node_id":"MDQ6VXNlcjE2OTkyNTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1699252?v=4","gravatar_id":"","url":"https://api.github.com/users/tarilabs","html_url":"https://github.com/tarilabs","followers_url":"https://api.github.com/users/tarilabs/followers","following_url":"https://api.github.com/users/tarilabs/following{/other_user}","gists_url":"https://api.github.com/users/tarilabs/gists{/gist_id}","starred_url":"https://api.github.com/users/tarilabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarilabs/subscriptions","organizations_url":"https://api.github.com/users/tarilabs/orgs","repos_url":"https://api.github.com/users/tarilabs/repos","events_url":"https://api.github.com/users/tarilabs/events{/privacy}","received_events_url":"https://api.github.com/users/tarilabs/received_events","type":"User","site_admin":false},"body":"done on both versions.","created_at":"2018-08-21T15:18:04Z","updated_at":"2018-08-21T15:18:04Z","html_url":"https://github.com/kiegroup/drools/pull/2018#discussion_r211646885","pull_request_url":"https://api.github.com/repos/kiegroup/drools/pulls/2018","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/kiegroup/drools/pulls/comments/211646885"},"html":{"href":"https://github.com/kiegroup/drools/pull/2018#discussion_r211646885"},"pull_request":{"href":"https://api.github.com/repos/kiegroup/drools/pulls/2018"}},"in_reply_to_id":211610954},"pull_request":{"url":"https://api.github.com/repos/kiegroup/drools/pulls/2018","id":208310907,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4MzEwOTA3","html_url":"https://github.com/kiegroup/drools/pull/2018","diff_url":"https://github.com/kiegroup/drools/pull/2018.diff","patch_url":"https://github.com/kiegroup/drools/pull/2018.patch","issue_url":"https://api.github.com/repos/kiegroup/drools/issues/2018","number":2018,"state":"open","locked":false,"title":"DROOLS-2832 DMN support for DMN v1.2 serialization","user":{"login":"tarilabs","id":1699252,"node_id":"MDQ6VXNlcjE2OTkyNTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1699252?v=4","gravatar_id":"","url":"https://api.github.com/users/tarilabs","html_url":"https://github.com/tarilabs","followers_url":"https://api.github.com/users/tarilabs/followers","following_url":"https://api.github.com/users/tarilabs/following{/other_user}","gists_url":"https://api.github.com/users/tarilabs/gists{/gist_id}","starred_url":"https://api.github.com/users/tarilabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarilabs/subscriptions","organizations_url":"https://api.github.com/users/tarilabs/orgs","repos_url":"https://api.github.com/users/tarilabs/repos","events_url":"https://api.github.com/users/tarilabs/events{/privacy}","received_events_url":"https://api.github.com/users/tarilabs/received_events","type":"User","site_admin":false},"body":"/cc @etirelli @baldimir @jiripetrlik \r\n\r\nThe intent is for this PR to be **_squashed_** when to be merged.\r\n\r\nI'm sorry for the quite-big PR, but this was a refactor impacting several modules and couldn't be split otherwise.\r\n\r\n~~Before this to be merged, I will also need to realign the workbench's marshallers, which I'll deal with in a separate PR next.~~ done with https://github.com/kiegroup/kie-wb-common/pull/2044 .\r\n\r\nThis includes a degraded mode (DROOLS-2893) code change which is indeed meant to be squashed inside this PR; once the formal clarification on DROOLS-2893 will be completed, I can eventually manage that separately on master, by making a revert-change.","created_at":"2018-08-14T14:56:53Z","updated_at":"2018-08-21T15:18:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b553dbbea59aea287d6e903a17be8e600a901419","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/kiegroup/drools/pulls/2018/commits","review_comments_url":"https://api.github.com/repos/kiegroup/drools/pulls/2018/comments","review_comment_url":"https://api.github.com/repos/kiegroup/drools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kiegroup/drools/issues/2018/comments","statuses_url":"https://api.github.com/repos/kiegroup/drools/statuses/8287d33c003418456bc3cea1c8c15b4d01e3d1fd","head":{"label":"tarilabs:tarilabs-20180807-dmn12serialization","ref":"tarilabs-20180807-dmn12serialization","sha":"8287d33c003418456bc3cea1c8c15b4d01e3d1fd","user":{"login":"tarilabs","id":1699252,"node_id":"MDQ6VXNlcjE2OTkyNTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1699252?v=4","gravatar_id":"","url":"https://api.github.com/users/tarilabs","html_url":"https://github.com/tarilabs","followers_url":"https://api.github.com/users/tarilabs/followers","following_url":"https://api.github.com/users/tarilabs/following{/other_user}","gists_url":"https://api.github.com/users/tarilabs/gists{/gist_id}","starred_url":"https://api.github.com/users/tarilabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarilabs/subscriptions","organizations_url":"https://api.github.com/users/tarilabs/orgs","repos_url":"https://api.github.com/users/tarilabs/repos","events_url":"https://api.github.com/users/tarilabs/events{/privacy}","received_events_url":"https://api.github.com/users/tarilabs/received_events","type":"User","site_admin":false},"repo":{"id":16978837,"node_id":"MDEwOlJlcG9zaXRvcnkxNjk3ODgzNw==","name":"drools","full_name":"tarilabs/drools","owner":{"login":"tarilabs","id":1699252,"node_id":"MDQ6VXNlcjE2OTkyNTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1699252?v=4","gravatar_id":"","url":"https://api.github.com/users/tarilabs","html_url":"https://github.com/tarilabs","followers_url":"https://api.github.com/users/tarilabs/followers","following_url":"https://api.github.com/users/tarilabs/following{/other_user}","gists_url":"https://api.github.com/users/tarilabs/gists{/gist_id}","starred_url":"https://api.github.com/users/tarilabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarilabs/subscriptions","organizations_url":"https://api.github.com/users/tarilabs/orgs","repos_url":"https://api.github.com/users/tarilabs/repos","events_url":"https://api.github.com/users/tarilabs/events{/privacy}","received_events_url":"https://api.github.com/users/tarilabs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tarilabs/drools","description":"Drools Expert is the rule engine and Drools Fusion does complex event processing (CEP).","fork":true,"url":"https://api.github.com/repos/tarilabs/drools","forks_url":"https://api.github.com/repos/tarilabs/drools/forks","keys_url":"https://api.github.com/repos/tarilabs/drools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tarilabs/drools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tarilabs/drools/teams","hooks_url":"https://api.github.com/repos/tarilabs/drools/hooks","issue_events_url":"https://api.github.com/repos/tarilabs/drools/issues/events{/number}","events_url":"https://api.github.com/repos/tarilabs/drools/events","assignees_url":"https://api.github.com/repos/tarilabs/drools/assignees{/user}","branches_url":"https://api.github.com/repos/tarilabs/drools/branches{/branch}","tags_url":"https://api.github.com/repos/tarilabs/drools/tags","blobs_url":"https://api.github.com/repos/tarilabs/drools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tarilabs/drools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tarilabs/drools/git/refs{/sha}","trees_url":"https://api.github.com/repos/tarilabs/drools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tarilabs/drools/statuses/{sha}","languages_url":"https://api.github.com/repos/tarilabs/drools/languages","stargazers_url":"https://api.github.com/repos/tarilabs/drools/stargazers","contributors_url":"https://api.github.com/repos/tarilabs/drools/contributors","subscribers_url":"https://api.github.com/repos/tarilabs/drools/subscribers","subscription_url":"https://api.github.com/repos/tarilabs/drools/subscription","commits_url":"https://api.github.com/repos/tarilabs/drools/commits{/sha}","git_commits_url":"https://api.github.com/repos/tarilabs/drools/git/commits{/sha}","comments_url":"https://api.github.com/repos/tarilabs/drools/comments{/number}","issue_comment_url":"https://api.github.com/repos/tarilabs/drools/issues/comments{/number}","contents_url":"https://api.github.com/repos/tarilabs/drools/contents/{+path}","compare_url":"https://api.github.com/repos/tarilabs/drools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tarilabs/drools/merges","archive_url":"https://api.github.com/repos/tarilabs/drools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tarilabs/drools/downloads","issues_url":"https://api.github.com/repos/tarilabs/drools/issues{/number}","pulls_url":"https://api.github.com/repos/tarilabs/drools/pulls{/number}","milestones_url":"https://api.github.com/repos/tarilabs/drools/milestones{/number}","notifications_url":"https://api.github.com/repos/tarilabs/drools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tarilabs/drools/labels{/name}","releases_url":"https://api.github.com/repos/tarilabs/drools/releases{/id}","deployments_url":"https://api.github.com/repos/tarilabs/drools/deployments","created_at":"2014-02-19T09:08:38Z","updated_at":"2018-07-26T13:52:49Z","pushed_at":"2018-08-20T16:00:34Z","git_url":"git://github.com/tarilabs/drools.git","ssh_url":"git@github.com:tarilabs/drools.git","clone_url":"https://github.com/tarilabs/drools.git","svn_url":"https://github.com/tarilabs/drools","homepage":"http://www.jboss.org/drools","size":156731,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kiegroup:master","ref":"master","sha":"3a5c97fb4b7c58ced8d0fe367f8bd9f1e0ccb69b","user":{"login":"kiegroup","id":517980,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUxNzk4MA==","avatar_url":"https://avatars3.githubusercontent.com/u/517980?v=4","gravatar_id":"","url":"https://api.github.com/users/kiegroup","html_url":"https://github.com/kiegroup","followers_url":"https://api.github.com/users/kiegroup/followers","following_url":"https://api.github.com/users/kiegroup/following{/other_user}","gists_url":"https://api.github.com/users/kiegroup/gists{/gist_id}","starred_url":"https://api.github.com/users/kiegroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiegroup/subscriptions","organizations_url":"https://api.github.com/users/kiegroup/orgs","repos_url":"https://api.github.com/users/kiegroup/repos","events_url":"https://api.github.com/users/kiegroup/events{/privacy}","received_events_url":"https://api.github.com/users/kiegroup/received_events","type":"Organization","site_admin":false},"repo":{"id":1381673,"node_id":"MDEwOlJlcG9zaXRvcnkxMzgxNjcz","name":"drools","full_name":"kiegroup/drools","owner":{"login":"kiegroup","id":517980,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUxNzk4MA==","avatar_url":"https://avatars3.githubusercontent.com/u/517980?v=4","gravatar_id":"","url":"https://api.github.com/users/kiegroup","html_url":"https://github.com/kiegroup","followers_url":"https://api.github.com/users/kiegroup/followers","following_url":"https://api.github.com/users/kiegroup/following{/other_user}","gists_url":"https://api.github.com/users/kiegroup/gists{/gist_id}","starred_url":"https://api.github.com/users/kiegroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiegroup/subscriptions","organizations_url":"https://api.github.com/users/kiegroup/orgs","repos_url":"https://api.github.com/users/kiegroup/repos","events_url":"https://api.github.com/users/kiegroup/events{/privacy}","received_events_url":"https://api.github.com/users/kiegroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kiegroup/drools","description":"Drools Expert is the rule engine and Drools Fusion does complex event processing (CEP).","fork":false,"url":"https://api.github.com/repos/kiegroup/drools","forks_url":"https://api.github.com/repos/kiegroup/drools/forks","keys_url":"https://api.github.com/repos/kiegroup/drools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kiegroup/drools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kiegroup/drools/teams","hooks_url":"https://api.github.com/repos/kiegroup/drools/hooks","issue_events_url":"https://api.github.com/repos/kiegroup/drools/issues/events{/number}","events_url":"https://api.github.com/repos/kiegroup/drools/events","assignees_url":"https://api.github.com/repos/kiegroup/drools/assignees{/user}","branches_url":"https://api.github.com/repos/kiegroup/drools/branches{/branch}","tags_url":"https://api.github.com/repos/kiegroup/drools/tags","blobs_url":"https://api.github.com/repos/kiegroup/drools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kiegroup/drools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kiegroup/drools/git/refs{/sha}","trees_url":"https://api.github.com/repos/kiegroup/drools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kiegroup/drools/statuses/{sha}","languages_url":"https://api.github.com/repos/kiegroup/drools/languages","stargazers_url":"https://api.github.com/repos/kiegroup/drools/stargazers","contributors_url":"https://api.github.com/repos/kiegroup/drools/contributors","subscribers_url":"https://api.github.com/repos/kiegroup/drools/subscribers","subscription_url":"https://api.github.com/repos/kiegroup/drools/subscription","commits_url":"https://api.github.com/repos/kiegroup/drools/commits{/sha}","git_commits_url":"https://api.github.com/repos/kiegroup/drools/git/commits{/sha}","comments_url":"https://api.github.com/repos/kiegroup/drools/comments{/number}","issue_comment_url":"https://api.github.com/repos/kiegroup/drools/issues/comments{/number}","contents_url":"https://api.github.com/repos/kiegroup/drools/contents/{+path}","compare_url":"https://api.github.com/repos/kiegroup/drools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kiegroup/drools/merges","archive_url":"https://api.github.com/repos/kiegroup/drools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kiegroup/drools/downloads","issues_url":"https://api.github.com/repos/kiegroup/drools/issues{/number}","pulls_url":"https://api.github.com/repos/kiegroup/drools/pulls{/number}","milestones_url":"https://api.github.com/repos/kiegroup/drools/milestones{/number}","notifications_url":"https://api.github.com/repos/kiegroup/drools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kiegroup/drools/labels{/name}","releases_url":"https://api.github.com/repos/kiegroup/drools/releases{/id}","deployments_url":"https://api.github.com/repos/kiegroup/drools/deployments","created_at":"2011-02-18T08:37:05Z","updated_at":"2018-08-21T07:38:14Z","pushed_at":"2018-08-20T16:00:36Z","git_url":"git://github.com/kiegroup/drools.git","ssh_url":"git@github.com:kiegroup/drools.git","clone_url":"https://github.com/kiegroup/drools.git","svn_url":"https://github.com/kiegroup/drools","homepage":"http://www.drools.org","size":158419,"stargazers_count":1634,"watchers_count":1634,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1438,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1438,"open_issues":13,"watchers":1634,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kiegroup/drools/pulls/2018"},"html":{"href":"https://github.com/kiegroup/drools/pull/2018"},"issue":{"href":"https://api.github.com/repos/kiegroup/drools/issues/2018"},"comments":{"href":"https://api.github.com/repos/kiegroup/drools/issues/2018/comments"},"review_comments":{"href":"https://api.github.com/repos/kiegroup/drools/pulls/2018/comments"},"review_comment":{"href":"https://api.github.com/repos/kiegroup/drools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kiegroup/drools/pulls/2018/commits"},"statuses":{"href":"https://api.github.com/repos/kiegroup/drools/statuses/8287d33c003418456bc3cea1c8c15b4d01e3d1fd"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"tarilabs"}}