{"id":6156,"date":"2012-10-02T09:11:45","date_gmt":"2012-10-02T14:11:45","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=6156"},"modified":"2012-10-11T14:41:21","modified_gmt":"2012-10-11T19:41:21","slug":"openidm-and-activiti-local-integration","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=6156","title":{"rendered":"OpenIDM 2.1: Activiti Local Integration"},"content":{"rendered":"<div class='toc wptoc'>\n<h2>Contents<\/h2>\n<ol class='toc-odd level-1'>\n\t<li>\n\t\t<a href=\"#Build\">Build<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Integrate_Activiti_Explorer_with_Local_Activiti_Engine\">Integrate Activiti Explorer with Local Activiti Engine<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Briefly\">Briefly<\/a>\n\t\t\t<\/li>\n\t\t<\/ol>\n\t<li>\n\t\t<a href=\"#Configure_OpenIDM_and_Activiti_to_Share_the_Same_User_Store\">Configure OpenIDM and Activiti to Share the Same User Store<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Check_Workflow_Integration\">Check Workflow Integration<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#References\">References<\/a>\n\t<\/li>\n<\/ol>\n<\/ol>\n<\/div>\n<div class='wptoc-end'>&nbsp;<\/div>\n<span id=\"Build\"><h2>Build<\/h2><\/span>\n<p>* Local Activiti integration is included in standard OpenIDM 2.1 build.<br \/>\n* Activiti Explorer is <strong>not<\/strong> included in the 2.1 build so you need to build it yourself.<\/p>\n<span id=\"Integrate_Activiti_Explorer_with_Local_Activiti_Engine\"><h2>Integrate Activiti Explorer with Local Activiti Engine<\/h2><\/span>\n<p>* For OpenIDM 2.1, if you want to access Activiti Explorer web app, you need to follow <a href=\"https:\/\/wikis.forgerock.org\/confluence\/display\/openidm\/OpenIDM+2.1+-++Howto+get+the+Activiti+Explorer+running+in+OpenIDM\">this article<\/a> and build from source trunk. <\/p>\n<span id=\"Briefly\"><h3>Briefly<\/h3><\/span>\n<p>* Download <a href=\"https:\/\/wikis.forgerock.org\/confluence\/download\/attachments\/16023699\/openidm-ui-demo.zip?version=3&#038;modificationDate=1334074415000\">openidm-ui-demo<\/a> and extract it into <em>trunk\/openidm<\/em> directory.<br \/>\n* Edit <em>openidm\/pom.xml<\/em> and add <em>openidm-ui-demo<\/em> module:<\/p>\n<pre lang=\"xml\">\r\n<module>openidm-ui-demo<\/module>\r\n<\/pre>\n<p>* Edit <em>openidm\/openidm-zip\/pom.xml<\/em> and add <em>openidm-ui-demo<\/em> dependency:<\/p>\n<pre lang=\"xml\">\r\n<dependency>\r\n    <groupId>org.forgerock.openidm<\/groupId>\r\n    <artifactId>openidm-ui-demo<\/artifactId>\r\n    <version>${openidm.version}<\/version>\r\n<\/dependency>\r\n<\/pre>\n<p>* Do Maven:<\/p>\n<pre lang=\"bash\">\r\nmvn clean package\r\n<\/pre>\n<p>* Follow normal <a href=\"?p=5737#Install_1\">install<\/a> and Activipti Explorer can be accessed from URL <a href=\"http:\/\/localhost:8080\/idm\">http:\/\/localhost:8080\/idm<\/a><\/p>\n<span id=\"Configure_OpenIDM_and_Activiti_to_Share_the_Same_User_Store\"><h2>Configure OpenIDM and Activiti to Share the Same User Store<\/h2><\/span>\n<p>* Setup penidm-ui-demo module by following previous section.<br \/>\n* Setup JDBC repository, e.g MySQL, and OpenIDM and Activiti will share the same JDBC user store.<br \/>\n* To setup MySQL as OpenIDM user store, see <a href=\"?p=5737#Setup_MySQL_Data_Store\">this post<\/a>.<br \/>\n* Check <em>conf\/repo.jdbc.json<\/em> to make sure the existence of:<\/p>\n<pre lang=\"bash\">\r\n\"find-by-id\" : \"SELECT fullobject FROM ${_dbSchema}.${_mainTable} obj INNER JOIN ${_dbSchema}.objecttypes objtype ON objtype.id = obj.objecttypes_id WHERE obj.objectid = ${id} AND objtype.objecttype = ${_resource}\",\r\n<\/pre>\n<span id=\"Check_Workflow_Integration\"><h2>Check Workflow Integration<\/h2><\/span>\n<p>* Check workflow and JDBC repo bundle:<\/p>\n<pre lang=\"bash\">\r\n-> scr list\r\n...\r\n[  16] [active       ] org.forgerock.openidm.repo.jdbc\r\n[  15] [active       ] org.forgerock.openidm.workflow\r\n...\r\n<\/pre>\n<p>* List workflows:<\/p>\n<pre lang=\"bash\">\r\ncurl \\\r\n  --header \"X-OpenIDM-Username: openidm-admin\" \\\r\n  --header \"X-OpenIDM-Password: openidm-admin\" \\\r\n  --request GET \"http:\/\/localhost:8080\/openidm\/workflow\"\r\n\r\n{\"result\":[{\"name\":\"Osgi process\",\"processDefinitionId\":\"osgiProcess:1:3\",\"key\":\"osgiProcess\"}]}\r\n<\/pre>\n<p>* Create workflow instance:<\/p>\n<pre lang=\"bash\">\r\ncurl \\\r\n\t--header \"X-OpenIDM-Username: openidm-admin\" \\\r\n\t--header \"X-OpenIDM-Password: openidm-admin\" \\\r\n\t--request POST \"http:\/\/localhost:8080\/openidm\/workflow\/processinstance?_action=createProcessInstance\" \\\r\n\t--data '{ \"key\":\"osgiProcess\" }'\r\n\t\t\r\n{\"_id\":\"101\",\"processInstanceId\":\"101\",\"status\":\"ended\",\"businessKey\":null,\"processDefinitionId\":\"osgiProcess:1:5\"}\r\n<\/pre>\n<span id=\"References\"><h2>References<\/h2><\/span>\n<p>* <a href=\"https:\/\/wikis.forgerock.org\/confluence\/display\/openidm\/OpenIDM+2.1+-++Howto+get+the+Activiti+Explorer+running+in+OpenIDM\">OpenIDM 2.1 &#8211; Howto get the Activiti Explorer running in OpenIDM<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Build * Local Activiti integration is included in standard OpenIDM 2.1 build. * Activiti Explorer is not included in the 2.1 build so you need to build it yourself. Integrate Activiti Explorer with Local Activiti Engine * For OpenIDM 2.1, &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=6156\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[239,203],"tags":[618,560,204],"class_list":["post-6156","post","type-post","status-publish","format-standard","hentry","category-activiti","category-openidm","tag-activiti","tag-mysql","tag-openidm-2"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-1Bi","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/6156","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6156"}],"version-history":[{"count":8,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/6156\/revisions"}],"predecessor-version":[{"id":6244,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/6156\/revisions\/6244"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}