You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2017/08/28 09:13:18 UTC

[3/8] syncope git commit: [SYNCOPE-1054] Replacing Activiti with Flowable - still 5.x

http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MigrationITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MigrationITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MigrationITCase.java
deleted file mode 100644
index 40e878a..0000000
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MigrationITCase.java
+++ /dev/null
@@ -1,530 +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.
- */
-package org.apache.syncope.fit.core;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
-import javax.ws.rs.core.Response;
-import org.apache.commons.io.IOUtils;
-import org.apache.syncope.common.lib.SyncopeClientException;
-import org.apache.syncope.common.lib.SyncopeConstants;
-import org.apache.syncope.common.lib.to.AnyTypeClassTO;
-import org.apache.syncope.common.lib.to.AttrTO;
-import org.apache.syncope.common.lib.to.BulkAction;
-import org.apache.syncope.common.lib.to.ConnInstanceTO;
-import org.apache.syncope.common.lib.to.GroupTO;
-import org.apache.syncope.common.lib.to.ItemTO;
-import org.apache.syncope.common.lib.to.MappingTO;
-import org.apache.syncope.common.lib.to.PlainSchemaTO;
-import org.apache.syncope.common.lib.to.ProvisionTO;
-import org.apache.syncope.common.lib.to.PullTaskTO;
-import org.apache.syncope.common.lib.to.RealmTO;
-import org.apache.syncope.common.lib.to.ResourceTO;
-import org.apache.syncope.common.lib.to.UserTO;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.apache.syncope.common.lib.types.AttrSchemaType;
-import org.apache.syncope.common.lib.types.ConnConfPropSchema;
-import org.apache.syncope.common.lib.types.ConnConfProperty;
-import org.apache.syncope.common.lib.types.ConnectorCapability;
-import org.apache.syncope.common.lib.types.MappingPurpose;
-import org.apache.syncope.common.lib.types.PullMode;
-import org.apache.syncope.common.lib.types.SchemaType;
-import org.apache.syncope.common.lib.types.TaskType;
-import org.apache.syncope.common.rest.api.beans.AnyQuery;
-import org.apache.syncope.common.rest.api.beans.TaskQuery;
-import org.apache.syncope.common.rest.api.service.ConnectorService;
-import org.apache.syncope.common.rest.api.service.TaskService;
-import org.apache.syncope.core.migration.MigrationPullActions;
-import org.apache.syncope.core.provisioning.api.utils.ExceptionUtils2;
-import org.identityconnectors.common.security.GuardedString;
-import org.identityconnectors.framework.common.objects.ObjectClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.jdbc.datasource.DriverManagerDataSource;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-
-@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration(locations = { "classpath:migrationEnv.xml" })
-public class MigrationITCase extends AbstractTaskITCase {
-
-    private static final String CONNINSTANCE_DISPLAY_NAME = "syncope12DB";
-
-    private static final String RESOURCE_KEY = "Syncope 1.2";
-
-    private static final String MIGRATION_CIPHER_ALGORITHM = "migrationCipherAlgorithm";
-
-    private static final String MIGRATION_RESOURCES_SCHEMA = "migrationResources";
-
-    private static final String MIGRATION_MEMBERSHIPS_SCHEMA = "migrationMemberships";
-
-    private static final String MIGRATION_ANYTYPE_CLASS = "migration";
-
-    private static final String MIGRATION_REALM = "migration";
-
-    private static final String PULL_TASK_NAME = "Syncope 1.2 migration";
-
-    private static String basedir;
-
-    private static String connectorServerLocation;
-
-    private static String connIdDbVersion;
-
-    @BeforeClass
-    public static void setup() throws IOException {
-        InputStream propStream = null;
-        try {
-            Properties props = new Properties();
-            propStream = MigrationITCase.class.getResourceAsStream("/test.properties");
-            props.load(propStream);
-            IOUtils.closeQuietly(propStream);
-            propStream = MigrationITCase.class.getResourceAsStream("/connid.properties");
-            props.load(propStream);
-
-            basedir = props.getProperty("basedir");
-
-            for (String location : props.getProperty("connid.locations").split(",")) {
-                if (!location.startsWith("file")) {
-                    connectorServerLocation = location;
-                }
-            }
-
-            connIdDbVersion = props.getProperty("connid.database.version");
-        } catch (Exception e) {
-            LOG.error("Could not load /connid.properties", e);
-        } finally {
-            IOUtils.closeQuietly(propStream);
-        }
-
-        assertNotNull(basedir);
-        assertNotNull(connectorServerLocation);
-        assertNotNull(connIdDbVersion);
-    }
-
-    @Autowired
-    private DriverManagerDataSource syncope12DataSource;
-
-    private String setupAnyTypeClass() {
-        PlainSchemaTO cipherAlgorithm = new PlainSchemaTO();
-        cipherAlgorithm.setKey(MIGRATION_CIPHER_ALGORITHM);
-        cipherAlgorithm.setType(AttrSchemaType.String);
-        cipherAlgorithm.setReadonly(true);
-        cipherAlgorithm = createSchema(SchemaType.PLAIN, cipherAlgorithm);
-
-        PlainSchemaTO migrationResources = new PlainSchemaTO();
-        migrationResources.setKey(MIGRATION_RESOURCES_SCHEMA);
-        migrationResources.setType(AttrSchemaType.String);
-        migrationResources.setMultivalue(true);
-        migrationResources.setReadonly(true);
-        migrationResources = createSchema(SchemaType.PLAIN, migrationResources);
-
-        PlainSchemaTO migrationMemberships = new PlainSchemaTO();
-        migrationMemberships.setKey(MIGRATION_MEMBERSHIPS_SCHEMA);
-        migrationMemberships.setType(AttrSchemaType.String);
-        migrationMemberships.setMultivalue(true);
-        migrationMemberships.setReadonly(true);
-        migrationMemberships = createSchema(SchemaType.PLAIN, migrationMemberships);
-
-        AnyTypeClassTO migration = new AnyTypeClassTO();
-        migration.setKey(MIGRATION_ANYTYPE_CLASS);
-        migration.getPlainSchemas().add(cipherAlgorithm.getKey());
-        migration.getPlainSchemas().add(migrationResources.getKey());
-        migration.getPlainSchemas().add(migrationMemberships.getKey());
-
-        Response response = anyTypeClassService.create(migration);
-        assertEquals(Response.Status.CREATED.getStatusCode(), response.getStatusInfo().getStatusCode());
-
-        return MIGRATION_ANYTYPE_CLASS;
-    }
-
-    private String setupConnector() {
-        ConnInstanceTO connInstanceTO = new ConnInstanceTO();
-        connInstanceTO.setAdminRealm(SyncopeConstants.ROOT_REALM);
-        connInstanceTO.setLocation(connectorServerLocation);
-        connInstanceTO.setConnectorName("net.tirasa.connid.bundles.db.scriptedsql.ScriptedSQLConnector");
-        connInstanceTO.setBundleName("net.tirasa.connid.bundles.db.scriptedsql");
-        connInstanceTO.setVersion(connIdDbVersion);
-        connInstanceTO.setDisplayName(CONNINSTANCE_DISPLAY_NAME);
-
-        ConnConfPropSchema schema = new ConnConfPropSchema();
-        schema.setName("user");
-        schema.setType(String.class.getName());
-        ConnConfProperty property = new ConnConfProperty();
-        property.setSchema(schema);
-        property.getValues().add(syncope12DataSource.getUsername());
-        connInstanceTO.getConf().add(property);
-
-        schema = new ConnConfPropSchema();
-        schema.setName("password");
-        schema.setType(GuardedString.class.getName());
-        property = new ConnConfProperty();
-        property.setSchema(schema);
-        property.getValues().add(syncope12DataSource.getPassword());
-        connInstanceTO.getConf().add(property);
-
-        schema = new ConnConfPropSchema();
-        schema.setName("jdbcDriver");
-        property = new ConnConfProperty();
-        property.setSchema(schema);
-        property.getValues().add("org.h2.Driver");
-        connInstanceTO.getConf().add(property);
-
-        schema = new ConnConfPropSchema();
-        schema.setName("jdbcUrlTemplate");
-        property = new ConnConfProperty();
-        property.setSchema(schema);
-        property.getValues().add(syncope12DataSource.getUrl());
-        connInstanceTO.getConf().add(property);
-
-        schema = new ConnConfPropSchema();
-        schema.setName("testScriptFileName");
-        property = new ConnConfProperty();
-        property.setSchema(schema);
-        property.getValues().add(basedir + "/../../core/migration/src/main/resources/scripted/TestScript.groovy");
-        connInstanceTO.getConf().add(property);
-
-        schema = new ConnConfPropSchema();
-        schema.setName("schemaScriptFileName");
-        property = new ConnConfProperty();
-        property.setSchema(schema);
-        property.getValues().add(basedir + "/../../core/migration/src/main/resources/scripted/SchemaScript.groovy");
-        connInstanceTO.getConf().add(property);
-
-        schema = new ConnConfPropSchema();
-        schema.setName("searchScriptFileName");
-        property = new ConnConfProperty();
-        property.setSchema(schema);
-        property.getValues().add(basedir + "/../../core/migration/src/main/resources/scripted/SearchScript.groovy");
-        connInstanceTO.getConf().add(property);
-
-        schema = new ConnConfPropSchema();
-        schema.setName("syncScriptFileName");
-        property = new ConnConfProperty();
-        property.setSchema(schema);
-        property.getValues().add(basedir + "/../../core/migration/src/main/resources/scripted/SyncScript.groovy");
-        connInstanceTO.getConf().add(property);
-
-        connInstanceTO.getCapabilities().add(ConnectorCapability.SEARCH);
-        connInstanceTO.getCapabilities().add(ConnectorCapability.SYNC);
-
-        Response response = connectorService.create(connInstanceTO);
-        connInstanceTO = getObject(response.getLocation(), ConnectorService.class, ConnInstanceTO.class);
-
-        try {
-            connectorService.check(connInstanceTO);
-        } catch (Exception e) {
-            fail("Unexpected exception:\n" + ExceptionUtils2.getFullStackTrace(e));
-        }
-
-        return connInstanceTO.getKey();
-    }
-
-    private void setupResource(final String connectorKey, final String anyTypeClass) {
-        ResourceTO resourceTO = new ResourceTO();
-
-        resourceTO.setKey(RESOURCE_KEY);
-        resourceTO.setConnector(connectorKey);
-
-        // USER
-        ProvisionTO provisionTO = new ProvisionTO();
-        provisionTO.setAnyType(AnyTypeKind.USER.name());
-        provisionTO.setObjectClass(ObjectClass.ACCOUNT_NAME);
-        provisionTO.getAuxClasses().add(anyTypeClass);
-        resourceTO.getProvisions().add(provisionTO);
-
-        MappingTO mapping = new MappingTO();
-        provisionTO.setMapping(mapping);
-
-        ItemTO item = new ItemTO();
-        item.setIntAttrName("username");
-        item.setExtAttrName("username");
-        item.setMandatoryCondition("true");
-        item.setPurpose(MappingPurpose.PULL);
-        mapping.setConnObjectKeyItem(item);
-
-        item = new ItemTO();
-        item.setPassword(true);
-        item.setIntAttrName("password");
-        item.setExtAttrName("__PASSWORD__");
-        item.setMandatoryCondition("true");
-        item.setPurpose(MappingPurpose.PULL);
-        mapping.add(item);
-
-        item = new ItemTO();
-        item.setIntAttrName(MIGRATION_CIPHER_ALGORITHM);
-        item.setExtAttrName("cipherAlgorithm");
-        item.setMandatoryCondition("true");
-        item.setPurpose(MappingPurpose.PULL);
-        mapping.add(item);
-
-        item = new ItemTO();
-        item.setIntAttrName("surname");
-        item.setExtAttrName("surname");
-        item.setMandatoryCondition("false");
-        item.setPurpose(MappingPurpose.PULL);
-        mapping.add(item);
-
-        item = new ItemTO();
-        item.setIntAttrName("email");
-        item.setExtAttrName("email");
-        item.setMandatoryCondition("false");
-        item.setPurpose(MappingPurpose.PULL);
-        mapping.add(item);
-
-        item = new ItemTO();
-        item.setIntAttrName("firstname");
-        item.setExtAttrName("firstname");
-        item.setMandatoryCondition("false");
-        item.setPurpose(MappingPurpose.PULL);
-        mapping.add(item);
-
-        item = new ItemTO();
-        item.setIntAttrName("ctype");
-        item.setExtAttrName("type");
-        item.setMandatoryCondition("false");
-        item.setPurpose(MappingPurpose.PULL);
-        mapping.add(item);
-
-        item = new ItemTO();
-        item.setIntAttrName("gender");
-        item.setExtAttrName("gender");
-        item.setMandatoryCondition("false");
-        item.setPurpose(MappingPurpose.PULL);
-        mapping.add(item);
-
-        item = new ItemTO();
-        item.setIntAttrName("loginDate");
-        item.setExtAttrName("loginDate");
-        item.setMandatoryCondition("false");
-        item.setPurpose(MappingPurpose.PULL);
-        mapping.add(item);
-
-        item = new ItemTO();
-        item.setIntAttrName(MIGRATION_RESOURCES_SCHEMA);
-        item.setExtAttrName("__RESOURCES__");
-        item.setMandatoryCondition("false");
-        item.setPurpose(MappingPurpose.PULL);
-        mapping.add(item);
-
-        // GROUP
-        provisionTO = new ProvisionTO();
-        provisionTO.setAnyType(AnyTypeKind.GROUP.name());
-        provisionTO.setObjectClass(ObjectClass.GROUP_NAME);
-        provisionTO.getAuxClasses().add(anyTypeClass);
-        resourceTO.getProvisions().add(provisionTO);
-
-        mapping = new MappingTO();
-        provisionTO.setMapping(mapping);
-
-        item = new ItemTO();
-        item.setIntAttrName("name");
-        item.setExtAttrName("name");
-        item.setMandatoryCondition("true");
-        item.setPurpose(MappingPurpose.PULL);
-        mapping.setConnObjectKeyItem(item);
-
-        item = new ItemTO();
-        item.setIntAttrName("show");
-        item.setExtAttrName("show");
-        item.setMandatoryCondition("false");
-        item.setPurpose(MappingPurpose.PULL);
-        mapping.add(item);
-
-        item = new ItemTO();
-        item.setIntAttrName("title");
-        item.setExtAttrName("title");
-        item.setMandatoryCondition("false");
-        item.setPurpose(MappingPurpose.PULL);
-        mapping.add(item);
-
-        item = new ItemTO();
-        item.setIntAttrName("icon");
-        item.setExtAttrName("icon");
-        item.setMandatoryCondition("false");
-        item.setPurpose(MappingPurpose.PULL);
-        mapping.add(item);
-
-        item = new ItemTO();
-        item.setIntAttrName(MIGRATION_RESOURCES_SCHEMA);
-        item.setExtAttrName("__RESOURCES__");
-        item.setMandatoryCondition("false");
-        item.setPurpose(MappingPurpose.PULL);
-        mapping.add(item);
-
-        item = new ItemTO();
-        item.setIntAttrName(MIGRATION_MEMBERSHIPS_SCHEMA);
-        item.setExtAttrName("__MEMBERSHIPS__");
-        item.setMandatoryCondition("false");
-        item.setPurpose(MappingPurpose.PULL);
-        mapping.add(item);
-
-        resourceService.create(resourceTO);
-    }
-
-    private void setupRealm() {
-        try {
-            realmService.list("/" + MIGRATION_REALM);
-        } catch (SyncopeClientException e) {
-            LOG.error("{} not found? Let's attempt to re-create...", MIGRATION_REALM, e);
-
-            RealmTO realm = new RealmTO();
-            realm.setName(MIGRATION_REALM);
-            realmService.create("/", realm);
-        }
-    }
-
-    private String setupPullTask() {
-        PullTaskTO task = new PullTaskTO();
-        task.setActive(true);
-        task.setName(PULL_TASK_NAME);
-        task.setResource(RESOURCE_KEY);
-        task.setPerformCreate(true);
-        task.setSyncStatus(true);
-        task.setPullMode(PullMode.FULL_RECONCILIATION);
-        task.setDestinationRealm("/" + MIGRATION_REALM);
-        task.getActionsClassNames().add(MigrationPullActions.class.getName());
-
-        UserTO user = new UserTO();
-        user.getPlainAttrs().add(new AttrTO.Builder().schema("userId").value("'12' + username + '@syncope.apache.org'").
-                build());
-        user.getPlainAttrs().add(new AttrTO.Builder().schema("fullname").value("username").build());
-        task.getTemplates().put(AnyTypeKind.USER.name(), user);
-
-        Response response = taskService.create(task);
-        task = getObject(response.getLocation(), TaskService.class, PullTaskTO.class);
-
-        return task.getKey();
-    }
-
-    @Test
-    public void migrateFromSyncope12() throws InterruptedException {
-        // 1. cleanup
-        try {
-            taskService.list(
-                    new TaskQuery.Builder(TaskType.PULL).resource(RESOURCE_KEY).build()).getResult().stream().
-                    filter(task -> PULL_TASK_NAME.equals(PullTaskTO.class.cast(task).getName())).
-                    forEachOrdered(task -> {
-                        taskService.delete(task.getKey());
-                    });
-        } catch (Exception e) {
-            // ignore
-        }
-        try {
-            resourceService.delete(RESOURCE_KEY);
-        } catch (Exception e) {
-            // ignore
-        }
-        try {
-            connectorService.list(null).stream().
-                    filter(connInstance -> CONNINSTANCE_DISPLAY_NAME.equals(connInstance.getDisplayName())).
-                    forEachOrdered(connInstance -> {
-                        connectorService.delete(connInstance.getKey());
-                    });
-        } catch (Exception e) {
-            // ignore
-        }
-        try {
-            schemaService.delete(SchemaType.PLAIN, MIGRATION_CIPHER_ALGORITHM);
-            schemaService.delete(SchemaType.PLAIN, MIGRATION_MEMBERSHIPS_SCHEMA);
-            schemaService.delete(SchemaType.PLAIN, MIGRATION_RESOURCES_SCHEMA);
-            anyTypeClassService.delete(MIGRATION_ANYTYPE_CLASS);
-        } catch (Exception e) {
-            // ignore
-        }
-
-        BulkAction bulkAction = new BulkAction();
-        bulkAction.setType(BulkAction.Type.DELETE);
-
-        userService.search(new AnyQuery.Builder().fiql("username==*12").build()).getResult().
-                forEach(user -> {
-                    bulkAction.getTargets().add(user.getKey());
-                });
-        userService.bulk(bulkAction);
-
-        bulkAction.getTargets().clear();
-        groupService.search(new AnyQuery.Builder().fiql("name==*12").build()).getResult().
-                forEach(group -> {
-                    bulkAction.getTargets().add(group.getKey());
-                });
-        groupService.bulk(bulkAction);
-
-        // 2. setup
-        setupResource(setupConnector(), setupAnyTypeClass());
-        setupRealm();
-        String pullTaskKey = setupPullTask();
-
-        // 3. execute pull task
-        execProvisioningTask(taskService, pullTaskKey, 50, false);
-
-        // 4. verify
-        UserTO user = null;
-
-        int i = 0;
-        boolean membershipFound = false;
-        do {
-            try {
-                Thread.sleep(1000);
-            } catch (InterruptedException e) {
-            }
-
-            try {
-                user = userService.read("rossini12");
-                assertNotNull(user);
-
-                membershipFound = user.getMemberships().stream().
-                        anyMatch(object -> "1 root12".equals(object.getGroupName()));
-            } catch (Exception e) {
-                // ignore
-            }
-
-            i++;
-        } while (!membershipFound && i < 50);
-        assertNotNull(user);
-        assertTrue(membershipFound);
-
-        assertEquals("/" + MIGRATION_REALM, user.getRealm());
-        GroupTO group = groupService.read("12 aRoleForPropagation12");
-        assertNotNull(group);
-        assertEquals("/" + MIGRATION_REALM, group.getRealm());
-
-        // 4a. user plain attrs
-        assertEquals("Gioacchino", user.getPlainAttr("firstname").get().getValues().get(0));
-        assertEquals("Rossini", user.getPlainAttr("surname").get().getValues().get(0));
-
-        // 4b. user resources
-        assertTrue(user.getResources().contains(RESOURCE_NAME_TESTDB2));
-
-        // 4c. user password
-        assertNotNull(clientFactory.create("bellini12", ADMIN_PWD).self());
-
-        // 4d. group plain attrs
-        assertEquals("r12", group.getPlainAttr("title").get().getValues().get(0));
-
-        // 4e. group resources
-        assertTrue(group.getResources().contains(RESOURCE_NAME_CSV));
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PullTaskITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PullTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PullTaskITCase.java
index 9427672..9b754df 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PullTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PullTaskITCase.java
@@ -80,7 +80,7 @@ import org.apache.syncope.common.rest.api.service.TaskService;
 import org.apache.syncope.core.provisioning.java.pushpull.DBPasswordPullActions;
 import org.apache.syncope.core.provisioning.java.pushpull.LDAPPasswordPullActions;
 import org.apache.syncope.core.spring.security.Encryptor;
-import org.apache.syncope.fit.ActivitiDetector;
+import org.apache.syncope.fit.FlowableDetector;
 import org.apache.syncope.fit.core.reference.PrefixItemTransformer;
 import org.apache.syncope.fit.core.reference.TestReconciliationFilterBuilder;
 import org.apache.syncope.fit.core.reference.TestPullActions;
@@ -222,7 +222,7 @@ public class PullTaskITCase extends AbstractTaskITCase {
             UserTO userTO = userService.read(inUserTO.getKey());
             assertNotNull(userTO);
             assertEquals(userName, userTO.getUsername());
-            assertEquals(ActivitiDetector.isActivitiEnabledForUsers(syncopeService)
+            assertEquals(FlowableDetector.isFlowableEnabledForUsers(syncopeService)
                     ? "active" : "created", userTO.getStatus());
             assertEquals("test9@syncope.apache.org", userTO.getPlainAttr("email").get().getValues().get(0));
             assertEquals("test9@syncope.apache.org", userTO.getPlainAttr("userId").get().getValues().get(0));

http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserITCase.java
index f10e60c..20d58da 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserITCase.java
@@ -81,7 +81,7 @@ import org.apache.syncope.common.rest.api.service.UserService;
 import org.apache.syncope.fit.core.reference.TestAccountRuleConf;
 import org.apache.syncope.fit.core.reference.TestPasswordRuleConf;
 import org.apache.syncope.fit.AbstractITCase;
-import org.apache.syncope.fit.ActivitiDetector;
+import org.apache.syncope.fit.FlowableDetector;
 import org.identityconnectors.framework.common.objects.OperationalAttributes;
 import org.junit.Assume;
 import org.junit.Test;
@@ -683,7 +683,7 @@ public class UserITCase extends AbstractITCase {
 
     @Test
     public void createActivate() {
-        Assume.assumeTrue(ActivitiDetector.isActivitiEnabledForUsers(syncopeService));
+        Assume.assumeTrue(FlowableDetector.isFlowableEnabledForUsers(syncopeService));
 
         UserTO userTO = getUniqueSampleTO("createActivate@syncope.apache.org");
 
@@ -721,7 +721,7 @@ public class UserITCase extends AbstractITCase {
         userTO = createUser(userTO).getEntity();
 
         assertNotNull(userTO);
-        assertEquals(ActivitiDetector.isActivitiEnabledForUsers(syncopeService)
+        assertEquals(FlowableDetector.isFlowableEnabledForUsers(syncopeService)
                 ? "active"
                 : "created", userTO.getStatus());
 
@@ -758,7 +758,7 @@ public class UserITCase extends AbstractITCase {
         userTO.getResources().add(RESOURCE_NAME_LDAP);
         userTO = createUser(userTO).getEntity();
         assertNotNull(userTO);
-        assertEquals(ActivitiDetector.isActivitiEnabledForUsers(syncopeService)
+        assertEquals(FlowableDetector.isFlowableEnabledForUsers(syncopeService)
                 ? "active"
                 : "created", userTO.getStatus());
         String userKey = userTO.getKey();

http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserSelfITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserSelfITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserSelfITCase.java
index 425ec7a..186af9c 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserSelfITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserSelfITCase.java
@@ -18,8 +18,6 @@
  */
 package org.apache.syncope.fit.core;
 
-import org.apache.syncope.fit.ActivitiDetector;
-
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
@@ -54,6 +52,7 @@ import org.apache.syncope.common.rest.api.service.ResourceService;
 import org.apache.syncope.common.rest.api.service.UserSelfService;
 import org.apache.syncope.common.rest.api.service.UserService;
 import org.apache.syncope.fit.AbstractITCase;
+import org.apache.syncope.fit.FlowableDetector;
 import org.junit.Assume;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -76,7 +75,7 @@ public class UserSelfITCase extends AbstractITCase {
 
     @Test
     public void create() {
-        Assume.assumeTrue(ActivitiDetector.isActivitiEnabledForUsers(syncopeService));
+        Assume.assumeTrue(FlowableDetector.isFlowableEnabledForUsers(syncopeService));
 
         // 1. self-registration as admin: failure
         try {
@@ -98,7 +97,7 @@ public class UserSelfITCase extends AbstractITCase {
 
     @Test
     public void createAndApprove() {
-        Assume.assumeTrue(ActivitiDetector.isActivitiEnabledForUsers(syncopeService));
+        Assume.assumeTrue(FlowableDetector.isFlowableEnabledForUsers(syncopeService));
 
         // self-create user with membership: goes 'createApproval' with resources and membership but no propagation
         UserTO userTO = UserITCase.getUniqueSampleTO("anonymous@syncope.apache.org");
@@ -176,14 +175,14 @@ public class UserSelfITCase extends AbstractITCase {
                 readEntity(new GenericType<ProvisioningResult<UserTO>>() {
                 }).getEntity();
         assertNotNull(updated);
-        assertEquals(ActivitiDetector.isActivitiEnabledForUsers(syncopeService)
+        assertEquals(FlowableDetector.isFlowableEnabledForUsers(syncopeService)
                 ? "active" : "created", updated.getStatus());
         assertTrue(updated.getUsername().endsWith("XX"));
     }
 
     @Test
     public void updateWithApproval() {
-        Assume.assumeTrue(ActivitiDetector.isActivitiEnabledForUsers(syncopeService));
+        Assume.assumeTrue(FlowableDetector.isFlowableEnabledForUsers(syncopeService));
 
         // 1. create user as admin
         UserTO created = createUser(UserITCase.getUniqueSampleTO("anonymous@syncope.apache.org")).getEntity();
@@ -246,7 +245,7 @@ public class UserSelfITCase extends AbstractITCase {
                 new GenericType<ProvisioningResult<UserTO>>() {
         }).getEntity();
         assertNotNull(deleted);
-        assertEquals(ActivitiDetector.isActivitiEnabledForUsers(syncopeService)
+        assertEquals(FlowableDetector.isFlowableEnabledForUsers(syncopeService)
                 ? "deleteApproval" : null, deleted.getStatus());
     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserWorkflowITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserWorkflowITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserWorkflowITCase.java
index 163ee3a..76b9fa0 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserWorkflowITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserWorkflowITCase.java
@@ -18,7 +18,7 @@
  */
 package org.apache.syncope.fit.core;
 
-import org.apache.syncope.fit.ActivitiDetector;
+import org.apache.syncope.fit.FlowableDetector;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotEquals;
@@ -65,7 +65,7 @@ public class UserWorkflowITCase extends AbstractITCase {
 
     @Test
     public void createWithReject() {
-        Assume.assumeTrue(ActivitiDetector.isActivitiEnabledForUsers(syncopeService));
+        Assume.assumeTrue(FlowableDetector.isFlowableEnabledForUsers(syncopeService));
 
         UserTO userTO = UserITCase.getUniqueSampleTO("createWithReject@syncope.apache.org");
         userTO.getResources().add(RESOURCE_NAME_TESTDB);
@@ -139,7 +139,7 @@ public class UserWorkflowITCase extends AbstractITCase {
 
     @Test
     public void createWithApproval() {
-        Assume.assumeTrue(ActivitiDetector.isActivitiEnabledForUsers(syncopeService));
+        Assume.assumeTrue(FlowableDetector.isFlowableEnabledForUsers(syncopeService));
 
         // read forms *before* any operation
         List<WorkflowFormTO> forms = userWorkflowService.getForms();
@@ -213,7 +213,7 @@ public class UserWorkflowITCase extends AbstractITCase {
 
     @Test
     public void updateApproval() {
-        Assume.assumeTrue(ActivitiDetector.isActivitiEnabledForUsers(syncopeService));
+        Assume.assumeTrue(FlowableDetector.isFlowableEnabledForUsers(syncopeService));
 
         // read forms *before* any operation
         List<WorkflowFormTO> forms = userWorkflowService.getForms();
@@ -271,7 +271,7 @@ public class UserWorkflowITCase extends AbstractITCase {
 
     @Test
     public void issueSYNCOPE15() {
-        Assume.assumeTrue(ActivitiDetector.isActivitiEnabledForUsers(syncopeService));
+        Assume.assumeTrue(FlowableDetector.isFlowableEnabledForUsers(syncopeService));
 
         // read forms *before* any operation
         List<WorkflowFormTO> forms = userWorkflowService.getForms();

http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/fit/core-reference/src/test/java/org/apache/syncope/fit/core/WorkflowITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/WorkflowITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/WorkflowITCase.java
index 1817c24..e9b28ba 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/WorkflowITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/WorkflowITCase.java
@@ -31,7 +31,7 @@ import org.apache.commons.io.IOUtils;
 import org.apache.syncope.common.lib.to.WorkflowDefinitionTO;
 import org.apache.syncope.common.lib.types.AnyTypeKind;
 import org.apache.syncope.fit.AbstractITCase;
-import org.apache.syncope.fit.ActivitiDetector;
+import org.apache.syncope.fit.FlowableDetector;
 import org.junit.Assume;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -42,7 +42,7 @@ public class WorkflowITCase extends AbstractITCase {
 
     @BeforeClass
     public static void findDefault() {
-        Assume.assumeTrue(ActivitiDetector.isActivitiEnabledForUsers(syncopeService));
+        Assume.assumeTrue(FlowableDetector.isFlowableEnabledForUsers(syncopeService));
         Optional<WorkflowDefinitionTO> found = workflowService.list(AnyTypeKind.USER.name()).stream().
                 filter(object -> object.isMain()).findAny();
         if (found.isPresent()) {
@@ -53,7 +53,7 @@ public class WorkflowITCase extends AbstractITCase {
 
     @Test
     public void exportUserDefinition() throws IOException {
-        Assume.assumeTrue(ActivitiDetector.isActivitiEnabledForUsers(syncopeService));
+        Assume.assumeTrue(FlowableDetector.isFlowableEnabledForUsers(syncopeService));
         Response response = workflowService.get(AnyTypeKind.USER.name(), defaultUserKey);
         assertTrue(response.getMediaType().toString().
                 startsWith(clientFactory.getContentType().getMediaType().toString()));
@@ -65,7 +65,7 @@ public class WorkflowITCase extends AbstractITCase {
 
     @Test
     public void updateUserDefinition() throws IOException {
-        Assume.assumeTrue(ActivitiDetector.isActivitiEnabledForUsers(syncopeService));
+        Assume.assumeTrue(FlowableDetector.isFlowableEnabledForUsers(syncopeService));
         Response response = workflowService.get(AnyTypeKind.USER.name(), defaultUserKey);
         String definition = IOUtils.toString((InputStream) response.getEntity(), StandardCharsets.UTF_8);
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/fit/core-reference/src/test/resources/addActivitiToContent.xsl
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/resources/addActivitiToContent.xsl b/fit/core-reference/src/test/resources/addActivitiToContent.xsl
deleted file mode 100644
index 44fd18e..0000000
--- a/fit/core-reference/src/test/resources/addActivitiToContent.xsl
+++ /dev/null
@@ -1,50 +0,0 @@
-<?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.
--->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version="1.0">
-  
-  <xsl:template match="/dataset">
-    <dataset>
-      <xsl:apply-templates/>
-      
-      <ACT_RU_EXECUTION ID_="4" REV_="2" PROC_INST_ID_="4" PROC_DEF_ID_="userWorkflow:1:4" ACT_ID_="active" IS_ACTIVE_="1" IS_CONCURRENT_="0" IS_SCOPE_="1" IS_EVENT_SCOPE_="0" SUSPENSION_STATE_="1"/>
-      <ACT_RU_TASK ID_="5" REV_="2" EXECUTION_ID_="4" PROC_INST_ID_="4" PROC_DEF_ID_="userWorkflow:1:4" NAME_="Active" TASK_DEF_KEY_="active" PRIORITY_="50" CREATE_TIME_="2013-02-25T17:19:03+0100"/>
-
-      <ACT_RU_EXECUTION ID_="6" REV_="2" PROC_INST_ID_="6" PROC_DEF_ID_="userWorkflow:1:4" ACT_ID_="active" IS_ACTIVE_="1" IS_CONCURRENT_="0" IS_SCOPE_="1" IS_EVENT_SCOPE_="0" SUSPENSION_STATE_="1"/>
-      <ACT_RU_TASK ID_="7" REV_="2" EXECUTION_ID_="6" PROC_INST_ID_="6" PROC_DEF_ID_="userWorkflow:1:4" NAME_="Active" TASK_DEF_KEY_="active" PRIORITY_="50" CREATE_TIME_="2013-02-25T17:19:03+0100"/>
-
-      <ACT_RU_EXECUTION ID_="8" REV_="2" PROC_INST_ID_="8" PROC_DEF_ID_="userWorkflow:1:4" ACT_ID_="active" IS_ACTIVE_="1" IS_CONCURRENT_="0" IS_SCOPE_="1" IS_EVENT_SCOPE_="0" SUSPENSION_STATE_="1"/>
-      <ACT_RU_TASK ID_="9" REV_="2" EXECUTION_ID_="8" PROC_INST_ID_="8" PROC_DEF_ID_="userWorkflow:1:4" NAME_="Active" TASK_DEF_KEY_="active" PRIORITY_="50" CREATE_TIME_="2013-02-25T17:19:03+0100"/>
-
-      <ACT_RU_EXECUTION ID_="10" REV_="2" PROC_INST_ID_="10" PROC_DEF_ID_="userWorkflow:1:4" ACT_ID_="active" IS_ACTIVE_="1" IS_CONCURRENT_="0" IS_SCOPE_="1" IS_EVENT_SCOPE_="0" SUSPENSION_STATE_="1"/>
-      <ACT_RU_TASK ID_="11" REV_="2" EXECUTION_ID_="10" PROC_INST_ID_="10" PROC_DEF_ID_="userWorkflow:1:4" NAME_="Active" TASK_DEF_KEY_="active" PRIORITY_="50" CREATE_TIME_="2013-02-25T17:19:03+0100"/>
-
-      <ACT_RU_EXECUTION ID_="12" REV_="2" PROC_INST_ID_="12" PROC_DEF_ID_="userWorkflow:1:4" ACT_ID_="active" IS_ACTIVE_="1" IS_CONCURRENT_="0" IS_SCOPE_="1" IS_EVENT_SCOPE_="0" SUSPENSION_STATE_="1"/>
-      <ACT_RU_TASK ID_="13" REV_="2" EXECUTION_ID_="12" PROC_INST_ID_="12" PROC_DEF_ID_="userWorkflow:1:4" NAME_="Active" TASK_DEF_KEY_="active" PRIORITY_="50" CREATE_TIME_="2013-02-25T17:19:03+0100"/>
-    </dataset>
-  </xsl:template>
-  
-  <xsl:template match="node()|@*|comment()">
-    <xsl:copy>
-      <xsl:apply-templates select="@*|node()"/>
-    </xsl:copy>
-  </xsl:template>
-
-</xsl:stylesheet>

http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/fit/core-reference/src/test/resources/addFlowableToContent.xsl
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/resources/addFlowableToContent.xsl b/fit/core-reference/src/test/resources/addFlowableToContent.xsl
new file mode 100644
index 0000000..746580d
--- /dev/null
+++ b/fit/core-reference/src/test/resources/addFlowableToContent.xsl
@@ -0,0 +1,50 @@
+<?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.
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0">
+  
+  <xsl:template match="/dataset">
+    <dataset>
+      <xsl:apply-templates/>
+      
+      <ACT_RU_EXECUTION ID_="4" REV_="2" PROC_INST_ID_="4" PROC_DEF_ID_="userWorkflow:1:4" ACT_ID_="active" IS_ACTIVE_="1" IS_CONCURRENT_="0" IS_SCOPE_="1" IS_EVENT_SCOPE_="0" SUSPENSION_STATE_="1"/>
+      <ACT_RU_TASK ID_="5" REV_="2" EXECUTION_ID_="4" PROC_INST_ID_="4" PROC_DEF_ID_="userWorkflow:1:4" NAME_="Active" TASK_DEF_KEY_="active" PRIORITY_="50" CREATE_TIME_="2013-02-25T17:19:03+0100"/>
+
+      <ACT_RU_EXECUTION ID_="6" REV_="2" PROC_INST_ID_="6" PROC_DEF_ID_="userWorkflow:1:4" ACT_ID_="active" IS_ACTIVE_="1" IS_CONCURRENT_="0" IS_SCOPE_="1" IS_EVENT_SCOPE_="0" SUSPENSION_STATE_="1"/>
+      <ACT_RU_TASK ID_="7" REV_="2" EXECUTION_ID_="6" PROC_INST_ID_="6" PROC_DEF_ID_="userWorkflow:1:4" NAME_="Active" TASK_DEF_KEY_="active" PRIORITY_="50" CREATE_TIME_="2013-02-25T17:19:03+0100"/>
+
+      <ACT_RU_EXECUTION ID_="8" REV_="2" PROC_INST_ID_="8" PROC_DEF_ID_="userWorkflow:1:4" ACT_ID_="active" IS_ACTIVE_="1" IS_CONCURRENT_="0" IS_SCOPE_="1" IS_EVENT_SCOPE_="0" SUSPENSION_STATE_="1"/>
+      <ACT_RU_TASK ID_="9" REV_="2" EXECUTION_ID_="8" PROC_INST_ID_="8" PROC_DEF_ID_="userWorkflow:1:4" NAME_="Active" TASK_DEF_KEY_="active" PRIORITY_="50" CREATE_TIME_="2013-02-25T17:19:03+0100"/>
+
+      <ACT_RU_EXECUTION ID_="10" REV_="2" PROC_INST_ID_="10" PROC_DEF_ID_="userWorkflow:1:4" ACT_ID_="active" IS_ACTIVE_="1" IS_CONCURRENT_="0" IS_SCOPE_="1" IS_EVENT_SCOPE_="0" SUSPENSION_STATE_="1"/>
+      <ACT_RU_TASK ID_="11" REV_="2" EXECUTION_ID_="10" PROC_INST_ID_="10" PROC_DEF_ID_="userWorkflow:1:4" NAME_="Active" TASK_DEF_KEY_="active" PRIORITY_="50" CREATE_TIME_="2013-02-25T17:19:03+0100"/>
+
+      <ACT_RU_EXECUTION ID_="12" REV_="2" PROC_INST_ID_="12" PROC_DEF_ID_="userWorkflow:1:4" ACT_ID_="active" IS_ACTIVE_="1" IS_CONCURRENT_="0" IS_SCOPE_="1" IS_EVENT_SCOPE_="0" SUSPENSION_STATE_="1"/>
+      <ACT_RU_TASK ID_="13" REV_="2" EXECUTION_ID_="12" PROC_INST_ID_="12" PROC_DEF_ID_="userWorkflow:1:4" NAME_="Active" TASK_DEF_KEY_="active" PRIORITY_="50" CREATE_TIME_="2013-02-25T17:19:03+0100"/>
+    </dataset>
+  </xsl:template>
+  
+  <xsl:template match="node()|@*|comment()">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/fit/core-reference/src/test/resources/console.properties
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/resources/console.properties b/fit/core-reference/src/test/resources/console.properties
index 6ed91a2..addbf5e 100644
--- a/fit/core-reference/src/test/resources/console.properties
+++ b/fit/core-reference/src/test/resources/console.properties
@@ -29,7 +29,7 @@ useGZIPCompression=true
 
 csrf=false
 
-activitiModelerDirectory=${activiti-modeler.directory}
+flowableModelerDirectory=${flowable-modeler.directory}
 
 reconciliationReportKey=c3520ad9-179f-49e7-b315-d684d216dd97
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/fit/core-reference/src/test/resources/rebel.xml
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/resources/rebel.xml b/fit/core-reference/src/test/resources/rebel.xml
index 6cb85c4..dc52713 100644
--- a/fit/core-reference/src/test/resources/rebel.xml
+++ b/fit/core-reference/src/test/resources/rebel.xml
@@ -53,8 +53,8 @@ under the License.
     <dir name="${basedir}/../../core/workflow-java/target/classes">
       <exclude name="workflowContext.xml"/>
     </dir>
-    <dir name="${basedir}/../../core/workflow-activiti/target/classes">
-      <exclude name="workflowActivitiContext.xml"/>
+    <dir name="${basedir}/../../core/workflow-flowable/target/classes">
+      <exclude name="workflowFlowableContext.xml"/>
     </dir>
     <dir name="${basedir}/../../core/migration/target/classes">
     </dir>