{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/product-pc/pulls/comments/48725098","id":48725098,"diff_hunk":"@@ -140,9 +140,147 @@\n         });\n     }\n \n+    function isProcessNotAvailableInList(processName){\n+        for(var i = 0 ; i < processNames.length ; i++){\n+            if(processNames[i] == processName){\n+                return false;\n+            }\n+        }\n+        return true;\n+    }\n+\n+    function readUpdatedSubprocess(e){\n+        var subprocessInfo = [];\n+        var subprocessInput = $(e).parent().parent().closest(\"tr\").find(\"input\").val();\n+\n+        if(subprocessInput == ''){\n+            alert(\"Field is empty\");\n+        }else if(isProcessNotAvailableInList(subprocessInput)){\n+            alert(\"Please enter correct process name that exists.\");\n+        }else{\n+            var subprocessPath, subprocessId;\n+            for(var i = 0 ; i < processListObj.length ; i++){\n+                if(processListObj[i].processname == subprocessInput.split(\"-\")[0] &&\n+                        processListObj[i].processversion == subprocessInput.split(\"-\")[1]){\n+                    subprocessPath = processListObj[i].path;\n+                    subprocessId = processListObj[i].processid;\n+                    break;\n+                }\n+            }\n+            subprocessInfo.push({\n+                name: subprocessInput.split(\"-\")[0],\n+                path: subprocessPath,\n+                id: subprocessId\n+            });\n+            var subProcessDetails = {\n+                'processName': $('#view-header').text(),\n+                'processVersion' : $('#process-version').text(),\n+                'subprocessList' : subprocessInfo\n+            };\n+\n+            $.ajax({\n+                url: 'https://localhost:9443/publisher/assets/process/apis/update_subprocess_list',\n+                type: 'POST',\n+                data: { 'subprocessDetails': JSON.stringify(subProcessDetails) },\n+                success: function (response) {\n+                    alert(\"Updated the subprocess details.\");\n+                },\n+                error: function () {\n+                    alert(\"error\");\n+                }\n+            });\n+        }\n+    }\n+\n+    function readUpdatedSuccessor(e){\n+        var successorInfo = [];\n+        var successorInput = $(e).parent().parent().closest(\"tr\").find(\"input\").val();\n+\n+        if(successorInput == ''){\n+            alert(\"Field is empty\");\n+        }else if(isProcessNotAvailableInList(successorInput)){\n+            alert(\"Please enter correct process name that exists.\");\n+        }else{\n+            var successorPath, successorId;\n+            for(var i = 0 ; i < processListObj.length ; i++){\n+                if(processListObj[i].processname == successorInput.split(\"-\")[0] &&\n+                        processListObj[i].processversion == successorInput.split(\"-\")[1]){\n+                    successorPath = processListObj[i].path;\n+                    successorId = processListObj[i].processid;\n+                    break;\n+                }\n+            }\n+            successorInfo.push({\n+                name: successorInput.split(\"-\")[0],\n+                path: successorPath,\n+                id: successorId\n+            });\n+            var successorDetails = {\n+                'processName': $('#view-header').text(),\n+                'processVersion' : $('#process-version').text(),\n+                'successorList' : successorInfo\n+            };\n+\n+            $.ajax({\n+                url: 'https://localhost:9443/publisher/assets/process/apis/update_successor_list',\n+                type: 'POST',\n+                data: { 'successorDetails': JSON.stringify(successorDetails) },\n+                success: function (response) {\n+                    alert(\"Updated the subprocess details.\");\n+                },\n+                error: function () {\n+                    alert(\"error\");\n+                }","path":"modules/extensions/process/publisher/process/themes/default/partials/view-asset.hbs","position":94,"original_position":94,"commit_id":"2e4b67c4dff3cab414e347229e073fe235cb53ec","original_commit_id":"2e4b67c4dff3cab414e347229e073fe235cb53ec","user":{"login":"isurusuranga","id":1329800,"avatar_url":"https://avatars.githubusercontent.com/u/1329800?v=3","gravatar_id":"","url":"https://api.github.com/users/isurusuranga","html_url":"https://github.com/isurusuranga","followers_url":"https://api.github.com/users/isurusuranga/followers","following_url":"https://api.github.com/users/isurusuranga/following{/other_user}","gists_url":"https://api.github.com/users/isurusuranga/gists{/gist_id}","starred_url":"https://api.github.com/users/isurusuranga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isurusuranga/subscriptions","organizations_url":"https://api.github.com/users/isurusuranga/orgs","repos_url":"https://api.github.com/users/isurusuranga/repos","events_url":"https://api.github.com/users/isurusuranga/events{/privacy}","received_events_url":"https://api.github.com/users/isurusuranga/received_events","type":"User","site_admin":false},"body":"Fixed in https://github.com/wso2/product-pc/pull/34","created_at":"2016-01-04T12:06:45Z","updated_at":"2016-01-04T12:06:45Z","html_url":"https://github.com/wso2/product-pc/pull/21#discussion_r48725098","pull_request_url":"https://api.github.com/repos/wso2/product-pc/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/wso2/product-pc/pulls/comments/48725098"},"html":{"href":"https://github.com/wso2/product-pc/pull/21#discussion_r48725098"},"pull_request":{"href":"https://api.github.com/repos/wso2/product-pc/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/wso2/product-pc/pulls/21","id":48330456,"html_url":"https://github.com/wso2/product-pc/pull/21","diff_url":"https://github.com/wso2/product-pc/pull/21.diff","patch_url":"https://github.com/wso2/product-pc/pull/21.patch","issue_url":"https://api.github.com/repos/wso2/product-pc/issues/21","number":21,"state":"closed","locked":false,"title":"Implemented the update functionality","user":{"login":"isurusuranga","id":1329800,"avatar_url":"https://avatars.githubusercontent.com/u/1329800?v=3","gravatar_id":"","url":"https://api.github.com/users/isurusuranga","html_url":"https://github.com/isurusuranga","followers_url":"https://api.github.com/users/isurusuranga/followers","following_url":"https://api.github.com/users/isurusuranga/following{/other_user}","gists_url":"https://api.github.com/users/isurusuranga/gists{/gist_id}","starred_url":"https://api.github.com/users/isurusuranga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isurusuranga/subscriptions","organizations_url":"https://api.github.com/users/isurusuranga/orgs","repos_url":"https://api.github.com/users/isurusuranga/repos","events_url":"https://api.github.com/users/isurusuranga/events{/privacy}","received_events_url":"https://api.github.com/users/isurusuranga/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-21T13:25:43Z","updated_at":"2016-01-04T12:06:45Z","closed_at":"2015-10-21T16:23:34Z","merged_at":"2015-10-21T16:23:34Z","merge_commit_sha":"0cb6cf06c74de096fd76090f9473c79dda6cb80f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wso2/product-pc/pulls/21/commits","review_comments_url":"https://api.github.com/repos/wso2/product-pc/pulls/21/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/21/comments","statuses_url":"https://api.github.com/repos/wso2/product-pc/statuses/2e4b67c4dff3cab414e347229e073fe235cb53ec","head":{"label":"isurusuranga:process_center","ref":"process_center","sha":"2e4b67c4dff3cab414e347229e073fe235cb53ec","user":{"login":"isurusuranga","id":1329800,"avatar_url":"https://avatars.githubusercontent.com/u/1329800?v=3","gravatar_id":"","url":"https://api.github.com/users/isurusuranga","html_url":"https://github.com/isurusuranga","followers_url":"https://api.github.com/users/isurusuranga/followers","following_url":"https://api.github.com/users/isurusuranga/following{/other_user}","gists_url":"https://api.github.com/users/isurusuranga/gists{/gist_id}","starred_url":"https://api.github.com/users/isurusuranga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isurusuranga/subscriptions","organizations_url":"https://api.github.com/users/isurusuranga/orgs","repos_url":"https://api.github.com/users/isurusuranga/repos","events_url":"https://api.github.com/users/isurusuranga/events{/privacy}","received_events_url":"https://api.github.com/users/isurusuranga/received_events","type":"User","site_admin":false},"repo":{"id":44361035,"name":"product-pc","full_name":"isurusuranga/product-pc","owner":{"login":"isurusuranga","id":1329800,"avatar_url":"https://avatars.githubusercontent.com/u/1329800?v=3","gravatar_id":"","url":"https://api.github.com/users/isurusuranga","html_url":"https://github.com/isurusuranga","followers_url":"https://api.github.com/users/isurusuranga/followers","following_url":"https://api.github.com/users/isurusuranga/following{/other_user}","gists_url":"https://api.github.com/users/isurusuranga/gists{/gist_id}","starred_url":"https://api.github.com/users/isurusuranga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isurusuranga/subscriptions","organizations_url":"https://api.github.com/users/isurusuranga/orgs","repos_url":"https://api.github.com/users/isurusuranga/repos","events_url":"https://api.github.com/users/isurusuranga/events{/privacy}","received_events_url":"https://api.github.com/users/isurusuranga/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/isurusuranga/product-pc","description":"","fork":true,"url":"https://api.github.com/repos/isurusuranga/product-pc","forks_url":"https://api.github.com/repos/isurusuranga/product-pc/forks","keys_url":"https://api.github.com/repos/isurusuranga/product-pc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/isurusuranga/product-pc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/isurusuranga/product-pc/teams","hooks_url":"https://api.github.com/repos/isurusuranga/product-pc/hooks","issue_events_url":"https://api.github.com/repos/isurusuranga/product-pc/issues/events{/number}","events_url":"https://api.github.com/repos/isurusuranga/product-pc/events","assignees_url":"https://api.github.com/repos/isurusuranga/product-pc/assignees{/user}","branches_url":"https://api.github.com/repos/isurusuranga/product-pc/branches{/branch}","tags_url":"https://api.github.com/repos/isurusuranga/product-pc/tags","blobs_url":"https://api.github.com/repos/isurusuranga/product-pc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/isurusuranga/product-pc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/isurusuranga/product-pc/git/refs{/sha}","trees_url":"https://api.github.com/repos/isurusuranga/product-pc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/isurusuranga/product-pc/statuses/{sha}","languages_url":"https://api.github.com/repos/isurusuranga/product-pc/languages","stargazers_url":"https://api.github.com/repos/isurusuranga/product-pc/stargazers","contributors_url":"https://api.github.com/repos/isurusuranga/product-pc/contributors","subscribers_url":"https://api.github.com/repos/isurusuranga/product-pc/subscribers","subscription_url":"https://api.github.com/repos/isurusuranga/product-pc/subscription","commits_url":"https://api.github.com/repos/isurusuranga/product-pc/commits{/sha}","git_commits_url":"https://api.github.com/repos/isurusuranga/product-pc/git/commits{/sha}","comments_url":"https://api.github.com/repos/isurusuranga/product-pc/comments{/number}","issue_comment_url":"https://api.github.com/repos/isurusuranga/product-pc/issues/comments{/number}","contents_url":"https://api.github.com/repos/isurusuranga/product-pc/contents/{+path}","compare_url":"https://api.github.com/repos/isurusuranga/product-pc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/isurusuranga/product-pc/merges","archive_url":"https://api.github.com/repos/isurusuranga/product-pc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/isurusuranga/product-pc/downloads","issues_url":"https://api.github.com/repos/isurusuranga/product-pc/issues{/number}","pulls_url":"https://api.github.com/repos/isurusuranga/product-pc/pulls{/number}","milestones_url":"https://api.github.com/repos/isurusuranga/product-pc/milestones{/number}","notifications_url":"https://api.github.com/repos/isurusuranga/product-pc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/isurusuranga/product-pc/labels{/name}","releases_url":"https://api.github.com/repos/isurusuranga/product-pc/releases{/id}","created_at":"2015-10-16T03:51:48Z","updated_at":"2015-10-16T03:51:50Z","pushed_at":"2016-01-04T12:05:28Z","git_url":"git://github.com/isurusuranga/product-pc.git","ssh_url":"git@github.com:isurusuranga/product-pc.git","clone_url":"https://github.com/isurusuranga/product-pc.git","svn_url":"https://github.com/isurusuranga/product-pc","homepage":null,"size":9243,"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:master","ref":"master","sha":"908e11ea9196aac71f19be29f5894d71a06758a1","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":"","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}","created_at":"2014-10-29T07:33:38Z","updated_at":"2015-12-18T09:37:50Z","pushed_at":"2016-01-04T12:05:30Z","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":null,"size":9231,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":1,"forks":6,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/product-pc/pulls/21"},"html":{"href":"https://github.com/wso2/product-pc/pull/21"},"issue":{"href":"https://api.github.com/repos/wso2/product-pc/issues/21"},"comments":{"href":"https://api.github.com/repos/wso2/product-pc/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/product-pc/pulls/21/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/21/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/product-pc/statuses/2e4b67c4dff3cab414e347229e073fe235cb53ec"}}}}