syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [04/34] syncope git commit: [SYNCOPE-1369] Flowable support refactored as extension + code review (now with variable cleanup)
Date Tue, 25 Sep 2018 12:32:02 GMT
http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/fit/console-reference/pom.xml
----------------------------------------------------------------------
diff --git a/fit/console-reference/pom.xml b/fit/console-reference/pom.xml
index 8f98203..ca8d1e1 100644
--- a/fit/console-reference/pom.xml
+++ b/fit/console-reference/pom.xml
@@ -58,6 +58,12 @@ under the License.
     </dependency>
 
     <dependency>
+      <groupId>org.apache.syncope.ext.flowable</groupId>
+      <artifactId>syncope-ext-flowable-client-console</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
       <groupId>org.apache.syncope.ext.camel</groupId>
       <artifactId>syncope-ext-camel-client-console</artifactId>
       <version>${project.version}</version>
@@ -123,12 +129,6 @@ under the License.
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.flowable</groupId>
-      <artifactId>flowable-ui-modeler-app</artifactId>
-      <type>war</type>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
       <groupId>org.apache.syncope.fit</groupId>
       <artifactId>syncope-fit-build-tools</artifactId>
       <version>${project.version}</version>
@@ -145,58 +145,7 @@ under the License.
   </dependencies>
 
   <build>
-    <plugins>
-      
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <inherited>true</inherited>
-        <executions>
-          <execution>
-            <id>setupFlowableModeler</id>
-            <phase>process-resources</phase>
-            <configuration>
-              <target>
-                <unzip src="${settings.localRepository}/org/flowable/flowable-ui-modeler-app/${flowable.version}/flowable-ui-modeler-app-${flowable.version}.war"
dest="${flowable-modeler.directory}">
-                  <patternset>
-                    <include name="WEB-INF/classes/static/**" />
-                    <include name="WEB-INF/lib/flowable-ui-modeler-logic-${flowable.version}.jar"
/>
-                  </patternset>
-                </unzip>
-                
-                <unzip src="${flowable-modeler.directory}/WEB-INF/lib/flowable-ui-modeler-logic-${flowable.version}.jar"
dest="${flowable-modeler.directory}">
-                  <patternset>
-                    <include name="stencilset_bpmn.json" />
-                  </patternset>
-                </unzip>
-                
-                <move todir="${flowable-modeler.directory}">
-                  <fileset dir="${flowable-modeler.directory}/WEB-INF/classes/static/">
-                    <include name="**" />
-                  </fileset>
-                </move>
-                <delete dir="${flowable-modeler.directory}/WEB-INF" />
-                
-                <replace file="${flowable-modeler.directory}/index.html" token="&lt;/head&gt;"
value="&lt;script type=&quot;text/javascript&quot;&gt;window.onunload = refreshParent;
function refreshParent() { window.opener.location.reload(); }&lt;/script&gt;&lt;/head&gt;"
/>
-                <replace file="${flowable-modeler.directory}/index.html" token=" ng-click=&quot;backToLanding()&quot;"
value=" disabled=&quot;disabled&quot;" />
-                <replace file="${flowable-modeler.directory}/index.html" token="&lt;ul
class=&quot;nav navbar-nav&quot; id=&quot;main-nav&quot;" value="&lt;ul
class=&quot;nav navbar-nav&quot; id=&quot;main-nav&quot; style=&quot;display:
none;&quot;" />
-                <replace file="${flowable-modeler.directory}/index.html" token="&lt;div
class=&quot;pull-right" value="&lt;div style=&quot;display: none;&quot; class=&quot;pull-right"
/>
-                <replace file="${flowable-modeler.directory}/editor-app/editor.html" token="&lt;div
class=&quot;btn-group pull-right&quot;" value="&lt;div style=&quot;display:
none;&quot; class=&quot;btn-group pull-right&quot;" />
-                <replace file="${flowable-modeler.directory}/editor-app/configuration/toolbar-default-actions.js"
token="$location.path('/processes');" value="window.close();" />
- 
-                <copy file="${basedir}/src/main/resources/app-cfg.js" todir="${flowable-modeler.directory}/scripts"
overwrite="true" />
-                <copy file="${basedir}/src/main/resources/url-config.js" todir="${flowable-modeler.directory}/editor-app/configuration"
overwrite="true" />
-                <copy file="${basedir}/src/main/resources/toolbar.js" todir="${flowable-modeler.directory}/editor-app/configuration"
overwrite="true" />
-                <copy file="${basedir}/src/main/resources/save-model.html" todir="${flowable-modeler.directory}/editor-app/popups"
overwrite="true" />
-              </target>
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      
+    <plugins>      
       <plugin>
         <groupId>org.codehaus.cargo</groupId>
         <artifactId>cargo-maven2-plugin</artifactId>

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/fit/console-reference/src/main/resources/app-cfg.js
----------------------------------------------------------------------
diff --git a/fit/console-reference/src/main/resources/app-cfg.js b/fit/console-reference/src/main/resources/app-cfg.js
deleted file mode 100644
index 15ec23a..0000000
--- a/fit/console-reference/src/main/resources/app-cfg.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright 2005-2015 Alfresco Software, Ltd.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-var FLOWABLE = FLOWABLE || {};
-
-FLOWABLE.CONFIG = {
-	'onPremise' : true,
-    'contextRoot': window.location.toString().substr(0, window.location.toString().indexOf('/flowable-modeler'))
+ '/flowable-modeler',
-    'webContextRoot': window.location.toString().substr(0, window.location.toString().indexOf('/flowable-modeler')
+ '/flowable-modeler'),
-	'datesLocalization' : false
-};

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/fit/console-reference/src/main/resources/console.properties
----------------------------------------------------------------------
diff --git a/fit/console-reference/src/main/resources/console.properties b/fit/console-reference/src/main/resources/console.properties
index 18c424f..484a331 100644
--- a/fit/console-reference/src/main/resources/console.properties
+++ b/fit/console-reference/src/main/resources/console.properties
@@ -33,15 +33,12 @@ maxWaitTimeOnApplyChanges=30
 
 csrf=true
 
