syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [13/34] syncope git commit: [SYNCOPE-1369] Flowable support refactored as extension + code review (now with variable cleanup)
Date Tue, 25 Sep 2018 12:32:11 GMT
http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/core/persistence-jpa/src/test/resources/domains/TwoContent.xml
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/test/resources/domains/TwoContent.xml b/core/persistence-jpa/src/test/resources/domains/TwoContent.xml
index b35beb4..23e372d 100644
--- a/core/persistence-jpa/src/test/resources/domains/TwoContent.xml
+++ b/core/persistence-jpa/src/test/resources/domains/TwoContent.xml
@@ -105,15 +105,6 @@ under the License.
   <CPlainAttrValue id="e5fa94db-b524-4309-908d-8198d0b3f779"
                    attribute_id="bcfd7efc-0605-4b5e-b4bb-85c1d5f6493a" booleanValue="0"/>
   
-  <!-- Identity Recertification interval in days -->                   
-  <SyncopeSchema id="identity.recertification.day.interval"/>
-  <PlainSchema id="identity.recertification.day.interval" type="Long"
-               mandatoryCondition="false" multivalue="0" uniqueConstraint="0" readonly="0"/>
-  <CPlainAttr id="bcfd7efc-0605-4b5e-b4bb-85c1d5f64bbb"
-              owner_id="cd64d66f-6fff-4008-b966-a06b1cc1436d" schema_id="identity.recertification.day.interval"/>
-  <CPlainAttrValue id="e5fa94db-b524-4309-908d-8198d0b3f77b"
-                   attribute_id="bcfd7efc-0605-4b5e-b4bb-85c1d5f64bbb" longValue="-1"/>
-
   <!--  JWT lifetime in minutes -->                   
   <SyncopeSchema id="jwt.lifetime.minutes"/>
   <PlainSchema id="jwt.lifetime.minutes" type="Long"
@@ -142,11 +133,6 @@ under the License.
   <Implementation id="PushJobDelegate" type="TASKJOB_DELEGATE" engine="JAVA"
                   body="org.apache.syncope.core.provisioning.java.pushpull.PushJobDelegate"/>
 
-  <Implementation id="IdentityRecertification" type="TASKJOB_DELEGATE" engine="JAVA"
-                  body="org.apache.syncope.core.provisioning.java.job.IdentityRecertification"/>
-  <Task DTYPE="SchedTask" id="e95555d2-1b09-42c8-b25b-f4c4ec598989" name="Identity Recertification Task"  active="1"
-        jobDelegate_id="IdentityRecertification"/>
-
   <Implementation id="ExpiredAccessTokenCleanup" type="TASKJOB_DELEGATE" engine="JAVA"
                   body="org.apache.syncope.core.provisioning.java.job.ExpiredAccessTokenCleanup"/>
   <Task DTYPE="SchedTask" id="89de5014-e3f5-4462-84d8-d97575740baf" name="Access Token Cleanup Task"  active="1"

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index 54680bf..11dd2f3 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -84,7 +84,6 @@ under the License.
     <module>provisioning-java</module>
     <module>workflow-api</module>
     <module>workflow-java</module>
