{"action":"created","comment":{"url":"https://api.github.com/repos/kiegroup/submarine-runtimes/pulls/comments/286552858","pull_request_review_id":240711610,"id":286552858,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI4NjU1Mjg1OA==","diff_hunk":"@@ -100,15 +101,16 @@ public void internalTrigger(final NodeInstance from, String type) {\n                 throw new IllegalArgumentException(\"A RuleSetNode only accepts default incoming connections!\");\n             }\n             RuleSetNode ruleSetNode = getRuleSetNode();\n-            KieRuntime kruntime = getProcessInstance().getKnowledgeRuntime();\n+            \n+            KieRuntime kruntime = Optional.ofNullable(getRuleSetNode().getKieRuntime()).orElse(() -> getProcessInstance().getKnowledgeRuntime()).get();","path":"jbpm/jbpm-flow/src/main/java/org/jbpm/workflow/instance/node/RuleSetNodeInstance.java","position":14,"original_position":14,"commit_id":"4ddf6953a0ad6035d2daed45f50ce22a20e04b1f","original_commit_id":"5632d655e6d5f0915e32f9e95ae64dd5e216b99b","user":{"login":"mswiderski","id":904474,"node_id":"MDQ6VXNlcjkwNDQ3NA==","avatar_url":"https://avatars0.githubusercontent.com/u/904474?v=4","gravatar_id":"","url":"https://api.github.com/users/mswiderski","html_url":"https://github.com/mswiderski","followers_url":"https://api.github.com/users/mswiderski/followers","following_url":"https://api.github.com/users/mswiderski/following{/other_user}","gists_url":"https://api.github.com/users/mswiderski/gists{/gist_id}","starred_url":"https://api.github.com/users/mswiderski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mswiderski/subscriptions","organizations_url":"https://api.github.com/users/mswiderski/orgs","repos_url":"https://api.github.com/users/mswiderski/repos","events_url":"https://api.github.com/users/mswiderski/events{/privacy}","received_events_url":"https://api.github.com/users/mswiderski/received_events","type":"User","site_admin":false},"body":"yes, I agree here but I guess that is not there yet. So for the time being this enables us to use rules from within processes. Once we have the rule unit in place for not explicitly defined units then we can refactor","created_at":"2019-05-22T15:29:10Z","updated_at":"2019-05-22T15:29:10Z","html_url":"https://github.com/kiegroup/submarine-runtimes/pull/51#discussion_r286552858","pull_request_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/pulls/51","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/kiegroup/submarine-runtimes/pulls/comments/286552858"},"html":{"href":"https://github.com/kiegroup/submarine-runtimes/pull/51#discussion_r286552858"},"pull_request":{"href":"https://api.github.com/repos/kiegroup/submarine-runtimes/pulls/51"}},"in_reply_to_id":286495513},"pull_request":{"url":"https://api.github.com/repos/kiegroup/submarine-runtimes/pulls/51","id":281112200,"node_id":"MDExOlB1bGxSZXF1ZXN0MjgxMTEyMjAw","html_url":"https://github.com/kiegroup/submarine-runtimes/pull/51","diff_url":"https://github.com/kiegroup/submarine-runtimes/pull/51.diff","patch_url":"https://github.com/kiegroup/submarine-runtimes/pull/51.patch","issue_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/issues/51","number":51,"state":"open","locked":false,"title":"JBPM-8327 - Business rule task for local decision service, JBPM-8328 - Process Runtime integration with Rule Runtime, added tests in codegen module to test generated code","user":{"login":"mswiderski","id":904474,"node_id":"MDQ6VXNlcjkwNDQ3NA==","avatar_url":"https://avatars0.githubusercontent.com/u/904474?v=4","gravatar_id":"","url":"https://api.github.com/users/mswiderski","html_url":"https://github.com/mswiderski","followers_url":"https://api.github.com/users/mswiderski/followers","following_url":"https://api.github.com/users/mswiderski/following{/other_user}","gists_url":"https://api.github.com/users/mswiderski/gists{/gist_id}","starred_url":"https://api.github.com/users/mswiderski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mswiderski/subscriptions","organizations_url":"https://api.github.com/users/mswiderski/orgs","repos_url":"https://api.github.com/users/mswiderski/repos","events_url":"https://api.github.com/users/mswiderski/events{/privacy}","received_events_url":"https://api.github.com/users/mswiderski/received_events","type":"User","site_admin":false},"body":"support for business rule task to allow to execute rules (not decisions yet). The generated code for rules will be based on the generated ProjectRuntime\r\n\r\n```\r\n        org.jbpm.ruleflow.core.factory.RuleSetNodeFactory ruleSetNode3 = factory.ruleSetNode(3);\r\n        ruleSetNode3.name(\"run rules\");\r\n        ruleSetNode3.ruleFlowGroup(\"employee\", () -> {\r\n            return app.ruleRuntimeBuilder().newKieSession(\"defaultStatelessKieSession\");\r\n        });\r\n        ruleSetNode3.inMapping(\"employee\", \"employee\");\r\n        ruleSetNode3.outMapping(\"employee\", \"employee\");\r\n        ruleSetNode3.done();\r\n```\r\n\r\nCurrently it uses stateless ksession to make it the most efficient, further on this can be extended to add support for statefull but for now I don't see much of a value for it.\r\n\r\nIn addition, this PR introduces a change in KieBuilderImpl that allows to skip the src/main/resources condition for resources to be added to kbase. Mainly to allow to use it for selected files use cases like using them from src/test/resources for unit testing.","created_at":"2019-05-22T09:40:43Z","updated_at":"2019-05-22T15:29:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8d00716852577ec29ebb413ddf691f2391616d6b","assignee":null,"assignees":[],"requested_reviewers":[{"login":"mariofusco","id":372781,"node_id":"MDQ6VXNlcjM3Mjc4MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/372781?v=4","gravatar_id":"","url":"https://api.github.com/users/mariofusco","html_url":"https://github.com/mariofusco","followers_url":"https://api.github.com/users/mariofusco/followers","following_url":"https://api.github.com/users/mariofusco/following{/other_user}","gists_url":"https://api.github.com/users/mariofusco/gists{/gist_id}","starred_url":"https://api.github.com/users/mariofusco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariofusco/subscriptions","organizations_url":"https://api.github.com/users/mariofusco/orgs","repos_url":"https://api.github.com/users/mariofusco/repos","events_url":"https://api.github.com/users/mariofusco/events{/privacy}","received_events_url":"https://api.github.com/users/mariofusco/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/pulls/51/commits","review_comments_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/pulls/51/comments","review_comment_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/issues/51/comments","statuses_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/statuses/4ddf6953a0ad6035d2daed45f50ce22a20e04b1f","head":{"label":"mswiderski:JBPM-8494-JBPM-8328","ref":"JBPM-8494-JBPM-8328","sha":"4ddf6953a0ad6035d2daed45f50ce22a20e04b1f","user":{"login":"mswiderski","id":904474,"node_id":"MDQ6VXNlcjkwNDQ3NA==","avatar_url":"https://avatars0.githubusercontent.com/u/904474?v=4","gravatar_id":"","url":"https://api.github.com/users/mswiderski","html_url":"https://github.com/mswiderski","followers_url":"https://api.github.com/users/mswiderski/followers","following_url":"https://api.github.com/users/mswiderski/following{/other_user}","gists_url":"https://api.github.com/users/mswiderski/gists{/gist_id}","starred_url":"https://api.github.com/users/mswiderski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mswiderski/subscriptions","organizations_url":"https://api.github.com/users/mswiderski/orgs","repos_url":"https://api.github.com/users/mswiderski/repos","events_url":"https://api.github.com/users/mswiderski/events{/privacy}","received_events_url":"https://api.github.com/users/mswiderski/received_events","type":"User","site_admin":false},"repo":{"id":179142431,"node_id":"MDEwOlJlcG9zaXRvcnkxNzkxNDI0MzE=","name":"submarine-runtimes","full_name":"mswiderski/submarine-runtimes","private":false,"owner":{"login":"mswiderski","id":904474,"node_id":"MDQ6VXNlcjkwNDQ3NA==","avatar_url":"https://avatars0.githubusercontent.com/u/904474?v=4","gravatar_id":"","url":"https://api.github.com/users/mswiderski","html_url":"https://github.com/mswiderski","followers_url":"https://api.github.com/users/mswiderski/followers","following_url":"https://api.github.com/users/mswiderski/following{/other_user}","gists_url":"https://api.github.com/users/mswiderski/gists{/gist_id}","starred_url":"https://api.github.com/users/mswiderski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mswiderski/subscriptions","organizations_url":"https://api.github.com/users/mswiderski/orgs","repos_url":"https://api.github.com/users/mswiderski/repos","events_url":"https://api.github.com/users/mswiderski/events{/privacy}","received_events_url":"https://api.github.com/users/mswiderski/received_events","type":"User","site_admin":false},"html_url":"https://github.com/mswiderski/submarine-runtimes","description":null,"fork":true,"url":"https://api.github.com/repos/mswiderski/submarine-runtimes","forks_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/forks","keys_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/teams","hooks_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/hooks","issue_events_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/issues/events{/number}","events_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/events","assignees_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/assignees{/user}","branches_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/branches{/branch}","tags_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/tags","blobs_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/git/refs{/sha}","trees_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/statuses/{sha}","languages_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/languages","stargazers_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/stargazers","contributors_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/contributors","subscribers_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/subscribers","subscription_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/subscription","commits_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/commits{/sha}","git_commits_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/git/commits{/sha}","comments_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/comments{/number}","issue_comment_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/issues/comments{/number}","contents_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/contents/{+path}","compare_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/merges","archive_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/downloads","issues_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/issues{/number}","pulls_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/pulls{/number}","milestones_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/milestones{/number}","notifications_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/labels{/name}","releases_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/releases{/id}","deployments_url":"https://api.github.com/repos/mswiderski/submarine-runtimes/deployments","created_at":"2019-04-02T19:11:17Z","updated_at":"2019-04-02T19:12:00Z","pushed_at":"2019-05-22T13:41:29Z","git_url":"git://github.com/mswiderski/submarine-runtimes.git","ssh_url":"git@github.com:mswiderski/submarine-runtimes.git","clone_url":"https://github.com/mswiderski/submarine-runtimes.git","svn_url":"https://github.com/mswiderski/submarine-runtimes","homepage":null,"size":251503,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kiegroup:master","ref":"master","sha":"d8c3cdeee2d2c1621b16a61254058fbdca1e4f96","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":174306645,"node_id":"MDEwOlJlcG9zaXRvcnkxNzQzMDY2NDU=","name":"submarine-runtimes","full_name":"kiegroup/submarine-runtimes","private":false,"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},"html_url":"https://github.com/kiegroup/submarine-runtimes","description":null,"fork":false,"url":"https://api.github.com/repos/kiegroup/submarine-runtimes","forks_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/forks","keys_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/teams","hooks_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/hooks","issue_events_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/issues/events{/number}","events_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/events","assignees_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/assignees{/user}","branches_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/branches{/branch}","tags_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/tags","blobs_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/statuses/{sha}","languages_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/languages","stargazers_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/stargazers","contributors_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/contributors","subscribers_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/subscribers","subscription_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/subscription","commits_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/contents/{+path}","compare_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/merges","archive_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/downloads","issues_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/issues{/number}","pulls_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/pulls{/number}","milestones_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/milestones{/number}","notifications_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/labels{/name}","releases_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/releases{/id}","deployments_url":"https://api.github.com/repos/kiegroup/submarine-runtimes/deployments","created_at":"2019-03-07T08:49:09Z","updated_at":"2019-05-21T16:43:43Z","pushed_at":"2019-05-22T13:41:31Z","git_url":"git://github.com/kiegroup/submarine-runtimes.git","ssh_url":"git@github.com:kiegroup/submarine-runtimes.git","clone_url":"https://github.com/kiegroup/submarine-runtimes.git","svn_url":"https://github.com/kiegroup/submarine-runtimes","homepage":null,"size":251458,"stargazers_count":5,"watchers_count":5,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":2,"license":null,"forks":16,"open_issues":2,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kiegroup/submarine-runtimes/pulls/51"},"html":{"href":"https://github.com/kiegroup/submarine-runtimes/pull/51"},"issue":{"href":"https://api.github.com/repos/kiegroup/submarine-runtimes/issues/51"},"comments":{"href":"https://api.github.com/repos/kiegroup/submarine-runtimes/issues/51/comments"},"review_comments":{"href":"https://api.github.com/repos/kiegroup/submarine-runtimes/pulls/51/comments"},"review_comment":{"href":"https://api.github.com/repos/kiegroup/submarine-runtimes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kiegroup/submarine-runtimes/pulls/51/commits"},"statuses":{"href":"https://api.github.com/repos/kiegroup/submarine-runtimes/statuses/4ddf6953a0ad6035d2daed45f50ce22a20e04b1f"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"mswiderski"}}