-flowableModelerDirectory=${flowable-modeler.directory}
-
 reconciliationReportKey=c3520ad9-179f-49e7-b315-d684d216dd97
 
 page.dashboard=org.apache.syncope.client.console.pages.Dashboard
 page.realms=org.apache.syncope.client.console.pages.Realms
 page.topology=org.apache.syncope.client.console.topology.Topology
 page.reports=org.apache.syncope.client.console.pages.Reports
-page.workflow=org.apache.syncope.client.console.pages.Workflow
 page.audit=org.apache.syncope.client.console.pages.Audit
 page.implementations=org.apache.syncope.client.console.pages.Implementations
 page.logs=org.apache.syncope.client.console.pages.Logs

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/fit/console-reference/src/main/resources/save-model.html
----------------------------------------------------------------------
diff --git a/fit/console-reference/src/main/resources/save-model.html b/fit/console-reference/src/main/resources/save-model.html
deleted file mode 100644
index abd5ecf..0000000
--- a/fit/console-reference/src/main/resources/save-model.html
+++ /dev/null
@@ -1,132 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<div class="modal" ng-controller="SaveModelCtrl">
-  <div class="modal-dialog">
-    <div class="modal-content">
-      <div class="modal-header">
-        <h2>{{'MODEL.SAVE.TITLE'| translate}}</h2>
-      </div>
-      <div class="modal-body">
-        <div ng-if="saveDialog.errorMessage && saveDialog.errorMessage.length
> 0" class="alert error" style="font-size: 14px; margin-top:20px">
-          <div class="popup-error" style="font-size: 14px">
-            <span class="glyphicon glyphicon-remove-circle"></span>
-            <span>{{saveDialog.errorMessage}}</span>
-          </div>
-        </div>
-        <div class="form-group">
-          <label for="nameField">{{'MODEL.NAME'| translate}}</label>
-          <input type="text"
-                 ng-disabled="status.loading || (error && error.conflictResolveAction
== 'saveAs')"
-                 id="nameField"
-                 class="form-control"
-                 ng-model="saveDialog.name" readonly="readonly"
-                 auto-focus />
-        </div>
-        <div class="form-group" style="display: none">
-          <label for="keyField">{{'MODEL.KEY'| translate}}</label>
-          <input type="text"
-                 ng-disabled="status.loading || (error && error.conflictResolveAction
== 'saveAs')"
-                 id="keyField"
-                 class="form-control"
-                 ng-model="saveDialog.key" ng-init="saveDialog.key = saveDialog.name"/>
-        </div>
-        <div class="form-group" style="display: none">
-          <label for="docTextArea">{{'MODEL.DESCRIPTION'| translate}}</label>
-          <textarea id="docTextArea" ng-disabled="status.loading" class="form-control"
ng-model="saveDialog.description"></textarea>
-        </div>
-        <div class="checkbox" ng-show="!error && !error.isConflict" style="display:
none">
-          <label>
-            <input type="checkbox" ng-disabled="status.loading" ng-model="saveDialog.newVersion"
>
-            {{'MODEL.SAVE.NEWVERSION'| translate}}
-          </label>
-        </div>
-        <div class="form-group" ng-if="saveDialog.newVersion">
-          <label for="commentTextArea">{{'MODEL.SAVE.COMMENT'| translate}}</label>
-          <textarea id="commentTextArea" class="form-control" ng-model="saveDialog.comment"
ng-disabled="status.loading"></textarea>
-        </div>
-
-        <div ng-if="saveDialog.validationErrors" class="alert error" style="font-size:
14px; margin-top:20px">
-
-          <div class="popup-error" style="font-size: 14px">
-            <span class="glyphicon glyphicon-remove-circle"></span>
-            <span>{{'MODEL.VALIDATIONERRORS'| translate:error}}</span>
-          </div>
-        </div>
-
-        <div ng-if="error && error.isConflict && !status.loading" class="alert
error" style="font-size: 14px; margin-top:20px">
-
-          <div class="popup-error" style="font-size: 14px">
-            <span class="glyphicon glyphicon-remove-circle"></span>
-            <span>{{'MODEL.CONFLICT.WRITE'| translate:error}}</span>
-          </div>
-
-          <div>
-
-            <div style="font-size: 14px; margin-bottom: 10px">{{'MODEL.CONFLICT.WRITE.OPTIONS'|
translate}}</div>
-            <div class="btn-group" data-toggle="buttons">
-              <label class="btn btn-danger"
-                     ng-click="error.conflictResolveAction = 'overwrite'">
-                <input type="radio" name="options" id="option1">
-                {{'MODEL.CONFLICT.WRITE.OPTION.OVERWRITE'| translate}}
-              </label>
-              <label class="btn btn-danger"
-                     ng-click="error.conflictResolveAction = 'discardChanges'">
-                <input type="radio" name="options" id="option2">
-                {{'MODEL.CONFLICT.WRITE.OPTION.DISCARDCHANGES'| translate}}
-              </label>
-              <label class="btn btn-danger"
-                     ng-click="error.conflictResolveAction = 'saveAs'">
-                <input type="radio" name="options" id="option3" ng-disabled="account.type
!= 'enterprise'">
-                {{'MODEL.CONFLICT.WRITE.OPTION.SAVEAS'| translate}}
-              </label>
-              <label class="btn btn-danger"
-                     ng-click="error.conflictResolveAction = 'newVersion'">
-                <input type="radio" name="options" id="optio43">
-                {{'MODEL.CONFLICT.WRITE.OPTION.NEWVERSION'| translate}}
-              </label>
-            </div>
-
-            <div ng-if="error.conflictResolveAction == 'saveAs'" style="margin-top: 10px">
-              <span>{{'MODEL.CONFLICT.SAVEAS'| translate}}</span>
-              <input type="text" ng-model="error.saveAs" style="width: 300px" auto-focus>
-            </div>
-          </div>
-
-        </div>
-
-      </div>
-      <div class="modal-footer">
-
-        <div class="pull-right">
-          <button type="button" class="btn" ng-click="close()" ng-disabled="status.loading"
translate>ACTION.CANCEL</button>
-          <button class="btn btn-primary" ng-click="saveAndClose()" ng-disabled="status.loading
|| saveDialog.name.length == 0 || saveDialog.key.length == 0" ng-show="!error && !error.isConflict"
translate>ACTION.SAVE-AND-CLOSE</button>
-          <button class="btn btn-primary" ng-click="save()" ng-disabled="status.loading
|| saveDialog.name.length == 0 || saveDialog.key.length == 0" ng-show="!error && !error.isConflict"
style="display: none" translate>ACTION.SAVE</button>
-          <button class="btn btn-primary" ng-click="okClicked()" ng-disabled="isOkButtonDisabled()"
ng-show="error && error.isConflict" translate>ACTION.OK</button>
-        </div>
-
-        <div class="pull-right popup-error" ng-if="error && !error.isConflict">
-          <span>{{'MODEL.SAVE.ERROR'| translate}}</span>
-        </div>
-
-        <loading></loading>
-
-      </div>
-    </div>
-  </div>
-</div>

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/fit/console-reference/src/main/resources/toolbar.js
----------------------------------------------------------------------
diff --git a/fit/console-reference/src/main/resources/toolbar.js b/fit/console-reference/src/main/resources/toolbar.js
deleted file mode 100644
index 920718c..0000000
--- a/fit/console-reference/src/main/resources/toolbar.js
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-'use strict';
-
-var FLOWABLE = FLOWABLE || {};
-FLOWABLE.TOOLBAR_CONFIG = {
-    "items" : [
-        {
-            "type" : "button",
-            "title" : "TOOLBAR.ACTION.SAVE",
-            "cssClass" : "editor-icon editor-icon-save",
-            "action" : "FLOWABLE.TOOLBAR.ACTIONS.saveModel"
-        },
-        {
-            "type" : "separator",
-            "title" : "",
-            "cssClass" : "toolbar-separator"
-        },
-        {
-            "type" : "button",
-            "title" : "TOOLBAR.ACTION.CUT",
-            "cssClass" : "editor-icon editor-icon-cut",
-            "action" : "FLOWABLE.TOOLBAR.ACTIONS.cut",
-            "enabled" : false,
-            "enabledAction" : "element"
-        },
-        {
-            "type" : "button",
-            "title" : "TOOLBAR.ACTION.COPY",
-            "cssClass" : "editor-icon editor-icon-copy",
-            "action" : "FLOWABLE.TOOLBAR.ACTIONS.copy",
-            "enabled" : false,
-            "enabledAction" : "element"
-        },
-        {
-            "type" : "button",
-            "title" : "TOOLBAR.ACTION.PASTE",
-            "cssClass" : "editor-icon editor-icon-paste",
-            "action" : "FLOWABLE.TOOLBAR.ACTIONS.paste",
-            "enabled" : false
-        },
-        {
-            "type" : "button",
-            "title" : "TOOLBAR.ACTION.DELETE",
-            "cssClass" : "editor-icon editor-icon-delete",
-            "action" : "FLOWABLE.TOOLBAR.ACTIONS.deleteItem",
-            "enabled" : false,
-            "enabledAction" : "element"
-        },
-        {
-            "type" : "separator",
-            "title" : "TOOLBAR.ACTION.SAVE",
-            "cssClass" : "toolbar-separator"
-        },
-        {
-            "type" : "button",
-            "title" : "TOOLBAR.ACTION.REDO",
-            "cssClass" : "editor-icon editor-icon-redo",
-            "action" : "FLOWABLE.TOOLBAR.ACTIONS.redo",
-            "enabled" : false
-        },
-        {
-            "type" : "button",
-            "title" : "TOOLBAR.ACTION.UNDO",
-            "cssClass" : "editor-icon editor-icon-undo",
-            "action" : "FLOWABLE.TOOLBAR.ACTIONS.undo",
-            "enabled" : false
-        },
-        {
-            "type" : "separator",
-            "title" : "TOOLBAR.ACTION.SAVE",
-            "cssClass" : "toolbar-separator"
-        },
-        {
-            "type" : "button",
-            "title" : "TOOLBAR.ACTION.ALIGNVERTICAL",
-            "cssClass" : "editor-icon editor-icon-align-vertical",
-            "action" : "FLOWABLE.TOOLBAR.ACTIONS.alignVertical",
-            "enabled" : false,
-            "enabledAction" : "element",
-            "disableInForm" : true,
-            "minSelectionCount" : 2
-        },
-        {
-            "type" : "button",
-            "title" : "TOOLBAR.ACTION.ALIGNHORIZONTAL",
-            "cssClass" : "editor-icon editor-icon-align-horizontal",
-            "action" : "FLOWABLE.TOOLBAR.ACTIONS.alignHorizontal",
-            "enabledAction" : "element",
-            "enabled" : false,
-            "disableInForm" : true,
-            "minSelectionCount" : 2
-        },
-        {
-            "type" : "button",
-            "title" : "TOOLBAR.ACTION.SAMESIZE",
-            "cssClass" : "editor-icon editor-icon-same-size",
-            "action" : "FLOWABLE.TOOLBAR.ACTIONS.sameSize",
-            "enabledAction" : "element",
-            "enabled" : false,
-            "disableInForm" : true,
-            "minSelectionCount" : 2
-        },
-        {
-        	"type" : "separator",
-        	"title" : "TOOLBAR.ACTION.SAVE",
-        	"cssClass" : "toolbar-separator",
-        	"disableInForm" : true
-        },
-        {
-            "type" : "button",
-            "title" : "TOOLBAR.ACTION.ZOOMIN",
-            "cssClass" : "editor-icon editor-icon-zoom-in",
-            "action" : "FLOWABLE.TOOLBAR.ACTIONS.zoomIn"
-        },
-        {
-            "type" : "button",
-            "title" : "TOOLBAR.ACTION.ZOOMOUT",
-            "cssClass" : "editor-icon editor-icon-zoom-out",
-            "action" : "FLOWABLE.TOOLBAR.ACTIONS.zoomOut"
-        },
-        {
-            "type" : "button",
-            "title" : "TOOLBAR.ACTION.ZOOMACTUAL",
-            "cssClass" : "editor-icon editor-icon-zoom-actual",
-            "action" : "FLOWABLE.TOOLBAR.ACTIONS.zoomActual"
-        },
-        {
-            "type" : "button",
-            "title" : "TOOLBAR.ACTION.ZOOMFIT",
-            "cssClass" : "editor-icon editor-icon-zoom-fit",
-            "action" : "FLOWABLE.TOOLBAR.ACTIONS.zoomFit"
-        },
-        {
-            "type" : "separator",
-            "title" : "TOOLBAR.ACTION.SAVE",
-            "cssClass" : "toolbar-separator",
-            "disableInForm" : true
-        },
-    	{
-            "type" : "button",
-            "title" : "TOOLBAR.ACTION.BENDPOINT.ADD",
-            "cssClass" : "editor-icon editor-icon-bendpoint-add",
-            "action" : "FLOWABLE.TOOLBAR.ACTIONS.addBendPoint",
-            "id" : "add-bendpoint-button",
-            "disableInForm" : true
-    	},
-    	{
-    	    "type" : "button",
-    	    "title" : "TOOLBAR.ACTION.BENDPOINT.REMOVE",
-    	    "cssClass" : "editor-icon editor-icon-bendpoint-remove",
-    	    "action" : "FLOWABLE.TOOLBAR.ACTIONS.removeBendPoint",
-    	    "id" : "remove-bendpoint-button",
-    	    "disableInForm" : true
-    	},
-        {
-            "type" : "separator",
-            "title": "",
-            "cssClass" : "toolbar-separator",
-            "disableInForm" : true
-        }
-    ],
-    
-    "secondaryItems" : []
-};

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/fit/console-reference/src/main/resources/url-config.js
----------------------------------------------------------------------
diff --git a/fit/console-reference/src/main/resources/url-config.js b/fit/console-reference/src/main/resources/url-config.js
deleted file mode 100644
index 6bf8979..0000000
--- a/fit/console-reference/src/main/resources/url-config.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-var FLOWABLE = FLOWABLE || {};
-
-FLOWABLE.URL = {
-
-    getModel: function(modelId) {
-    return window.location.toString().substr(0, window.location.toString().indexOf('/flowable-modeler'))
-            + "/workflowDefGET?modelId=" + modelId;
-    },
-
-    getStencilSet: function() {
-    return window.location.toString().substr(0, window.location.toString().indexOf('/flowable-modeler'))
-            + "/flowable-modeler/stencilset_bpmn.json";
-    },
-    
-    getCmmnStencilSet: function() {
-        return FLOWABLE.CONFIG.contextRoot + '/app/rest/stencil-sets/cmmneditor?version='
+ Date.now();
-    },
-
-    putModel: function(modelId) {
-    return window.location.toString().substr(0, window.location.toString().indexOf('/flowable-modeler'))
-            + "/workflowDefPUT?modelId=" + modelId;
-    },
-    
-    validateModel: function(){
-		return FLOWABLE.CONFIG.contextRoot + '/app/rest/model/validate';
-    }
-};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/fit/console-reference/src/test/resources/hotswap-agent.properties
----------------------------------------------------------------------
diff --git a/fit/console-reference/src/test/resources/hotswap-agent.properties b/fit/console-reference/src/test/resources/hotswap-agent.properties
index a2e489e..56ea8cc 100644
--- a/fit/console-reference/src/test/resources/hotswap-agent.properties
+++ b/fit/console-reference/src/test/resources/hotswap-agent.properties
@@ -22,6 +22,7 @@ autoHotswap=true
 extraClasspath=\
 ${basedir}/../../client/console/target/classes/org,\
 ${basedir}/../../ext/camel/client-console/target/classes/org,\
