{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/product-pc/pulls/comments/91012834","pull_request_review_id":11522298,"id":91012834,"diff_hunk":"@@ -53,11 +54,129 @@\n import java.util.zip.ZipInputStream;\n \n public class ProcessStore {\n-\n-    private static final Log log = LogFactory.getLog(ProcessStore.class);\n-\n-    private static final String mns = \"http://www.wso2.org/governance/metadata\";\n-    private static final String OK = \"OK\";\n+\tprivate static final Log log = LogFactory.getLog(ProcessStore.class);\n+\n+\tprivate static final String mns = \"http://www.wso2.org/governance/metadata\";\n+\tprivate static final String OK = \"OK\";\n+\n+\tpublic String getProcessVariablesList(String resourcePath) {\n+\t\tString resourceString = \"\";\n+\t\ttry {\n+\t\t\tRegistryService registryService =\n+\t\t\t\t\tProcessCenterServerHolder.getInstance().getRegistryService();\n+\t\t\tif (registryService != null) {\n+\t\t\t\tUserRegistry reg = registryService.getGovernanceSystemRegistry();\n+\t\t\t\tresourcePath = resourcePath.substring(ProcessStoreConstants.GREG_PATH.length());\n+\t\t\t\tResource resourceAsset = reg.get(resourcePath);\n+\t\t\t\tString resourceContent = new String((byte[]) resourceAsset.getContent());\n+\n+\t\t\t\tJSONObject conObj = new JSONObject();\n+\t\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n+\t\t\t\tDocumentBuilder builder;\n+\t\t\t\tbuilder = factory.newDocumentBuilder();\n+\t\t\t\tDocument document =\n+\t\t\t\t\t\tbuilder.parse(new InputSource(new StringReader(resourceContent)));\n+\n+\t\t\t\tJSONArray variableArray = new JSONArray();\n+\n+\t\t\t\tconObj.put(\"processVariables\", variableArray);\n+\n+\t\t\t\tNodeList processVariableElements =\n+\t\t\t\t\t\t((Element) document.getFirstChild()).getElementsByTagName(\"process_variable\");\n+\n+\t\t\t\tif (processVariableElements.getLength() != 0) {\n+\t\t\t\t\tfor (int i = 0; i < processVariableElements.getLength(); i++) {\n+\t\t\t\t\t\tElement processVariableElement = (Element) processVariableElements.item(i);\n+\t\t\t\t\t\tString processVariableName =\n+\t\t\t\t\t\t\t\tprocessVariableElement.getElementsByTagName(\"name\").item(0)\n+\t\t\t\t\t\t\t\t\t\t.getTextContent();\n+\t\t\t\t\t\tString processVariableType =\n+\t\t\t\t\t\t\t\tprocessVariableElement.getElementsByTagName(\"type\").item(0)\n+\t\t\t\t\t\t\t\t\t\t.getTextContent();\n+\n+\t\t\t\t\t\tJSONObject processVariable = new JSONObject();\n+\t\t\t\t\t\tprocessVariable.put(\"name\", processVariableName);\n+\t\t\t\t\t\tprocessVariable.put(\"type\", processVariableType);\n+\t\t\t\t\t\tvariableArray.put(processVariable);\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\t\t\t\tresourceString = conObj.toString();\n+\t\t\t}\n+\t\t} catch (Exception e) {\n+            String errMsg=\"Failed to get the process variables list\";\n+\t\t\tlog.error(errMsg,e);\n+\t\t}\n+\t\treturn resourceString;\n+\t}\n+\n+\tpublic boolean saveProcessVariables(String processVariableDetails){","path":"modules/components/core/org.wso2.carbon.pc.core/src/main/java/org/wso2/carbon/pc/core/ProcessStore.java","position":72,"original_position":72,"commit_id":"6243966d1c78cb443fce5b5c73359bfd557800d9","original_commit_id":"6243966d1c78cb443fce5b5c73359bfd557800d9","user":{"login":"Niranjan-K","id":5525926,"avatar_url":"https://avatars.githubusercontent.com/u/5525926?v=3","gravatar_id":"","url":"https://api.github.com/users/Niranjan-K","html_url":"https://github.com/Niranjan-K","followers_url":"https://api.github.com/users/Niranjan-K/followers","following_url":"https://api.github.com/users/Niranjan-K/following{/other_user}","gists_url":"https://api.github.com/users/Niranjan-K/gists{/gist_id}","starred_url":"https://api.github.com/users/Niranjan-K/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Niranjan-K/subscriptions","organizations_url":"https://api.github.com/users/Niranjan-K/orgs","repos_url":"https://api.github.com/users/Niranjan-K/repos","events_url":"https://api.github.com/users/Niranjan-K/events{/privacy}","received_events_url":"https://api.github.com/users/Niranjan-K/received_events","type":"User","site_admin":false},"body":"Fixed PR #?","created_at":"2016-12-06T05:06:47Z","updated_at":"2016-12-06T05:06:47Z","html_url":"https://github.com/wso2/product-pc/pull/69#discussion_r91012834","pull_request_url":"https://api.github.com/repos/wso2/product-pc/pulls/69","_links":{"self":{"href":"https://api.github.com/repos/wso2/product-pc/pulls/comments/91012834"},"html":{"href":"https://github.com/wso2/product-pc/pull/69#discussion_r91012834"},"pull_request":{"href":"https://api.github.com/repos/wso2/product-pc/pulls/69"}}},"pull_request":{"url":"https://api.github.com/repos/wso2/product-pc/pulls/69","id":62734981,"html_url":"https://github.com/wso2/product-pc/pull/69","diff_url":"https://github.com/wso2/product-pc/pull/69.diff","patch_url":"https://github.com/wso2/product-pc/pull/69.patch","issue_url":"https://api.github.com/repos/wso2/product-pc/issues/69","number":69,"state":"closed","locked":false,"title":"Feature analytics- DAS Configuration for process variables","user":{"login":"rmsamitha","id":2484781,"avatar_url":"https://avatars.githubusercontent.com/u/2484781?v=3","gravatar_id":"","url":"https://api.github.com/users/rmsamitha","html_url":"https://github.com/rmsamitha","followers_url":"https://api.github.com/users/rmsamitha/followers","following_url":"https://api.github.com/users/rmsamitha/following{/other_user}","gists_url":"https://api.github.com/users/rmsamitha/gists{/gist_id}","starred_url":"https://api.github.com/users/rmsamitha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmsamitha/subscriptions","organizations_url":"https://api.github.com/users/rmsamitha/orgs","repos_url":"https://api.github.com/users/rmsamitha/repos","events_url":"https://api.github.com/users/rmsamitha/events{/privacy}","received_events_url":"https://api.github.com/users/rmsamitha/received_events","type":"User","site_admin":false},"body":"Adding DAS configuration for analytics of process specific variables\n","created_at":"2016-03-14T11:42:15Z","updated_at":"2016-12-06T05:10:28Z","closed_at":"2016-03-17T03:44:18Z","merged_at":"2016-03-17T03:44:18Z","merge_commit_sha":"f21c3e990121facf32fa6716cecf60abd712a4bd","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/wso2/product-pc/pulls/69/commits","review_comments_url":"https://api.github.com/repos/wso2/product-pc/pulls/69/comments","review_comment_url":"https://api.github.com/repos/wso2/product-pc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/product-pc/issues/69/comments","statuses_url":"https://api.github.com/repos/wso2/product-pc/statuses/6243966d1c78cb443fce5b5c73359bfd557800d9","head":{"label":"rmsamitha:feature-analytics","ref":"feature-analytics","sha":"6243966d1c78cb443fce5b5c73359bfd557800d9","user":{"login":"rmsamitha","id":2484781,"avatar_url":"https://avatars.githubusercontent.com/u/2484781?v=3","gravatar_id":"","url":"https://api.github.com/users/rmsamitha","html_url":"https://github.com/rmsamitha","followers_url":"https://api.github.com/users/rmsamitha/followers","following_url":"https://api.github.com/users/rmsamitha/following{/other_user}","gists_url":"https://api.github.com/users/rmsamitha/gists{/gist_id}","starred_url":"https://api.github.com/users/rmsamitha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmsamitha/subscriptions","organizations_url":"https://api.github.com/users/rmsamitha/orgs","repos_url":"https://api.github.com/users/rmsamitha/repos","events_url":"https://api.github.com/users/rmsamitha/events{/privacy}","received_events_url":"https://api.github.com/users/rmsamitha/received_events","type":"User","site_admin":false},"repo":{"id":52355346,"name":"product-pc","full_name":"rmsamitha/product-pc","owner":{"login":"rmsamitha","id":2484781,"avatar_url":"https://avatars.githubusercontent.com/u/2484781?v=3","gravatar_id":"","url":"https://api.github.com/users/rmsamitha","html_url":"https://github.com/rmsamitha","followers_url":"https://api.github.com/users/rmsamitha/followers","following_url":"https://api.github.com/users/rmsamitha/following{/other_user}","gists_url":"https://api.github.com/users/rmsamitha/gists{/gist_id}","starred_url":"https://api.github.com/users/rmsamitha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmsamitha/subscriptions","organizations_url":"https://api.github.com/users/rmsamitha/orgs","repos_url":"https://api.github.com/users/rmsamitha/repos","events_url":"https://api.github.com/users/rmsamitha/events{/privacy}","received_events_url":"https://api.github.com/users/rmsamitha/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rmsamitha/product-pc","description":null,"fork":true,"url":"https://api.github.com/repos/rmsamitha/product-pc","forks_url":"https://api.github.com/repos/rmsamitha/product-pc/forks","keys_url":"https://api.github.com/repos/rmsamitha/product-pc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rmsamitha/product-pc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rmsamitha/product-pc/teams","hooks_url":"https://api.github.com/repos/rmsamitha/product-pc/hooks","issue_events_url":"https://api.github.com/repos/rmsamitha/product-pc/issues/events{/number}","events_url":"https://api.github.com/repos/rmsamitha/product-pc/events","assignees_url":"https://api.github.com/repos/rmsamitha/product-pc/assignees{/user}","branches_url":"https://api.github.com/repos/rmsamitha/product-pc/branches{/branch}","tags_url":"https://api.github.com/repos/rmsamitha/product-pc/tags","blobs_url":"https://api.github.com/repos/rmsamitha/product-pc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rmsamitha/product-pc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rmsamitha/product-pc/git/refs{/sha}","trees_url":"https://api.github.com/repos/rmsamitha/product-pc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rmsamitha/product-pc/statuses/{sha}","languages_url":"https://api.github.com/repos/rmsamitha/product-pc/languages","stargazers_url":"https://api.github.com/repos/rmsamitha/product-pc/stargazers","contributors_url":"https://api.github.com/repos/rmsamitha/product-pc/contributors","subscribers_url":"https://api.github.com/repos/rmsamitha/product-pc/subscribers","subscription_url":"https://api.github.com/repos/rmsamitha/product-pc/subscription","commits_url":"https://api.github.com/repos/rmsamitha/product-pc/commits{/sha}","git_commits_url":"https://api.github.com/repos/rmsamitha/product-pc/git/commits{/sha}","comments_url":"https://api.github.com/repos/rmsamitha/product-pc/comments{/number}","issue_comment_url":"https://api.github.com/repos/rmsamitha/product-pc/issues/comments{/number}","contents_url":"https://api.github.com/repos/rmsamitha/product-pc/contents/{+path}","compare_url":"https://api.github.com/repos/rmsamitha/product-pc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rmsamitha/product-pc/merges","archive_url":"https://api.github.com/repos/rmsamitha/product-pc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rmsamitha/product-pc/downloads","issues_url":"https://api.github.com/repos/rmsamitha/product-pc/issues{/number}","pulls_url":"https://api.github.com/repos/rmsamitha/product-pc/pulls{/number}","milestones_url":"https://api.github.com/repos/rmsamitha/product-pc/milestones{/number}","notifications_url":"https://api.github.com/repos/rmsamitha/product-pc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rmsamitha/product-pc/labels{/name}","releases_url":"https://api.github.com/repos/rmsamitha/product-pc/releases{/id}","deployments_url":"https://api.github.com/repos/rmsamitha/product-pc/deployments","created_at":"2016-02-23T11:54:05Z","updated_at":"2016-02-23T11:54:08Z","pushed_at":"2016-12-03T12:59:17Z","git_url":"git://github.com/rmsamitha/product-pc.git","ssh_url":"git@github.com:rmsamitha/product-pc.git","clone_url":"https://github.com/rmsamitha/product-pc.git","svn_url":"https://github.com/rmsamitha/product-pc","homepage":null,"size":21806,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"wso2:analytics","ref":"analytics","sha":"880c8290e72cf4d884c16d0695da5440eb44b3e6","user":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"repo":{"id":25909621,"name":"product-pc","full_name":"wso2/product-pc","owner":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wso2/product-pc","description":"Welcome to the WSO2 Process Center source code! For info on working with the WSO2 Process Center repository and contributing code, click the link below.","fork":false,"url":"https://api.github.com/repos/wso2/product-pc","forks_url":"https://api.github.com/repos/wso2/product-pc/forks","keys_url":"https://api.github.com/repos/wso2/product-pc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/product-pc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/product-pc/teams","hooks_url":"https://api.github.com/repos/wso2/product-pc/hooks","issue_events_url":"https://api.github.com/repos/wso2/product-pc/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/product-pc/events","assignees_url":"https://api.github.com/repos/wso2/product-pc/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/product-pc/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/product-pc/tags","blobs_url":"https://api.github.com/repos/wso2/product-pc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/product-pc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/product-pc/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/product-pc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/product-pc/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/product-pc/languages","stargazers_url":"https://api.github.com/repos/wso2/product-pc/stargazers","contributors_url":"https://api.github.com/repos/wso2/product-pc/contributors","subscribers_url":"https://api.github.com/repos/wso2/product-pc/subscribers","subscription_url":"https://api.github.com/repos/wso2/product-pc/subscription","commits_url":"https://api.github.com/repos/wso2/product-pc/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/product-pc/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/product-pc/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/product-pc/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/product-pc/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/product-pc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/product-pc/merges","archive_url":"https://api.github.com/repos/wso2/product-pc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/product-pc/downloads","issues_url":"https://api.github.com/repos/wso2/product-pc/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/product-pc/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/product-pc/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/product-pc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/product-pc/labels{/name}","releases_url":"https://api.github.com/repos/wso2/product-pc/releases{/id}","deployments_url":"https://api.github.com/repos/wso2/product-pc/deployments","created_at":"2014-10-29T07:33:38Z","updated_at":"2016-11-29T04:05:45Z","pushed_at":"2016-12-03T13:01:56Z","git_url":"git://github.com/wso2/product-pc.git","ssh_url":"git@github.com:wso2/product-pc.git","clone_url":"https://github.com/wso2/product-pc.git","svn_url":"https://github.com/wso2/product-pc","homepage":"http://wso2.github.io/","size":21725,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":2,"forks":19,"open_issues":2,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/product-pc/pulls/69"},"html":{"href":"https://github.com/wso2/product-pc/pull/69"},"issue":{"href":"https://api.github.com/repos/wso2/product-pc/issues/69"},"comments":{"href":"https://api.github.com/repos/wso2/product-pc/issues/69/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/product-pc/pulls/69/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/product-pc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/product-pc/pulls/69/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/product-pc/statuses/6243966d1c78cb443fce5b5c73359bfd557800d9"}}}}
{"actor":{"display_login":"Niranjan-K"}}