-    <module>workflow-flowable</module>
     <module>logic</module>
     <module>rest-cxf</module>
     <module>upgrade</module>

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/event/AnyDeletedEvent.java
----------------------------------------------------------------------
diff --git a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/event/AnyDeletedEvent.java b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/event/AnyDeletedEvent.java
index b2c978b..d9f5035 100644
--- a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/event/AnyDeletedEvent.java
+++ b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/event/AnyDeletedEvent.java
@@ -29,17 +29,21 @@ public class AnyDeletedEvent extends ApplicationEvent {
 
     private final String anyKey;
 
+    private final String anyName;
+
     private final String domain;
 
     public AnyDeletedEvent(
             final Object source,
             final AnyTypeKind anyTypeKind,
             final String anyKey,
+            final String anyName,
             final String domain) {
 
         super(source);
         this.anyTypeKind = anyTypeKind;
         this.anyKey = anyKey;
+        this.anyName = anyName;
         this.domain = domain;
     }
 
@@ -51,6 +55,10 @@ public class AnyDeletedEvent extends ApplicationEvent {
         return anyKey;
     }
 
+    public String getAnyName() {
+        return anyName;
+    }
+
     public String getDomain() {
         return domain;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/IdentityRecertification.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/IdentityRecertification.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/IdentityRecertification.java
deleted file mode 100755
index bd837e4..0000000
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/IdentityRecertification.java
+++ /dev/null
@@ -1,126 +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.core.provisioning.java.job;
-
-import java.util.List;
-import java.util.Optional;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.syncope.core.persistence.api.dao.AnyDAO;
-import org.apache.syncope.core.persistence.api.dao.ConfDAO;
-import org.apache.syncope.core.persistence.api.dao.UserDAO;
-import org.apache.syncope.core.persistence.api.entity.conf.CPlainAttr;
-import org.apache.syncope.core.persistence.api.entity.task.TaskExec;
-import org.apache.syncope.core.persistence.api.entity.user.User;
-import org.apache.syncope.core.workflow.api.UserWorkflowAdapter;
-import org.quartz.JobExecutionException;
-import org.springframework.beans.factory.annotation.Autowired;
-
-public class IdentityRecertification extends AbstractSchedTaskJobDelegate {
-
-    private static final String RECERTIFICATION_TIME = "identity.recertification.day.interval";
-
-    @Autowired
-    private ConfDAO confDAO;
-
-    @Autowired
-    private UserDAO userDAO;
-
-    @Autowired
-    private UserWorkflowAdapter uwfAdapter;
-
-    private long recertificationTime = -1;
-
-    protected void init() {
-        synchronized (this) {
-            if (recertificationTime == -1) {
-                Optional<? extends CPlainAttr> recertificationTimeAttr = confDAO.find(RECERTIFICATION_TIME);
-                if (!recertificationTimeAttr.isPresent()
-                        || recertificationTimeAttr.get().getValues().get(0).getLongValue() == null) {
-
-                    recertificationTime = -1;
-                    return;
-                }
-
-                recertificationTime = recertificationTimeAttr.get().getValues().
-                        get(0).getLongValue() * 1000 * 60 * 60 * 24;
-            }
-        }
-    }
-
-    protected boolean isToBeRecertified(final User user, final long now) {
-        if (!user.isSuspended()
-                && (user.getLastRecertification() == null
-                || user.getLastRecertification().getTime() + recertificationTime < now)) {
-
-            LOG.debug("{} is to be recertified", user);
-            return true;
-        }
-
-        LOG.debug("{} does not need to be recertified", user);
-        return false;
-    }
-
-    @Override
-    protected String doExecute(final boolean dryRun) throws JobExecutionException {
-        LOG.info("IdentityRecertification {} running [SchedTask {}]", dryRun ? "dry " : "", task.getKey());
-
-        init();
-        if (recertificationTime == -1) {
-            LOG.debug("Identity Recertification disabled");
-            return ("IDENTITY RECERTIFICATION DISABLED");
-        }
-
-        if (dryRun) {
-            return "DRY RUN";
-        }
-
-        int total = userDAO.count();
-        int pages = (total / AnyDAO.DEFAULT_PAGE_SIZE) + 1;
-
-        status.set("Processing " + total + " users in " + pages + " pages");
-
-        long now = System.currentTimeMillis();
-        for (int page = 1; page <= pages && !interrupt; page++) {
-            status.set("Processing " + total + " users: page " + page + " of " + pages);
-
-            List<User> users = userDAO.findAll(page, AnyDAO.DEFAULT_PAGE_SIZE);
-            for (int i = 0; i < users.size() && !interrupt; i++) {
-                LOG.debug("Processing user: {}", users.get(i).getUsername());
-
-                if (StringUtils.isNotBlank(users.get(i).getWorkflowId()) && isToBeRecertified(users.get(i), now)) {
-                    uwfAdapter.requestCertify(users.get(i));
-                } else {
-                    LOG.warn("Workflow for {} is null or empty", users.get(i));
-                }
-            }
-        }
-        if (interrupt) {
-            interrupted = true;
-            return "Identity recertification interrupted";
-        }
-
-        return "SUCCESS";
-    }
-
-    @Override
-    protected boolean hasToBeRegistered(final TaskExec execution) {
-        return true;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/report/ReconciliationReportlet.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/report/ReconciliationReportlet.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/report/ReconciliationReportlet.java
index 91d440e..8852870 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/report/ReconciliationReportlet.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/report/ReconciliationReportlet.java
@@ -152,11 +152,6 @@ public class ReconciliationReportlet extends AbstractReportlet {
                     }
                     break;
 
-                case workflowId:
-                    type = ReportXMLConst.XSD_STRING;
-                    value = any.getWorkflowId();
-                    break;
-
                 case status:
                     type = ReportXMLConst.XSD_STRING;
                     value = any.getStatus();

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/report/UserReportlet.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/report/UserReportlet.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/report/UserReportlet.java
index 8d51e4a..338ef9a 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/report/UserReportlet.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/report/UserReportlet.java
@@ -197,11 +197,6 @@ public class UserReportlet extends AbstractReportlet {
                         value = user.getUsername();
                         break;
 
-                    case workflowId:
-                        type = ReportXMLConst.XSD_STRING;
-                        value = user.getWorkflowId();
-                        break;
-
                     case status:
                         type = ReportXMLConst.XSD_STRING;
                         value = user.getStatus();

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserWorkflowServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserWorkflowServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserWorkflowServiceImpl.java
deleted file mode 100644
index 7a25cb8..0000000
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserWorkflowServiceImpl.java
+++ /dev/null
@@ -1,70 +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.core.rest.cxf.service;
-
-import java.util.List;
-import org.apache.commons.lang3.tuple.Pair;
-import org.apache.syncope.common.lib.to.PagedResult;
-import org.apache.syncope.common.lib.to.UserTO;
-import org.apache.syncope.common.lib.to.WorkflowFormTO;
-import org.apache.syncope.common.lib.to.WorkflowTaskTO;
-import org.apache.syncope.common.rest.api.beans.WorkflowFormQuery;
-import org.apache.syncope.common.rest.api.service.UserWorkflowService;
-import org.apache.syncope.core.logic.UserWorkflowLogic;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-@Service
-public class UserWorkflowServiceImpl extends AbstractServiceImpl implements UserWorkflowService {
-
-    @Autowired
-    private UserWorkflowLogic logic;
-
-    @Override
-    public WorkflowFormTO claimForm(final String taskId) {
-        return logic.claimForm(taskId);
-    }
-
-    @Override
-    public UserTO executeTask(final String taskId, final UserTO userTO) {
-        return logic.executeWorkflowTask(userTO, taskId);
-    }
-
-    @Override
-    public WorkflowFormTO getFormForUser(final String userKey) {
-        return logic.getFormForUser(userKey);
-    }
-
-    @Override
-    public PagedResult<WorkflowFormTO> getForms(final WorkflowFormQuery query) {
-        Pair<Integer, List<WorkflowFormTO>> result = logic.getForms(
-                query.getPage(), query.getSize(), getOrderByClauses(query.getOrderBy()));
-        return buildPagedResult(result.getRight(), query.getPage(), query.getSize(), result.getLeft());
-    }
-
-    @Override
-    public List<WorkflowTaskTO> getAvailableTasks(final String userKey) {
-        return logic.getAvailableTasks(userKey);
-    }
-
-    @Override
-    public UserTO submitForm(final WorkflowFormTO form) {
-        return logic.submitForm(form);
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/WorkflowServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/WorkflowServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/WorkflowServiceImpl.java
deleted file mode 100644
index 2321e0a..0000000
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/WorkflowServiceImpl.java
+++ /dev/null
@@ -1,83 +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.core.rest.cxf.service;
-
-import java.util.List;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.StreamingOutput;
-import org.apache.syncope.common.lib.to.WorkflowDefinitionTO;
-import org.apache.syncope.common.rest.api.RESTHeaders;
-import org.apache.syncope.common.rest.api.service.WorkflowService;
-import org.apache.syncope.core.logic.WorkflowLogic;
-import org.apache.syncope.core.workflow.api.WorkflowDefinitionFormat;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-@Service
-public class WorkflowServiceImpl extends AbstractServiceImpl implements WorkflowService {
-
-    @Autowired
-    private WorkflowLogic logic;
-
-    @Override
-    public List<WorkflowDefinitionTO> list(final String anyType) {
-        return logic.list(anyType);
-    }
-
-    @Override
-    public Response get(final String anyType, final String key) {
-        WorkflowDefinitionFormat format =
-                messageContext.getHttpHeaders().getAcceptableMediaTypes().contains(MediaType.APPLICATION_JSON_TYPE)
-                ? WorkflowDefinitionFormat.JSON
-                : WorkflowDefinitionFormat.XML;
-
-        StreamingOutput sout = (os) -> logic.exportDefinition(anyType, key, format, os);
-
-        return Response.ok(sout).
-                type(format == WorkflowDefinitionFormat.JSON
-                        ? MediaType.APPLICATION_JSON_TYPE : MediaType.APPLICATION_XHTML_XML_TYPE).
-                build();
-    }
-
-    @Override
-    public Response exportDiagram(final String anyType, final String key) {
-        StreamingOutput sout = (os) -> logic.exportDiagram(anyType, key, os);
-
-        return Response.ok(sout).
-                type(RESTHeaders.MEDIATYPE_IMAGE_PNG).
-                build();
-    }
-
-    @Override
-    public void set(final String anyType, final String key, final String definition) {
-        WorkflowDefinitionFormat format =
-                messageContext.getHttpHeaders().getMediaType().equals(MediaType.APPLICATION_JSON_TYPE)
-                ? WorkflowDefinitionFormat.JSON
-                : WorkflowDefinitionFormat.XML;
-
-        logic.importDefinition(anyType, key, format, definition);
-    }
-
-    @Override
-    public void delete(final String anyType, final String key) {
-        logic.delete(anyType, key);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/core/spring/src/main/java/org/apache/syncope/core/spring/security/AuthContextUtils.java
----------------------------------------------------------------------
diff --git a/core/spring/src/main/java/org/apache/syncope/core/spring/security/AuthContextUtils.java b/core/spring/src/main/java/org/apache/syncope/core/spring/security/AuthContextUtils.java
index 8080676..6bc5fdb 100644
--- a/core/spring/src/main/java/org/apache/syncope/core/spring/security/AuthContextUtils.java
+++ b/core/spring/src/main/java/org/apache/syncope/core/spring/security/AuthContextUtils.java
@@ -19,8 +19,6 @@
 package org.apache.syncope.core.spring.security;
 
 import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -65,33 +63,26 @@ public final class AuthContextUtils {
     public static Set<SyncopeGrantedAuthority> getAuthorities() {
         SecurityContext ctx = SecurityContextHolder.getContext();
         if (ctx != null && ctx.getAuthentication() != null && ctx.getAuthentication().getAuthorities() != null) {
-            Set<SyncopeGrantedAuthority> result = new HashSet<>();
-            ctx.getAuthentication().getAuthorities().stream().
-                    filter(authority -> (authority instanceof SyncopeGrantedAuthority)).
-                    forEachOrdered(authority -> result.add(SyncopeGrantedAuthority.class.cast(authority)));
-
-            return result;
+            return ctx.getAuthentication().getAuthorities().stream().
+                    filter(SyncopeGrantedAuthority.class::isInstance).
+                    map(SyncopeGrantedAuthority.class::cast).
+                    collect(Collectors.toSet());
         }
 
         return Collections.emptySet();
     }
 
     public static Map<String, Set<String>> getAuthorizations() {
-        Map<String, Set<String>> result = null;
-
         SecurityContext ctx = SecurityContextHolder.getContext();
         if (ctx != null && ctx.getAuthentication() != null && ctx.getAuthentication().getAuthorities() != null) {
-            result = new HashMap<>();
-            for (GrantedAuthority authority : ctx.getAuthentication().getAuthorities()) {
-                if (authority instanceof SyncopeGrantedAuthority) {
-                    result.put(
-                            SyncopeGrantedAuthority.class.cast(authority).getAuthority(),
-                            SyncopeGrantedAuthority.class.cast(authority).getRealms());
-                }
-            }
+            return ctx.getAuthentication().getAuthorities().stream().
+                    filter(SyncopeGrantedAuthority.class::isInstance).
+                    map(SyncopeGrantedAuthority.class::cast).
+                    collect(Collectors.toMap(
+                            SyncopeGrantedAuthority::getAuthority, SyncopeGrantedAuthority::getRealms));
         }
 
-        return result == null ? Collections.emptyMap() : result;
+        return Collections.emptyMap();
     }
 
     public static String getDomain() {

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/core/spring/src/main/java/org/apache/syncope/core/spring/security/SecureRandomUtils.java
----------------------------------------------------------------------
diff --git a/core/spring/src/main/java/org/apache/syncope/core/spring/security/SecureRandomUtils.java b/core/spring/src/main/java/org/apache/syncope/core/spring/security/SecureRandomUtils.java
index 91d932b..daf093a 100644
--- a/core/spring/src/main/java/org/apache/syncope/core/spring/security/SecureRandomUtils.java
+++ b/core/spring/src/main/java/org/apache/syncope/core/spring/security/SecureRandomUtils.java
@@ -49,6 +49,10 @@ public final class SecureRandomUtils {
         return FOR_LETTERS.generate(1);
     }
 
+    public static String generateRandomLetters(final int length) {
+        return FOR_LETTERS.generate(length);
+    }
+
     public static String generateRandomNumber() {
         return FOR_NUMBERS.generate(1);
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/core/upgrade/src/main/resources/schema.xml
----------------------------------------------------------------------
diff --git a/core/upgrade/src/main/resources/schema.xml b/core/upgrade/src/main/resources/schema.xml
index ea1a6a0..ad63e20 100644
--- a/core/upgrade/src/main/resources/schema.xml
+++ b/core/upgrade/src/main/resources/schema.xml
@@ -175,7 +175,6 @@ under the License.
       <column name="lastChangeDate" type="timestamp"/>
       <column name="lastModifier" type="varchar" size="255"/>
       <column name="status" type="varchar" size="255"/>
-      <column name="workflowId" type="varchar" size="255"/>
       <column name="name" type="varchar" size="255"/>
       <column name="REALM_ID" type="varchar" size="36"/>
       <column name="TYPE_ID" type="varchar" size="255"/>
@@ -884,7 +883,6 @@ under the License.
       <column name="lastChangeDate" type="timestamp"/>
       <column name="lastModifier" type="varchar" size="255"/>
       <column name="status" type="varchar" size="255"/>
-      <column name="workflowId" type="varchar" size="255"/>
       <column name="name" type="varchar" size="255"/>
       <column name="REALM_ID" type="varchar" size="36"/>
       <column name="GROUPOWNER_ID" type="varchar" size="36"/>
@@ -966,13 +964,10 @@ under the License.
       <column name="lastChangeDate" type="timestamp"/>
       <column name="lastModifier" type="varchar" size="255"/>
       <column name="status" type="varchar" size="255"/>
-      <column name="workflowId" type="varchar" size="255"/>
       <column name="changePwdDate" type="timestamp"/>
       <column name="cipherAlgorithm" type="varchar" size="20"/>
       <column name="failedLogins" type="integer"/>
       <column name="lastLoginDate" type="timestamp"/>
-      <column name="lastRecertification" type="timestamp"/>
-      <column name="lastRecertificator" type="varchar" size="255"/>
       <column name="mustChangePassword" type="integer"/>
       <column name="password" type="varchar" size="255"/>
       <column name="securityAnswer" type="varchar" size="255"/>

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/core/upgrade/src/test/java/org/apache/syncope/core/upgrade/GeneratedUpgradeSQLTest.java
----------------------------------------------------------------------
diff --git a/core/upgrade/src/test/java/org/apache/syncope/core/upgrade/GeneratedUpgradeSQLTest.java b/core/upgrade/src/test/java/org/apache/syncope/core/upgrade/GeneratedUpgradeSQLTest.java
index d81117c..42de069 100644
--- a/core/upgrade/src/test/java/org/apache/syncope/core/upgrade/GeneratedUpgradeSQLTest.java
+++ b/core/upgrade/src/test/java/org/apache/syncope/core/upgrade/GeneratedUpgradeSQLTest.java
@@ -78,7 +78,7 @@ public class GeneratedUpgradeSQLTest {
 
         Integer implementations = jdbcTemplate.queryForObject("SELECT COUNT(*) FROM Implementation", Integer.class);
         assertNotNull(implementations);
-        assertEquals(16, implementations.intValue());
+        assertEquals(15, implementations.intValue());
 
         Integer pullTaskActions = jdbcTemplate.queryForObject("SELECT COUNT(*) FROM PullTaskAction", Integer.class);
         assertNotNull(pullTaskActions);

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/core/upgrade/src/test/resources/syncopedb20.sql
----------------------------------------------------------------------
diff --git a/core/upgrade/src/test/resources/syncopedb20.sql b/core/upgrade/src/test/resources/syncopedb20.sql
index 314669b..59a2df0 100644
--- a/core/upgrade/src/test/resources/syncopedb20.sql
+++ b/core/upgrade/src/test/resources/syncopedb20.sql
@@ -261,17 +261,16 @@ CREATE MEMORY TABLE PUBLIC.ANYOBJECT(
     LASTCHANGEDATE TIMESTAMP,
     LASTMODIFIER VARCHAR(255),
     STATUS VARCHAR(255),
-    WORKFLOWID VARCHAR(255),
     NAME VARCHAR(255),
     REALM_ID VARCHAR(36),
     TYPE_ID VARCHAR(255)
 );       
 ALTER TABLE PUBLIC.ANYOBJECT ADD CONSTRAINT PUBLIC.CONSTRAINT_3 PRIMARY KEY(ID);               
 -- 3 +/- SELECT COUNT(*) FROM PUBLIC.ANYOBJECT;
-INSERT INTO PUBLIC.ANYOBJECT(ID, CREATIONDATE, CREATOR, LASTCHANGEDATE, LASTMODIFIER, STATUS, WORKFLOWID, NAME, REALM_ID, TYPE_ID) VALUES
-('fc6dbc3a-6c07-4965-8781-921e7401a4a5', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, NULL, 'HP LJ 1300n', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', 'PRINTER'),
-('8559d14d-58c2-46eb-a2d4-a7d35161e8f8', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, NULL, 'Canon MF 8030cn', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', 'PRINTER'),
-('9e1d130c-d6a3-48b1-98b3-182477ed0688', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, NULL, 'Epson Stylus Color', '0679e069-7355-4b20-bd11-a5a0a5453c7c', 'PRINTER');       
+INSERT INTO PUBLIC.ANYOBJECT(ID, CREATIONDATE, CREATOR, LASTCHANGEDATE, LASTMODIFIER, STATUS, NAME, REALM_ID, TYPE_ID) VALUES
+('fc6dbc3a-6c07-4965-8781-921e7401a4a5', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, 'HP LJ 1300n', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', 'PRINTER'),
+('8559d14d-58c2-46eb-a2d4-a7d35161e8f8', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, 'Canon MF 8030cn', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', 'PRINTER'),
+('9e1d130c-d6a3-48b1-98b3-182477ed0688', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, 'Epson Stylus Color', '0679e069-7355-4b20-bd11-a5a0a5453c7c', 'PRINTER');       
 CREATE MEMORY TABLE PUBLIC.ANYOBJECT_ANYTYPECLASS(
     ANYOBJECT_ID VARCHAR(36),
     ANYTYPECLASS_ID VARCHAR(255)
@@ -572,7 +571,6 @@ INSERT INTO PUBLIC.CPLAINATTR(ID, OWNER_ID, SCHEMA_ID) VALUES
 ('888ae8e1-a295-4ee2-a15e-31dbf6dfc3f9', 'cd64d66f-6fff-4008-b966-a06b1cc1436d', 'authentication.statuses'),
 ('9891c0a7-27ee-4215-9eea-ca32e580b4e4', 'cd64d66f-6fff-4008-b966-a06b1cc1436d', 'log.lastlogindate'),
 ('bcfd7efc-0605-4b5e-b4bb-85c1d5f6493a', 'cd64d66f-6fff-4008-b966-a06b1cc1436d', 'return.password.value'),
-('bcfd7efc-0605-4b5e-b4bb-85c1d5f64bbb', 'cd64d66f-6fff-4008-b966-a06b1cc1436d', 'identity.recertification.day.interval'),
 ('cfec3140-562d-459c-ac6a-e3e10758661d', 'cd64d66f-6fff-4008-b966-a06b1cc1436d', 'jwt.lifetime.minutes'),
 ('ae36c6ab-0f39-40d7-b6e6-3b8394547c9c', 'cd64d66f-6fff-4008-b966-a06b1cc1436d', 'connector.conf.history.size'),
 ('ae7ae53a-74cf-48b0-9a57-6d2c94928e60', 'cd64d66f-6fff-4008-b966-a06b1cc1436d', 'resource.conf.history.size');         
@@ -1100,7 +1098,6 @@ INSERT INTO PUBLIC.PLAINSCHEMA(ID, CIPHERALGORITHM, CONVERSIONPATTERN, ENUMERATI
 ('authentication.statuses', NULL, NULL, NULL, NULL, NULL, NULL, 1, 0, NULL, 'String', 0, NULL, NULL),
 ('log.lastlogindate', NULL, NULL, NULL, NULL, 'true', NULL, 0, 0, NULL, 'Boolean', 0, NULL, NULL),
 ('return.password.value', NULL, NULL, NULL, NULL, 'false', NULL, 0, 0, NULL, 'Boolean', 0, NULL, NULL),
-('identity.recertification.day.interval', NULL, NULL, NULL, NULL, 'false', NULL, 0, 0, NULL, 'Long', 0, NULL, NULL),
 ('jwt.lifetime.minutes', NULL, NULL, NULL, NULL, 'true', NULL, 0, 0, NULL, 'Long', 0, NULL, NULL),
 ('connector.conf.history.size', NULL, NULL, NULL, NULL, 'true', NULL, 0, 0, NULL, 'Long', 0, NULL, NULL),
 ('resource.conf.history.size', NULL, NULL, NULL, NULL, 'true', NULL, 0, 0, NULL, 'Long', 0, NULL, NULL),
@@ -1301,7 +1298,7 @@ CREATE MEMORY TABLE PUBLIC.REPORTLETCONFINSTANCE(
 ALTER TABLE PUBLIC.REPORTLETCONFINSTANCE ADD CONSTRAINT PUBLIC.CONSTRAINT_4F PRIMARY KEY(ID);  
 -- 2 +/- SELECT COUNT(*) FROM PUBLIC.REPORTLETCONFINSTANCE;    
 INSERT INTO PUBLIC.REPORTLETCONFINSTANCE(ID, SERIALIZEDINSTANCE, REPORT_ID) VALUES
-('5874f3fa-578c-42c6-83b0-c11adafc98b2', '{"@class":"org.apache.syncope.common.lib.report.UserReportletConf","name":"testUserReportlet","matchingCond":null,"plainAttrs":["fullname","gender"],"derAttrs":["cn"],"virAttrs":["virtualdata"],"features":["key","username","workflowId","status","creationDate","lastLoginDate","changePwdDate","passwordHistorySize","failedLoginCount","memberships","resources"]}', '0062ea9c-924d-4ecf-9961-4492a8cc6d1b'),
+('5874f3fa-578c-42c6-83b0-c11adafc98b2', '{"@class":"org.apache.syncope.common.lib.report.UserReportletConf","name":"testUserReportlet","matchingCond":null,"plainAttrs":["fullname","gender"],"derAttrs":["cn"],"virAttrs":["virtualdata"],"features":["key","username","status","creationDate","lastLoginDate","changePwdDate","passwordHistorySize","failedLoginCount","memberships","resources"]}', '0062ea9c-924d-4ecf-9961-4492a8cc6d1b'),
 ('d6c2b475-4860-4eb1-8fde-618299c2a97c', '{"@class":"org.apache.syncope.common.lib.report.ReconciliationReportletConf","name":"dashboardReconciliationReportlet","userMatchingCond":null,"groupMatchingCond":null,"anyObjectMatchingCond":null,"features":["key","username","groupName"]}', 'c3520ad9-179f-49e7-b315-d684d216dd97');          
 CREATE MEMORY TABLE PUBLIC.REPORTTEMPLATE(
     ID VARCHAR(255) NOT NULL,
@@ -1403,7 +1400,6 @@ CREATE MEMORY TABLE PUBLIC.SYNCOPEGROUP(
     LASTCHANGEDATE TIMESTAMP,
     LASTMODIFIER VARCHAR(255),
     STATUS VARCHAR(255),
-    WORKFLOWID VARCHAR(255),
     NAME VARCHAR(255),
     REALM_ID VARCHAR(36),
     GROUPOWNER_ID VARCHAR(36),
@@ -1411,23 +1407,23 @@ CREATE MEMORY TABLE PUBLIC.SYNCOPEGROUP(
 ); 
 ALTER TABLE PUBLIC.SYNCOPEGROUP ADD CONSTRAINT PUBLIC.CONSTRAINT_8E PRIMARY KEY(ID);           
 -- 16 +/- SELECT COUNT(*) FROM PUBLIC.SYNCOPEGROUP;            
-INSERT INTO PUBLIC.SYNCOPEGROUP(ID, CREATIONDATE, CREATOR, LASTCHANGEDATE, LASTMODIFIER, STATUS, WORKFLOWID, NAME, REALM_ID, GROUPOWNER_ID, USEROWNER_ID) VALUES
-('37d15e4c-cdc1-460b-a591-8505c8133806', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, NULL, 'root', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
-('b1f7c12d-ec83-441f-a50e-1691daaedf3b', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, NULL, 'child', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
-('29f96485-729e-4d31-88a1-6fc60e4677f3', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, NULL, 'citizen', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
-('8fb2d51e-c605-4e80-a72b-13ffecf1aa9a', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, NULL, 'employee', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
-('a3c1a693-a6be-483f-a2b3-5cfec146f4bf', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, NULL, 'secretary', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
-('ebf97068-aa4b-4a85-9f01-680e8c4cf227', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, NULL, 'director', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, '823074dc-d280-436d-a7dd-07399fae48ec'),
-('bf825fe1-7320-4a54-bd64-143b5c18ab97', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, NULL, 'managingDirector', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
-('f779c0d4-633b-4be5-8f57-32eb478a3ca5', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, NULL, 'otherchild', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
-('0cbcabd2-4410-4b6b-8f05-a052b451d18f', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, NULL, 'groupForWorkflowApproval', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
-('b8d38784-57e7-4595-859a-076222644b55', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, NULL, 'managingConsultant', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
-('268fed79-f440-4390-9435-b273768eb5d6', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, NULL, 'groupForWorkflowOptIn', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
-('0626100b-a4ba-4e00-9971-86fad52a6216', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, NULL, 'aGroupForPropagation', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
-('ba9ed509-b1f5-48ab-a334-c8530a6422dc', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, NULL, 'bGroupForPropagation', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
-('ece66293-8f31-4a84-8e8d-23da36e70846', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, NULL, 'artDirector', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
-('034740a9-fa10-453b-af37-dc7897e98fb1', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, NULL, 'additional', 'c5b75db1-fce7-470f-b780-3b9934d82a9d', NULL, NULL),
-('e7ff94e8-19c9-4f0a-b8b7-28327edbf6ed', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, NULL, 'fake', '722f3d84-9c2b-4525-8f6e-e4b82c55a36c', NULL, NULL);          
+INSERT INTO PUBLIC.SYNCOPEGROUP(ID, CREATIONDATE, CREATOR, LASTCHANGEDATE, LASTMODIFIER, STATUS, NAME, REALM_ID, GROUPOWNER_ID, USEROWNER_ID) VALUES
+('37d15e4c-cdc1-460b-a591-8505c8133806', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, 'root', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
+('b1f7c12d-ec83-441f-a50e-1691daaedf3b', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, 'child', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
+('29f96485-729e-4d31-88a1-6fc60e4677f3', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, 'citizen', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
+('8fb2d51e-c605-4e80-a72b-13ffecf1aa9a', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, 'employee', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
+('a3c1a693-a6be-483f-a2b3-5cfec146f4bf', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, 'secretary', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
+('ebf97068-aa4b-4a85-9f01-680e8c4cf227', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, 'director', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, '823074dc-d280-436d-a7dd-07399fae48ec'),
+('bf825fe1-7320-4a54-bd64-143b5c18ab97', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, 'managingDirector', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
+('f779c0d4-633b-4be5-8f57-32eb478a3ca5', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, 'otherchild', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
+('0cbcabd2-4410-4b6b-8f05-a052b451d18f', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, 'groupForWorkflowApproval', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
+('b8d38784-57e7-4595-859a-076222644b55', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, 'managingConsultant', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
+('268fed79-f440-4390-9435-b273768eb5d6', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, 'groupForWorkflowOptIn', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
+('0626100b-a4ba-4e00-9971-86fad52a6216', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, 'aGroupForPropagation', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
+('ba9ed509-b1f5-48ab-a334-c8530a6422dc', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, 'bGroupForPropagation', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
+('ece66293-8f31-4a84-8e8d-23da36e70846', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, 'artDirector', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL),
+('034740a9-fa10-453b-af37-dc7897e98fb1', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, 'additional', 'c5b75db1-fce7-470f-b780-3b9934d82a9d', NULL, NULL),
+('e7ff94e8-19c9-4f0a-b8b7-28327edbf6ed', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', NULL, 'fake', '722f3d84-9c2b-4525-8f6e-e4b82c55a36c', NULL, NULL);          
 CREATE MEMORY TABLE PUBLIC.SYNCOPEGROUP_ANYTYPECLASS(
     GROUP_ID VARCHAR(36),
     ANYTYPECLASS_ID VARCHAR(255)
@@ -1569,7 +1565,6 @@ INSERT INTO PUBLIC.SYNCOPESCHEMA(ID) VALUES
 ('authentication.statuses'),
 ('log.lastlogindate'),
 ('return.password.value'),
-('identity.recertification.day.interval'),
 ('jwt.lifetime.minutes'),
 ('connector.conf.history.size'),
 ('resource.conf.history.size'),
@@ -1619,13 +1614,10 @@ CREATE MEMORY TABLE PUBLIC.SYNCOPEUSER(
     LASTCHANGEDATE TIMESTAMP,
     LASTMODIFIER VARCHAR(255),
     STATUS VARCHAR(255),
-    WORKFLOWID VARCHAR(255),
     CHANGEPWDDATE TIMESTAMP,
     CIPHERALGORITHM VARCHAR(20),
     FAILEDLOGINS INTEGER,
     LASTLOGINDATE TIMESTAMP,
-    LASTRECERTIFICATION TIMESTAMP,
-    LASTRECERTIFICATOR VARCHAR(255),
     MUSTCHANGEPASSWORD INTEGER,
     PASSWORD VARCHAR(255),
     SECURITYANSWER VARCHAR(255),
@@ -1638,12 +1630,12 @@ CREATE MEMORY TABLE PUBLIC.SYNCOPEUSER(
 );       
 ALTER TABLE PUBLIC.SYNCOPEUSER ADD CONSTRAINT PUBLIC.CONSTRAINT_6FFB PRIMARY KEY(ID);          
 -- 5 +/- SELECT COUNT(*) FROM PUBLIC.SYNCOPEUSER;              
-INSERT INTO PUBLIC.SYNCOPEUSER(ID, CREATIONDATE, CREATOR, LASTCHANGEDATE, LASTMODIFIER, STATUS, WORKFLOWID, CHANGEPWDDATE, CIPHERALGORITHM, FAILEDLOGINS, LASTLOGINDATE, LASTRECERTIFICATION, LASTRECERTIFICATOR, MUSTCHANGEPASSWORD, PASSWORD, SECURITYANSWER, SUSPENDED, TOKEN, TOKENEXPIRETIME, USERNAME, REALM_ID, SECURITYQUESTION_ID) VALUES
-('1417acbe-cbf6-4277-9372-e75e04f97000', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', 'active', '4', NULL, 'SHA1', NULL, NULL, NULL, NULL, NULL, '5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8', NULL, 0, NULL, NULL, 'rossini', 'c5b75db1-fce7-470f-b780-3b9934d82a9d', NULL),
-('74cd8ece-715a-44a4-a736-e17b46c4e7e6', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', 'active', '6', NULL, 'SHA1', NULL, NULL, NULL, NULL, NULL, '5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8', NULL, 0, NULL, NULL, 'verdi', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL),
-('b3cbc78d-32e6-4bd4-92e0-bbe07566a2ee', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', 'active', '8', NULL, 'SHA1', NULL, NULL, NULL, NULL, NULL, '5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8', NULL, 0, NULL, NULL, 'vivaldi', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL),
-('c9b2dec2-00a7-4855-97c0-d854842b4b24', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', 'active', '10', NULL, 'SHA1', NULL, NULL, NULL, NULL, NULL, '5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8', NULL, 0, NULL, NULL, 'bellini', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL),
-('823074dc-d280-436d-a7dd-07399fae48ec', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', 'active', '12', NULL, 'SHA1', NULL, NULL, NULL, NULL, NULL, '5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8', NULL, 0, NULL, NULL, 'puccini', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL);              
+INSERT INTO PUBLIC.SYNCOPEUSER(ID, CREATIONDATE, CREATOR, LASTCHANGEDATE, LASTMODIFIER, STATUS, CHANGEPWDDATE, CIPHERALGORITHM, FAILEDLOGINS, LASTLOGINDATE, MUSTCHANGEPASSWORD, PASSWORD, SECURITYANSWER, SUSPENDED, TOKEN, TOKENEXPIRETIME, USERNAME, REALM_ID, SECURITYQUESTION_ID) VALUES
+('1417acbe-cbf6-4277-9372-e75e04f97000', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', 'active', NULL, 'SHA1', NULL, NULL, NULL, NULL, NULL, '5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8', NULL, 0, NULL, NULL, 'rossini', 'c5b75db1-fce7-470f-b780-3b9934d82a9d', NULL),
+('74cd8ece-715a-44a4-a736-e17b46c4e7e6', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', 'active', NULL, 'SHA1', NULL, NULL, NULL, NULL, NULL, '5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8', NULL, 0, NULL, NULL, 'verdi', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL),
+('b3cbc78d-32e6-4bd4-92e0-bbe07566a2ee', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', 'active', NULL, 'SHA1', NULL, NULL, NULL, NULL, NULL, '5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8', NULL, 0, NULL, NULL, 'vivaldi', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL),
+('c9b2dec2-00a7-4855-97c0-d854842b4b24', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', 'active', NULL, 'SHA1', NULL, NULL, NULL, NULL, NULL, '5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8', NULL, 0, NULL, NULL, 'bellini', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL),
+('823074dc-d280-436d-a7dd-07399fae48ec', TIMESTAMP '2010-10-20 11:00:00', 'admin', TIMESTAMP '2010-10-20 11:00:00', 'admin', 'active', NULL, 'SHA1', NULL, NULL, NULL, NULL, NULL, '5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8', NULL, 0, NULL, NULL, 'puccini', 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL);              
 CREATE MEMORY TABLE PUBLIC.SYNCOPEUSER_ANYTYPECLASS(
     USER_ID VARCHAR(36),
     ANYTYPECLASS_ID VARCHAR(255)
@@ -1720,7 +1712,6 @@ INSERT INTO PUBLIC.TASK(ID, DTYPE, ACTIVE, CRONEXPRESSION, DESCRIPTION, JOBDELEG
 ('316285cc-ae52-4ea2-a33b-7355e189ac3f', 'PropagationTask', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'USER', '[{"name":"__PASSWORD__","value":[{"readOnly":false,"disposed":false,"encryptedBytes":"m9nh2US0Sa6m+cXccCq0Xw==","base64SHA1Hash":"GFJ69qfjxEOdrmt+9q+0Cw2uz60="}]},{"name":"__NAME__","value":["userId"],"nameValue":"userId"},{"name":"type","value":["type"]}]', NULL, '1417acbe-cbf6-4277-9372-e75e04f97000', '__ACCOUNT__', NULL, 'DELETE', 'ws-target-resource-2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
 ('c41b9b71-9bfa-4f90-89f2-84787def4c5c', 'PullTask', 1, NULL, NULL, NULL, 'CSV (update matching; assign unmatching)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'resource-csv', 'UPDATE', 1, 1, 1, 1, 'ASSIGN', 'INCREMENTAL', NULL, 'e4c28e7a-9dbf-4ee7-9441-93812a0d4a28', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
 ('e95555d2-1b09-42c8-b25b-f4c4ec597979', 'SchedTask', 1, '0 0 0 1 * ?', NULL, 'org.apache.syncope.fit.core.reference.TestSampleJobDelegate', 'SampleJob Task', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
-('e95555d2-1b09-42c8-b25b-f4c4ec598989', 'SchedTask', 1, NULL, NULL, 'org.apache.syncope.core.provisioning.java.job.IdentityRecertification', 'Identity Recertification Task', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
 ('89de5014-e3f5-4462-84d8-d97575740baf', 'SchedTask', 1, '0 0/5 * * * ?', NULL, 'org.apache.syncope.core.provisioning.java.job.ExpiredAccessTokenCleanup', 'Access Token Cleanup Task', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
 ('d6c2d6d3-6329-44c1-9187-f1469ead1cfa', 'PropagationTask', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'USER', '[{"name":"__PASSWORD__","value":[{"readOnly":false,"disposed":false,"encryptedBytes":"m9nh2US0Sa6m+cXccCq0Xw==","base64SHA1Hash":"GFJ69qfjxEOdrmt+9q+0Cw2uz60="}]},{"name":"__NAME__","value":["userId"],"nameValue":"userId"},{"name":"fullname","value":["fullname"]},{"name":"type","value":["type"]}]', NULL, '1417acbe-cbf6-4277-9372-e75e04f97000', '__ACCOUNT__', NULL, 'UPDATE', 'ws-target-resource-nopropagation', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);     
 INSERT INTO PUBLIC.TASK(ID, DTYPE, ACTIVE, CRONEXPRESSION, DESCRIPTION, JOBDELEGATECLASSNAME, NAME, STARTAT, ANYTYPE, ANYTYPEKIND, ATTRIBUTES, CONNOBJECTKEY, ENTITYKEY, OBJECTCLASSNAME, OLDCONNOBJECTKEY, OPERATION, RESOURCE_ID, MATCHINGRULE, PERFORMCREATE, PERFORMDELETE, PERFORMUPDATE, SYNCSTATUS, UNMATCHINGRULE, PULLMODE, RECONCILIATIONFILTERBUILDERCLASSNAME, DESTINATIONREALM_ID, EXECUTED, HTMLBODY, SENDER, SUBJECT, TEXTBODY, TRACELEVEL, NOTIFICATION_ID, SOURCEREALM_ID) VALUES
@@ -2386,7 +2377,7 @@ SELECT
     SS.USER_ID AS ANY_ID,
     SS.ROLE_ID AS ROLE_ID
 FROM PUBLIC.SYNCOPEUSER_SYNCOPEROLE SS;               
-CREATE FORCE VIEW PUBLIC.ANYOBJECT_SEARCH(ANY_ID, ID, CREATIONDATE, CREATOR, LASTCHANGEDATE, LASTMODIFIER, STATUS, WORKFLOWID, NAME, REALM_ID, TYPE_ID) AS
+CREATE FORCE VIEW PUBLIC.ANYOBJECT_SEARCH(ANY_ID, ID, CREATIONDATE, CREATOR, LASTCHANGEDATE, LASTMODIFIER, STATUS, NAME, REALM_ID, TYPE_ID) AS
 SELECT
     A.ID AS ANY_ID,
     A.ID,
@@ -2395,7 +2386,6 @@ SELECT
     A.LASTCHANGEDATE,
     A.LASTMODIFIER,
     A.STATUS,
-    A.WORKFLOWID,
     A.NAME,
     A.REALM_ID,
     A.TYPE_ID
@@ -2406,7 +2396,7 @@ SELECT
     M.ANYOBJECT_ID AS RIGHT_ANY_ID,
     M.TYPE_ID AS TYPE
 FROM PUBLIC.URELATIONSHIP M;       
-CREATE FORCE VIEW PUBLIC.USER_SEARCH(ANY_ID, ID, CREATIONDATE, CREATOR, LASTCHANGEDATE, LASTMODIFIER, STATUS, WORKFLOWID, CHANGEPWDDATE, CIPHERALGORITHM, FAILEDLOGINS, LASTLOGINDATE, LASTRECERTIFICATION, LASTRECERTIFICATOR, MUSTCHANGEPASSWORD, PASSWORD, SECURITYANSWER, SUSPENDED, TOKEN, TOKENEXPIRETIME, USERNAME, REALM_ID, SECURITYQUESTION_ID) AS
+CREATE FORCE VIEW PUBLIC.USER_SEARCH(ANY_ID, ID, CREATIONDATE, CREATOR, LASTCHANGEDATE, LASTMODIFIER, STATUS, CHANGEPWDDATE, CIPHERALGORITHM, FAILEDLOGINS, LASTLOGINDATE, MUSTCHANGEPASSWORD, PASSWORD, SECURITYANSWER, SUSPENDED, TOKEN, TOKENEXPIRETIME, USERNAME, REALM_ID, SECURITYQUESTION_ID) AS
 SELECT
     U.ID AS ANY_ID,
     U.ID,
@@ -2415,13 +2405,10 @@ SELECT
     U.LASTCHANGEDATE,
     U.LASTMODIFIER,
     U.STATUS,
-    U.WORKFLOWID,
     U.CHANGEPWDDATE,
     U.CIPHERALGORITHM,
     U.FAILEDLOGINS,
     U.LASTLOGINDATE,
-    U.LASTRECERTIFICATION,
-    U.LASTRECERTIFICATOR,
     U.MUSTCHANGEPASSWORD,
     U.PASSWORD,
     U.SECURITYANSWER,
@@ -2527,7 +2514,7 @@ FROM PUBLIC.AMEMBERSHIP M
 INNER JOIN PUBLIC.SYNCOPEGROUP G
     ON 1=1
 WHERE M.GROUP_ID = G.ID;      
-CREATE FORCE VIEW PUBLIC.GROUP_SEARCH(ANY_ID, ID, CREATIONDATE, CREATOR, LASTCHANGEDATE, LASTMODIFIER, STATUS, WORKFLOWID, NAME, REALM_ID, GROUPOWNER_ID, USEROWNER_ID) AS
+CREATE FORCE VIEW PUBLIC.GROUP_SEARCH(ANY_ID, ID, CREATIONDATE, CREATOR, LASTCHANGEDATE, LASTMODIFIER, STATUS, NAME, REALM_ID, GROUPOWNER_ID, USEROWNER_ID) AS
 SELECT
     R.ID AS ANY_ID,
     R.ID,
@@ -2536,7 +2523,6 @@ SELECT
     R.LASTCHANGEDATE,
     R.LASTMODIFIER,
     R.STATUS,
-    R.WORKFLOWID,
     R.NAME,
     R.REALM_ID,
     R.GROUPOWNER_ID,

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/AnyObjectWorkflowAdapter.java
----------------------------------------------------------------------
diff --git a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/AnyObjectWorkflowAdapter.java b/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/AnyObjectWorkflowAdapter.java
index 3a9f21f..1f7daca 100644
--- a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/AnyObjectWorkflowAdapter.java
+++ b/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/AnyObjectWorkflowAdapter.java
@@ -36,15 +36,6 @@ public interface AnyObjectWorkflowAdapter extends WorkflowAdapter {
     WorkflowResult<String> create(AnyObjectTO anyObjectTO);
 
     /**
-     * Execute a task on a anyObject.
-     *
-     * @param anyObjectTO anyObject to be subject to task
-     * @param taskId to be executed
-     * @return anyObject just updated
-     */
-    WorkflowResult<String> execute(AnyObjectTO anyObjectTO, String taskId);
-
-    /**
      * Update a anyObject.
      *
      * @param anyObjectPatch modification set to be performed

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/AnyObjectWorkflowDefinitionAdapter.java
----------------------------------------------------------------------
diff --git a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/AnyObjectWorkflowDefinitionAdapter.java b/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/AnyObjectWorkflowDefinitionAdapter.java
deleted file mode 100644
index 43fb0dd..0000000
--- a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/AnyObjectWorkflowDefinitionAdapter.java
+++ /dev/null
@@ -1,22 +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.core.workflow.api;
-
-public interface AnyObjectWorkflowDefinitionAdapter extends WorkflowDefinitionAdapter {
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/GroupWorkflowAdapter.java
----------------------------------------------------------------------
diff --git a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/GroupWorkflowAdapter.java b/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/GroupWorkflowAdapter.java
index 72595f6..e478a26 100644
--- a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/GroupWorkflowAdapter.java
+++ b/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/GroupWorkflowAdapter.java
@@ -36,15 +36,6 @@ public interface GroupWorkflowAdapter extends WorkflowAdapter {
     WorkflowResult<String> create(GroupTO groupTO);
 
     /**
-     * Execute a task on a group.
-     *
-     * @param groupTO group to be subject to task
-     * @param taskId to be executed
-     * @return group just updated
-     */
-    WorkflowResult<String> execute(GroupTO groupTO, String taskId);
-
-    /**
      * Update a group.
      *
      * @param groupPatch modification set to be performed

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/GroupWorkflowDefinitionAdapter.java
----------------------------------------------------------------------
diff --git a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/GroupWorkflowDefinitionAdapter.java b/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/GroupWorkflowDefinitionAdapter.java
deleted file mode 100644
index 6dc2241..0000000
--- a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/GroupWorkflowDefinitionAdapter.java
+++ /dev/null
@@ -1,22 +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.core.workflow.api;
-
-public interface GroupWorkflowDefinitionAdapter extends WorkflowDefinitionAdapter {
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/UserWorkflowAdapter.java
----------------------------------------------------------------------
diff --git a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/UserWorkflowAdapter.java b/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/UserWorkflowAdapter.java
index 537294d..a29e584 100644
--- a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/UserWorkflowAdapter.java
+++ b/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/UserWorkflowAdapter.java
@@ -22,7 +22,6 @@ import org.apache.commons.lang3.tuple.Pair;
 import org.apache.syncope.common.lib.patch.UserPatch;
 import org.apache.syncope.core.provisioning.api.WorkflowResult;
 import org.apache.syncope.common.lib.to.UserTO;
-import org.apache.syncope.core.persistence.api.entity.user.User;
 
 /**
  * Interface for calling underlying workflow implementations.
@@ -51,23 +50,6 @@ public interface UserWorkflowAdapter extends WorkflowAdapter {
             UserTO userTO, boolean disablePwdPolicyCheck, final Boolean enabled, boolean storePassword);
 
     /**
-     * Request certification for the given user.
-     *
-     * @param user user to be subject to recertification
-     * @return user just updated
-     */
-    WorkflowResult<String> requestCertify(User user);
-
-    /**
-     * Execute a task on an user.
-     *
-     * @param userTO user to be subject to task
-     * @param taskId to be executed
-     * @return user just updated
-     */
-    WorkflowResult<String> execute(UserTO userTO, String taskId);
-
-    /**
      * Activate an user.
      *
      * @param userKey user to be activated

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/UserWorkflowDefinitionAdapter.java
----------------------------------------------------------------------
diff --git a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/UserWorkflowDefinitionAdapter.java b/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/UserWorkflowDefinitionAdapter.java
deleted file mode 100644
index 93b3969..0000000
--- a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/UserWorkflowDefinitionAdapter.java
+++ /dev/null
@@ -1,22 +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.core.workflow.api;
-
-public interface UserWorkflowDefinitionAdapter extends WorkflowDefinitionAdapter {
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/WorkflowAdapter.java
----------------------------------------------------------------------
diff --git a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/WorkflowAdapter.java b/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/WorkflowAdapter.java
index 07ca5b4..ba42c53 100644
--- a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/WorkflowAdapter.java
+++ b/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/WorkflowAdapter.java
@@ -18,60 +18,10 @@
  */
 package org.apache.syncope.core.workflow.api;
 
-import java.util.List;
-import org.apache.commons.lang3.tuple.Pair;
-import org.apache.syncope.common.lib.patch.AnyPatch;
-import org.apache.syncope.common.lib.to.WorkflowFormTO;
-import org.apache.syncope.common.lib.to.WorkflowTaskTO;
-import org.apache.syncope.core.persistence.api.dao.search.OrderByClause;
-import org.apache.syncope.core.provisioning.api.WorkflowResult;
-
 public interface WorkflowAdapter {
 
     /**
      * @return any string that might be interpreted as 'prefix' (say table prefix in SQL environments)
      */
     String getPrefix();
-
-    /**
-     * Get the forms for current workflow process instances matching the provided parameters.
-     *
-     * @param page result page
-     * @param size items per page
-     * @param orderByClauses sort conditions
-     * @return total number of forms, list of forms matching the provided parameters
-     */
-    Pair<Integer, List<WorkflowFormTO>> getForms(int page, int size, List<OrderByClause> orderByClauses);
-
-    /**
-     * Get form for given workflowId (if present).
-     *
-     * @param workflowId workflow id
-     * @return form (if present), otherwise null
-     */
-    WorkflowFormTO getForm(String workflowId);
-
-    /**
-     * Claim a form for a given object.
-     *
-     * @param taskId Workflow task to which the form is associated
-     * @return updated form
-     */
-    WorkflowFormTO claimForm(String taskId);
-
-    /**
-     * Submit a form.
-     *
-     * @param form to be submitted
-     * @return object updated by this form submit
-     */
-    WorkflowResult<? extends AnyPatch> submitForm(WorkflowFormTO form);
-
-    /**
-     * Get tasks available for execution, for given workflow id.
-     *
-     * @param workflowId workflow id
-     * @return available tasks
-     */
-    List<WorkflowTaskTO> getAvailableTasks(String workflowId);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/WorkflowDefinitionAdapter.java
----------------------------------------------------------------------
diff --git a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/WorkflowDefinitionAdapter.java b/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/WorkflowDefinitionAdapter.java
deleted file mode 100644
index ea84598..0000000
--- a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/WorkflowDefinitionAdapter.java
+++ /dev/null
@@ -1,64 +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.core.workflow.api;
-
-import java.io.OutputStream;
-import java.util.List;
-import org.apache.syncope.common.lib.to.WorkflowDefinitionTO;
-
-public interface WorkflowDefinitionAdapter {
-
-    /**
-     * @return all available workflow definitions.
-     */
-    List<WorkflowDefinitionTO> getDefinitions();
-
-    /**
-     * Export the workflow definition for the given key, in the requested format.
-     *
-     * @param key definition key
-     * @param format export format
-     * @param os export stream
-     */
-    void exportDefinition(String key, WorkflowDefinitionFormat format, OutputStream os);
-
-    /**
-     * Export the workflow graphical representation for the given key (if available).
-     *
-     * @param key definition key
-     * @param os export stream
-     */
-    void exportDiagram(String key, OutputStream os);
-
-    /**
-     * Import the workflow definition for the given key.
-     *
-     * @param key definition key
-     * @param format import format
-     * @param definition definition
-     */
-    void importDefinition(String key, WorkflowDefinitionFormat format, String definition);
-
-    /**
-     * Remove the workflow definition for the given key.
-     *
-     * @param key definition key
-     */
-    void deleteDefinition(String key);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/WorkflowDefinitionFormat.java
----------------------------------------------------------------------
diff --git a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/WorkflowDefinitionFormat.java b/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/WorkflowDefinitionFormat.java
deleted file mode 100644
index f7d67f2..0000000
--- a/core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/WorkflowDefinitionFormat.java
+++ /dev/null
@@ -1,29 +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.core.workflow.api;
-
-/**
- * Format for import / export of workflow definition.
- */
-public enum WorkflowDefinitionFormat {
-
-    XML,
-    JSON
-
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/core/workflow-flowable/pom.xml
----------------------------------------------------------------------
diff --git a/core/workflow-flowable/pom.xml b/core/workflow-flowable/pom.xml
deleted file mode 100644
index 75f1ece..0000000
--- a/core/workflow-flowable/pom.xml
+++ /dev/null
@@ -1,82 +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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.syncope</groupId>
-    <artifactId>syncope-core</artifactId>
-    <version>3.0.0-SNAPSHOT</version>
-  </parent>
-
-  <name>Apache Syncope Core Workflow Flowable</name>
-  <description>Apache Syncope Core Workflow Flowable</description>
-  <groupId>org.apache.syncope.core</groupId>
-  <artifactId>syncope-core-workflow-flowable</artifactId>
-  <packaging>jar</packaging>
-  
-  <properties>
-    <rootpom.basedir>${basedir}/../..</rootpom.basedir>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>commons-io</groupId>
-      <artifactId>commons-io</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.commons</groupId>
-      <artifactId>commons-email</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.javamail</groupId>
-      <artifactId>geronimo-javamail_1.4_mail</artifactId>
-    </dependency>
- 
-    <dependency>
-      <groupId>org.flowable</groupId>
-      <artifactId>flowable-engine</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.flowable</groupId>
-      <artifactId>flowable-spring</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.flowable</groupId>
-      <artifactId>flowable-json-converter</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.syncope.core</groupId>
-      <artifactId>syncope-core-workflow-java</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
-</project>

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/FlowableDefinitionLoader.java
----------------------------------------------------------------------
diff --git a/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/FlowableDefinitionLoader.java b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/FlowableDefinitionLoader.java
deleted file mode 100644
index 8c04545..0000000
--- a/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/FlowableDefinitionLoader.java
+++ /dev/null
@@ -1,92 +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.core.workflow.flowable;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Resource;
-import org.apache.commons.io.IOUtils;
-import org.apache.syncope.core.spring.ResourceWithFallbackLoader;
-import org.apache.syncope.core.persistence.api.SyncopeLoader;
-import org.apache.syncope.core.workflow.flowable.spring.DomainProcessEngine;
-import org.flowable.engine.ProcessEngine;
-import org.flowable.engine.repository.ProcessDefinition;
-import org.flowable.spring.SpringProcessEngineConfiguration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-@Component
-public class FlowableDefinitionLoader implements SyncopeLoader {
-
-    private static final Logger LOG = LoggerFactory.getLogger(FlowableDefinitionLoader.class);
-
-    @Resource(name = "userWorkflowDef")
-    private ResourceWithFallbackLoader userWorkflowDef;
-
-    @Autowired
-    private DomainProcessEngine dpEngine;
-
-    @Override
-    public Integer getPriority() {
-        return Integer.MIN_VALUE;
-    }
-
-    @Override
-    public void load() {
-        byte[] wfDef = new byte[0];
-
-        try (InputStream wfIn = userWorkflowDef.getResource().getInputStream()) {
-            wfDef = IOUtils.toByteArray(wfIn);
-        } catch (IOException e) {
-            LOG.error("While loading " + userWorkflowDef.getResource().getFilename(), e);
-        }
-
-        for (Map.Entry<String, ProcessEngine> entry : dpEngine.getEngines().entrySet()) {
-            List<ProcessDefinition> processes = entry.getValue().getRepositoryService().
-                    createProcessDefinitionQuery().processDefinitionKey(FlowableUserWorkflowAdapter.WF_PROCESS_ID).
-                    list();
-            LOG.debug(FlowableUserWorkflowAdapter.WF_PROCESS_ID + " Flowable processes in repository: {}", processes);
-
-            // Only loads process definition from file if not found in repository
-            if (processes.isEmpty()) {
-                entry.getValue().getRepositoryService().createDeployment().addInputStream(
-                        userWorkflowDef.getResource().getFilename(), new ByteArrayInputStream(wfDef)).deploy();
-
-                ProcessDefinition procDef = entry.getValue().getRepositoryService().createProcessDefinitionQuery().
-                        processDefinitionKey(FlowableUserWorkflowAdapter.WF_PROCESS_ID).latestVersion().
-                        singleResult();
-
-                FlowableDeployUtils.deployModel(entry.getValue(), procDef);
-
-                LOG.debug("Flowable Workflow definition loaded for domain {}", entry.getKey());
-            }
-
-            // jump to the next ID block
-            for (int i = 0; i < entry.getValue().getProcessEngineConfiguration().getIdBlockSize(); i++) {
-                SpringProcessEngineConfiguration.class.cast(entry.getValue().getProcessEngineConfiguration()).
-                        getIdGenerator().getNextId();
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/3cabe08a/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/FlowableDeployUtils.java
----------------------------------------------------------------------
diff --git a/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/FlowableDeployUtils.java b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/FlowableDeployUtils.java
deleted file mode 100644
index b2c6537..0000000
--- a/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/FlowableDeployUtils.java
+++ /dev/null
@@ -1,92 +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.core.workflow.flowable;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.node.ObjectNode;
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import org.apache.syncope.core.workflow.api.WorkflowException;
-import org.flowable.bpmn.converter.BpmnXMLConverter;
-import org.flowable.bpmn.model.BpmnModel;
-import org.flowable.editor.constants.ModelDataJsonConstants;
-import org.flowable.editor.language.json.converter.BpmnJsonConverter;
-import org.flowable.engine.ProcessEngine;
-import org.flowable.common.engine.api.FlowableException;
-import org.flowable.engine.repository.Deployment;
-import org.flowable.engine.repository.Model;
-import org.flowable.engine.repository.ProcessDefinition;
-
-public final class FlowableDeployUtils {
-
-    private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
-
-    public static Deployment deployDefinition(
-            final ProcessEngine engine, final String resourceName, final byte[] definition) {
-
-        try {
-            return engine.getRepositoryService().createDeployment().
-                    addInputStream(resourceName, new ByteArrayInputStream(definition)).deploy();
-        } catch (FlowableException e) {
-            throw new WorkflowException("While importing " + resourceName, e);
-        }
-    }
-
-    public static void deployModel(final ProcessEngine engine, final ProcessDefinition procDef) {
-        XMLStreamReader xtr = null;
-        try (InputStream bpmnStream = engine.getRepositoryService().
-                getResourceAsStream(procDef.getDeploymentId(), procDef.getResourceName());
-                InputStreamReader isr = new InputStreamReader(bpmnStream)) {
-
-            xtr = XMLInputFactory.newInstance().createXMLStreamReader(isr);
-            BpmnModel bpmnModel = new BpmnXMLConverter().convertToBpmnModel(xtr);
-
-            Model model = engine.getRepositoryService().newModel();
-            ObjectNode modelObjectNode = OBJECT_MAPPER.createObjectNode();
-            modelObjectNode.put(ModelDataJsonConstants.MODEL_NAME, procDef.getName());
-            model.setMetaInfo(modelObjectNode.toString());
-            model.setName(procDef.getName());
-            model.setDeploymentId(procDef.getDeploymentId());
-            model.setVersion(procDef.getVersion());
-
-            engine.getRepositoryService().saveModel(model);
-            engine.getRepositoryService().addModelEditorSource(
-                    model.getId(),
-                    new BpmnJsonConverter().convertToJson(bpmnModel).toString().getBytes());
-        } catch (Exception e) {
-            throw new WorkflowException("While importing " + procDef.getResourceName(), e);
-        } finally {
-            if (xtr != null) {
-                try {
-                    xtr.close();
-                } catch (XMLStreamException e) {
-                    // ignore
-                }
-            }
-        }
-    }
-
-    private FlowableDeployUtils() {
-        // private constructor for static utility class
-    }
-}


Mime
View raw message