+${basedir}/../../ext/flowable/client-console/target/classes/org,\
 ${basedir}/../../ext/saml2sp/client-console/target/classes/org,\
 ${basedir}/../../ext/scimv2/client-console/target/classes/org,\
 ${basedir}/../../ext/oidcclient/client-console/target/classes/org

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/fit/core-reference/pom.xml
----------------------------------------------------------------------
diff --git a/fit/core-reference/pom.xml b/fit/core-reference/pom.xml
index 80851f5..c89241e 100644
--- a/fit/core-reference/pom.xml
+++ b/fit/core-reference/pom.xml
@@ -138,6 +138,18 @@ under the License.
       <scope>test</scope>
     </dependency>
     <dependency>
+      <groupId>org.apache.syncope.ext.flowable</groupId>
+      <artifactId>syncope-ext-flowable-rest-cxf</artifactId>
+      <version>${project.version}</version>
+      <scope>test</scope>          
+    </dependency>
+    <dependency>
+      <groupId>org.apache.syncope.ext.flowable</groupId>
+      <artifactId>syncope-ext-flowable-client-console</artifactId>
+      <version>${project.version}</version>
+      <scope>test</scope>
+    </dependency>  
+    <dependency>
       <groupId>org.apache.syncope.ext.camel</groupId>
       <artifactId>syncope-ext-camel-rest-cxf</artifactId>
       <version>${project.version}</version>
@@ -1466,8 +1478,8 @@ under the License.
       
       <dependencies>
         <dependency>
-          <groupId>org.apache.syncope.core</groupId>
-          <artifactId>syncope-core-workflow-flowable</artifactId>
+          <groupId>org.apache.syncope.ext.flowable</groupId>
+          <artifactId>syncope-ext-flowable-rest-cxf</artifactId>
           <version>${project.version}</version>
         </dependency>
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/fit/core-reference/src/main/java/org/apache/syncope/fit/core/reference/AssignDirectorGroup.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/main/java/org/apache/syncope/fit/core/reference/AssignDirectorGroup.java
b/fit/core-reference/src/main/java/org/apache/syncope/fit/core/reference/AssignDirectorGroup.java
new file mode 100644
index 0000000..abdfcb6
--- /dev/null
+++ b/fit/core-reference/src/main/java/org/apache/syncope/fit/core/reference/AssignDirectorGroup.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.fit.core.reference;
+
+import org.apache.syncope.common.lib.patch.MembershipPatch;
+import org.apache.syncope.common.lib.patch.UserPatch;
+import org.apache.syncope.core.flowable.impl.FlowableRuntimeUtils;
+import org.apache.syncope.core.flowable.task.AbstractFlowableServiceTask;
+import org.apache.syncope.core.persistence.api.dao.UserDAO;
+import org.apache.syncope.core.persistence.api.entity.user.User;
+import org.apache.syncope.core.provisioning.api.PropagationByResource;
+import org.apache.syncope.core.provisioning.api.data.UserDataBinder;
+import org.springframework.beans.factory.annotation.Autowired;
+
+public class AssignDirectorGroup extends AbstractFlowableServiceTask {
+
+    @Autowired
+    private UserDataBinder dataBinder;
+
+    @Autowired
+    private UserDAO userDAO;
+
+    @Override
+    protected void doExecute(final String executionId) {
+        User user = engine.getRuntimeService().
+                getVariable(executionId, FlowableRuntimeUtils.USER, User.class);
+
+        Boolean secondLevelApprove = engine.getRuntimeService().
+                getVariable(executionId, "secondLevelApprove", Boolean.class);
+        if (Boolean.TRUE.equals(secondLevelApprove)) {
+            user = userDAO.save(user);
+
+            UserPatch userPatch = new UserPatch();
+            userPatch.setKey(user.getKey());
+            userPatch.getMemberships().add(new MembershipPatch.Builder().
+                    group("ebf97068-aa4b-4a85-9f01-680e8c4cf227").build());
+
+            PropagationByResource propByRes = dataBinder.update(user, userPatch);
+
+            // report updated user and propagation by resource as result
+            engine.getRuntimeService().setVariable(executionId, FlowableRuntimeUtils.USER,
user);
+            engine.getRuntimeService().setVariable(executionId, FlowableRuntimeUtils.PROP_BY_RESOURCE,
propByRes);
+        } else {
+            LOG.info("Second level was not approved, not assigning the director group to
" + user.getUsername());
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/fit/core-reference/src/main/resources/all/workflow.properties
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/main/resources/all/workflow.properties b/fit/core-reference/src/main/resources/all/workflow.properties
index 36af01c..be8a7bb 100644
--- a/fit/core-reference/src/main/resources/all/workflow.properties
+++ b/fit/core-reference/src/main/resources/all/workflow.properties
@@ -16,6 +16,6 @@
 # under the License.
 wf.directory=${conf.directory}
 historyLevel=activity
-uwfAdapter=org.apache.syncope.core.workflow.flowable.FlowableUserWorkflowAdapter
+uwfAdapter=org.apache.syncope.core.flowable.impl.FlowableUserWorkflowAdapter
 gwfAdapter=org.apache.syncope.core.workflow.java.DefaultGroupWorkflowAdapter
 awfAdapter=org.apache.syncope.core.workflow.java.DefaultAnyObjectWorkflowAdapter

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/fit/core-reference/src/main/resources/all/workflowTestContext.xml
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/main/resources/all/workflowTestContext.xml b/fit/core-reference/src/main/resources/all/workflowTestContext.xml
new file mode 100644
index 0000000..2329c53
--- /dev/null
+++ b/fit/core-reference/src/main/resources/all/workflowTestContext.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans" 
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                           http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+  <bean id="assignDirectorGroup" class="org.apache.syncope.fit.core.reference.AssignDirectorGroup"/>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/fit/core-reference/src/main/resources/directorGroupRequest.bpmn20.xml
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/main/resources/directorGroupRequest.bpmn20.xml b/fit/core-reference/src/main/resources/directorGroupRequest.bpmn20.xml
new file mode 100644
index 0000000..fd482b5
--- /dev/null
+++ b/fit/core-reference/src/main/resources/directorGroupRequest.bpmn20.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" 
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+             xmlns:flowable="http://flowable.org/bpmn"
+             xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" 
+             xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" 
+             xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" 
+             typeLanguage="http://www.w3.org/2001/XMLSchema" 
+             expressionLanguage="http://www.w3.org/1999/XPath" 
+             targetNamespace="http://www.flowable.org/processdef">
+
+  <process id="directorGroupRequest" name="Assign director group" isExecutable="true">
+    <startEvent id="startevent1" name="Start"/>
+    <endEvent id="endevent1" name="End"/>
+    <userTask id="firstApproval" name="First approval" flowable:formKey="firstApproval"
flowable:candidateGroups="managingDirector">
+      <extensionElements>
+        <flowable:formProperty id="username" name="Username" type="string" expression="${userTO.username}"
writable="false"/>
+        <flowable:formProperty id="firstLevelApprove" name="Approve?" type="boolean" variable="firstLevelApprove"
required="true"/>
+        <flowable:formProperty id="rejectReason" name="Reason for rejecting" type="string"
variable="rejectReason"/>
+      </extensionElements>
+    </userTask>
+    <userTask id="secondApproval" name="Second approval" flowable:formKey="secondApproval"
flowable:candidateGroups="root">
+      <extensionElements>
+        <flowable:formProperty id="username" name="Username" type="string" expression="${userTO.username}"
writable="false"/>
+        <flowable:formProperty id="secondLevelApprove" name="Approve?" type="boolean"
variable="secondLevelApprove" required="true"/>
+        <flowable:formProperty id="rejectReason" name="Reason for rejecting" type="string"
variable="rejectReason"/>
+      </extensionElements>
+    </userTask>
+    <serviceTask id="assignDirectorGroup" name="Assign director group" flowable:expression="#{assignDirectorGroup.execute(execution.processInstanceId)}"/>
+    <exclusiveGateway id="sid-1E2454BD-FAE9-4A15-B169-D41843A39C15" default="sid-338A4B20-89E9-46B2-8AB3-36291455051B"/>
+    <sequenceFlow id="sid-A7C20EB5-AAE6-4CF3-A151-F1A9FA9207A0" sourceRef="firstApproval"
targetRef="sid-1E2454BD-FAE9-4A15-B169-D41843A39C15"/>
+    <sequenceFlow id="sid-92E7D60C-09E7-465A-8115-C60ACD06E955" sourceRef="secondApproval"
targetRef="assignDirectorGroup"/>
+    <sequenceFlow id="sid-90AAE913-A229-4136-8C1D-AB5A78ACE209" sourceRef="assignDirectorGroup"
targetRef="endevent1"/>
+    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="firstApproval"/>
+    <sequenceFlow id="sid-338A4B20-89E9-46B2-8AB3-36291455051B" sourceRef="sid-1E2454BD-FAE9-4A15-B169-D41843A39C15"
targetRef="secondApproval"/>
+    <sequenceFlow id="sid-D43EBA31-49F5-4305-B71D-122E98D1DE22" sourceRef="sid-1E2454BD-FAE9-4A15-B169-D41843A39C15"
targetRef="endevent1">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${!firstLevelApprove}]]></conditionExpression>
+    </sequenceFlow>
+  </process>
+  <bpmndi:BPMNDiagram id="BPMNDiagram_directorGroupRequest">
+    <bpmndi:BPMNPlane bpmnElement="directorGroupRequest" id="BPMNPlane_directorGroupRequest">
+      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
+        <omgdc:Bounds height="30.0" width="30.0" x="180.0" y="130.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
+        <omgdc:Bounds height="28.0" width="28.0" x="711.0" y="131.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="firstApproval" id="BPMNShape_firstApproval">
+        <omgdc:Bounds height="80.0" width="100.0" x="300.0" y="105.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="secondApproval" id="BPMNShape_secondApproval">
+        <omgdc:Bounds height="80.0" width="100.0" x="480.0" y="235.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="assignDirectorGroup" id="BPMNShape_assignDirectorGroup">
+        <omgdc:Bounds height="80.0" width="100.0" x="675.0" y="235.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="sid-1E2454BD-FAE9-4A15-B169-D41843A39C15" id="BPMNShape_sid-1E2454BD-FAE9-4A15-B169-D41843A39C15">
+        <omgdc:Bounds height="40.0" width="40.0" x="510.0" y="125.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
+        <omgdi:waypoint x="209.94999837389875" y="145.0"/>
+        <omgdi:waypoint x="300.0" y="145.0"/>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="sid-338A4B20-89E9-46B2-8AB3-36291455051B" id="BPMNEdge_sid-338A4B20-89E9-46B2-8AB3-36291455051B">
+        <omgdi:waypoint x="530.4263565891473" y="164.51605344694036"/>
+        <omgdi:waypoint x="530.1542471042471" y="235.0"/>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="sid-90AAE913-A229-4136-8C1D-AB5A78ACE209" id="BPMNEdge_sid-90AAE913-A229-4136-8C1D-AB5A78ACE209">
+        <omgdi:waypoint x="725.0" y="235.0"/>
+        <omgdi:waypoint x="725.0" y="158.9499300542635"/>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="sid-92E7D60C-09E7-465A-8115-C60ACD06E955" id="BPMNEdge_sid-92E7D60C-09E7-465A-8115-C60ACD06E955">
+        <omgdi:waypoint x="579.9499999997585" y="275.0"/>
+        <omgdi:waypoint x="674.9999999998254" y="275.0"/>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="sid-D43EBA31-49F5-4305-B71D-122E98D1DE22" id="BPMNEdge_sid-D43EBA31-49F5-4305-B71D-122E98D1DE22">
+        <omgdi:waypoint x="549.49393353939" y="145.45103092783506"/>
+        <omgdi:waypoint x="711.0000424606164" y="145.03586113839918"/>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="sid-A7C20EB5-AAE6-4CF3-A151-F1A9FA9207A0" id="BPMNEdge_sid-A7C20EB5-AAE6-4CF3-A151-F1A9FA9207A0">
+        <omgdi:waypoint x="399.9499999999431" y="145.0"/>
+        <omgdi:waypoint x="510.0" y="145.0"/>
+      </bpmndi:BPMNEdge>
+    </bpmndi:BPMNPlane>
+  </bpmndi:BPMNDiagram>
+</definitions>
\ No newline at end of file


Mime
View raw message