http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/GenerateToken.java ---------------------------------------------------------------------- diff --git a/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/GenerateToken.java b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/GenerateToken.java new file mode 100644 index 0000000..08f6000 --- /dev/null +++ b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/GenerateToken.java @@ -0,0 +1,44 @@ +/* + * 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.task; + +import org.apache.syncope.core.persistence.api.dao.ConfDAO; +import org.apache.syncope.core.persistence.api.entity.user.User; +import org.apache.syncope.core.workflow.flowable.FlowableUserWorkflowAdapter; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +@Component +public class GenerateToken extends AbstractFlowableServiceTask { + + @Autowired + private ConfDAO confDAO; + + @Override + protected void doExecute(final String executionId) { + User user = engine.getRuntimeService(). + getVariable(executionId, FlowableUserWorkflowAdapter.USER, User.class); + + user.generateToken( + confDAO.find("token.length", 256L).intValue(), + confDAO.find("token.expireTime", 60L).intValue()); + + engine.getRuntimeService().setVariable(executionId, FlowableUserWorkflowAdapter.USER, user); + } +}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Notify.java ---------------------------------------------------------------------- diff --git a/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Notify.java b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Notify.java new file mode 100644 index 0000000..687424e --- /dev/null +++ b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Notify.java @@ -0,0 +1,65 @@ +/* + * 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.task; + +import org.apache.commons.lang3.StringUtils; +import org.apache.syncope.common.lib.to.UserTO; +import org.apache.syncope.common.lib.types.AuditElements; +import org.apache.syncope.core.persistence.api.entity.user.User; +import org.apache.syncope.core.provisioning.api.notification.NotificationManager; +import org.apache.syncope.core.workflow.flowable.FlowableUserWorkflowAdapter; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * General-purpose notification task for usage within workflow. + * It requires a pre-existing <tt>Notification</tt> with category <tt>CUSTOM</tt> and result <tt>SUCCESS</tt>. + * An <tt>event</tt> workflow variable needs to be provided as well. + */ +@Component +public class Notify extends AbstractFlowableServiceTask { + + @Autowired + private NotificationManager notificationManager; + + @Override + protected void doExecute(final String executionId) { + User user = engine.getRuntimeService(). + getVariable(executionId, FlowableUserWorkflowAdapter.USER, User.class); + UserTO userTO = engine.getRuntimeService(). + getVariable(executionId, FlowableUserWorkflowAdapter.USER_TO, UserTO.class); + String event = engine.getRuntimeService(). + getVariable(executionId, FlowableUserWorkflowAdapter.EVENT, String.class); + + if (StringUtils.isNotBlank(event)) { + notificationManager.createTasks( + AuditElements.EventCategoryType.CUSTOM, + null, + null, + event, + AuditElements.Result.SUCCESS, + userTO, + null, + user.getToken()); + } else { + LOG.debug("Not sending any notification since no event was found"); + } + } + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/PasswordReset.java ---------------------------------------------------------------------- diff --git a/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/PasswordReset.java b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/PasswordReset.java new file mode 100644 index 0000000..017fcc6 --- /dev/null +++ b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/PasswordReset.java @@ -0,0 +1,71 @@ +/* + * 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.task; + +import org.apache.syncope.common.lib.patch.PasswordPatch; +import org.apache.syncope.common.lib.patch.UserPatch; +import org.apache.syncope.core.provisioning.api.PropagationByResource; +import org.apache.syncope.core.persistence.api.dao.UserDAO; +import org.apache.syncope.core.persistence.api.entity.user.User; +import org.apache.syncope.core.provisioning.api.data.UserDataBinder; +import org.apache.syncope.core.workflow.api.WorkflowException; +import org.apache.syncope.core.workflow.flowable.FlowableUserWorkflowAdapter; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +@Component +public class PasswordReset extends AbstractFlowableServiceTask { + + @Autowired + private UserDAO userDAO; + + @Autowired + private UserDataBinder dataBinder; + + @Override + protected void doExecute(final String executionId) { + User user = engine.getRuntimeService(). + getVariable(executionId, FlowableUserWorkflowAdapter.USER, User.class); + String token = engine.getRuntimeService(). + getVariable(executionId, FlowableUserWorkflowAdapter.TOKEN, String.class); + String password = engine.getRuntimeService(). + getVariable(executionId, FlowableUserWorkflowAdapter.PASSWORD, String.class); + + if (!user.checkToken(token)) { + throw new WorkflowException(new IllegalArgumentException("Wrong token: " + token + " for " + user)); + } + + user.removeToken(); + + UserPatch userPatch = new UserPatch(); + userPatch.setKey(user.getKey()); + userPatch.setPassword(new PasswordPatch.Builder(). + onSyncope(true). + resources(userDAO.findAllResourceKeys(user.getKey())). + value(password).build()); + + PropagationByResource propByRes = dataBinder.update(user, userPatch); + + // report updated user and propagation by resource as result + engine.getRuntimeService().setVariable(executionId, FlowableUserWorkflowAdapter.USER, user); + engine.getRuntimeService().setVariable(executionId, FlowableUserWorkflowAdapter.USER_PATCH, userPatch); + engine.getRuntimeService().setVariable(executionId, FlowableUserWorkflowAdapter.PROP_BY_RESOURCE, propByRes); + } + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Reactivate.java ---------------------------------------------------------------------- diff --git a/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Reactivate.java b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Reactivate.java new file mode 100644 index 0000000..0052b5a --- /dev/null +++ b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Reactivate.java @@ -0,0 +1,29 @@ +/* + * 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.task; + +import org.springframework.stereotype.Component; + +@Component +public class Reactivate extends AbstractFlowableServiceTask { + + @Override + protected void doExecute(final String executionId) { + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Recertify.java ---------------------------------------------------------------------- diff --git a/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Recertify.java b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Recertify.java new file mode 100644 index 0000000..6099e0c --- /dev/null +++ b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Recertify.java @@ -0,0 +1,58 @@ +/* + * 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.task; + +import java.util.Date; +import org.apache.syncope.core.persistence.api.dao.UserDAO; +import org.apache.syncope.core.persistence.api.entity.AnyUtilsFactory; +import org.apache.syncope.core.persistence.api.entity.EntityFactory; +import org.apache.syncope.core.persistence.api.entity.user.User; +import org.apache.syncope.core.workflow.flowable.FlowableUserWorkflowAdapter; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +@Component +public class Recertify extends AbstractFlowableServiceTask { + + @Autowired + protected UserDAO userDAO; + + @Autowired + protected EntityFactory entityFactory; + + @Autowired + protected AnyUtilsFactory anyUtilsFactory; + + @Override + protected void doExecute(final String executionId) { + LOG.debug("Processing Recertification {}", executionId); + User user = engine.getRuntimeService(). + getVariable(executionId, FlowableUserWorkflowAdapter.USER, User.class); + String submitter = engine.getRuntimeService(). + getVariable(executionId, FlowableUserWorkflowAdapter.FORM_SUBMITTER, String.class); + + LOG.debug("Saving Recertification information for user {}", user.getUsername()); + + user.setLastRecertificator(submitter); + user.setLastRecertification(new Date(System.currentTimeMillis())); + + userDAO.save(user); + } + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Suspend.java ---------------------------------------------------------------------- diff --git a/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Suspend.java b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Suspend.java new file mode 100644 index 0000000..189d619 --- /dev/null +++ b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Suspend.java @@ -0,0 +1,29 @@ +/* + * 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.task; + +import org.springframework.stereotype.Component; + +@Component +public class Suspend extends AbstractFlowableServiceTask { + + @Override + protected void doExecute(final String executionId) { + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Update.java ---------------------------------------------------------------------- diff --git a/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Update.java b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Update.java new file mode 100644 index 0000000..7f5d9d2 --- /dev/null +++ b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Update.java @@ -0,0 +1,49 @@ +/* + * 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.task; + +import org.apache.syncope.common.lib.patch.UserPatch; +import org.apache.syncope.core.provisioning.api.PropagationByResource; +import org.apache.syncope.core.persistence.api.entity.user.User; +import org.apache.syncope.core.provisioning.api.data.UserDataBinder; +import org.apache.syncope.core.workflow.flowable.FlowableUserWorkflowAdapter; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +@Component +public class Update extends AbstractFlowableServiceTask { + + @Autowired + private UserDataBinder dataBinder; + + @Override + protected void doExecute(final String executionId) { + User user = engine.getRuntimeService(). + getVariable(executionId, FlowableUserWorkflowAdapter.USER, User.class); + UserPatch userPatch = engine.getRuntimeService(). + getVariable(executionId, FlowableUserWorkflowAdapter.USER_PATCH, UserPatch.class); + + PropagationByResource propByRes = dataBinder.update(user, userPatch); + + // report updated user and propagation by resource as result + engine.getRuntimeService().setVariable(executionId, FlowableUserWorkflowAdapter.USER, user); + engine.getRuntimeService().setVariable(executionId, FlowableUserWorkflowAdapter.USER_PATCH, userPatch); + engine.getRuntimeService().setVariable(executionId, FlowableUserWorkflowAdapter.PROP_BY_RESOURCE, propByRes); + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/core/workflow-flowable/src/main/resources/userWorkflow.bpmn20.xml ---------------------------------------------------------------------- diff --git a/core/workflow-flowable/src/main/resources/userWorkflow.bpmn20.xml b/core/workflow-flowable/src/main/resources/userWorkflow.bpmn20.xml new file mode 100644 index 0000000..20690f3 --- /dev/null +++ b/core/workflow-flowable/src/main/resources/userWorkflow.bpmn20.xml @@ -0,0 +1,287 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:flowable="http://flowable.org/bpmn" + xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" + xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" + xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" + typeLanguage="http://www.w3.org/2001/XMLSchema" + expressionLanguage="http://www.w3.org/1999/XPath" + targetNamespace="http://www.flowable.org/processdef"> + + <process id="userWorkflow" name="User Workflow" isExecutable="true"> + <startEvent id="theStart"/> + <sequenceFlow id="flow1" sourceRef="theStart" targetRef="create"/> + <serviceTask id="create" name="Create" flowable:expression="#{create.execute(execution.processInstanceId)}"/> + <sequenceFlow id="flow2" sourceRef="create" targetRef="activate"/> + <scriptTask id="activate" name="Activate" scriptFormat="groovy" flowable:autoStoreVariables="false"> + <script>execution.setVariable("propagateEnable", Boolean.TRUE);</script> + </scriptTask> + <sequenceFlow id="flow3" sourceRef="activate" targetRef="active"/> + <userTask id="active" name="Active"/> + <sequenceFlow id="flow8" sourceRef="active" targetRef="activeGw"/> + <exclusiveGateway id="activeGw"/> + <sequenceFlow id="active2Update" sourceRef="activeGw" targetRef="update"> + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${task == 'update'}]]></conditionExpression> + </sequenceFlow> + <sequenceFlow id="active2Suspend" sourceRef="activeGw" targetRef="suspend"> + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${task == 'suspend'}]]></conditionExpression> + </sequenceFlow> + <sequenceFlow id="active2Delete" sourceRef="activeGw" targetRef="delete"> + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${task == 'delete'}]]></conditionExpression> + </sequenceFlow> + <sequenceFlow id="active2RequestPasswordReset" sourceRef="activeGw" targetRef="generateToken4PasswordReset"> + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${task == 'requestPasswordReset'}]]></conditionExpression> + </sequenceFlow> + <sequenceFlow id="active2ConfirmPasswordReset" sourceRef="activeGw" targetRef="checkToken4ConfirmPasswordReset"> + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${task == 'confirmPasswordReset'}]]></conditionExpression> + </sequenceFlow> + <serviceTask id="update" name="Update" flowable:expression="#{update.execute(execution.processInstanceId)}"/> + <sequenceFlow id="sid-EA22026A-25F0-4ED0-AB6E-9CE9CE74623C" sourceRef="update" targetRef="active"/> + <serviceTask id="suspend" name="Suspend" flowable:expression="#{suspend.execute(execution.processInstanceId)}"/> + <sequenceFlow id="flow10" sourceRef="suspend" targetRef="suspended"/> + <userTask id="suspended" name="Suspended"/> + <sequenceFlow id="flow11" sourceRef="suspended" targetRef="suspendedGw"/> + <exclusiveGateway id="suspendedGw"/> + <sequenceFlow id="suspended2Reactivate" sourceRef="suspendedGw" targetRef="reactivate"> + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${task == 'reactivate'}]]></conditionExpression> + </sequenceFlow> + <sequenceFlow id="suspended2Delete" sourceRef="suspendedGw" targetRef="delete"> + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${task == 'delete'}]]></conditionExpression> + </sequenceFlow> + <serviceTask id="reactivate" name="Reactivate" flowable:expression="#{reactivate.execute(execution.processInstanceId)}"/> + <sequenceFlow id="flow12" sourceRef="reactivate" targetRef="active"/> + + <serviceTask id="generateToken4PasswordReset" name="Generate Token" flowable:expression="#{generateToken.execute(execution.processInstanceId)}"/> + <sequenceFlow id="sid-7F78CE07-A7A1-467F-BB4B-40FB234AEFF7" sourceRef="generateToken4PasswordReset" targetRef="notify4RequestPasswordReset"/> + <serviceTask id="notify4RequestPasswordReset" name="Notification" flowable:expression="#{notify.execute(execution.processInstanceId)}"/> + <sequenceFlow id="sid-CF9ACA40-7750-47C3-A508-7250D24D4F1F" sourceRef="notify4RequestPasswordReset" targetRef="active"/> + + <serviceTask id="checkToken4ConfirmPasswordReset" name="Check token, remove and update password" flowable:expression="#{passwordReset.execute(execution.processInstanceId)}"/> + <sequenceFlow id="sid-3E9FE01D-CC60-4A95-B356-CA0DC000FAD6" sourceRef="checkToken4ConfirmPasswordReset" targetRef="notify4ConfirmPasswordReset"/> + <serviceTask id="notify4ConfirmPasswordReset" name="Notification" flowable:expression="#{notify.execute(execution.processInstanceId)}"/> + <sequenceFlow id="sid-A37806A7-6B7B-48A2-BB37-DAE640231144" sourceRef="notify4ConfirmPasswordReset" targetRef="active"/> + + <serviceTask id="delete" name="Delete" flowable:expression="#{delete.execute(execution.processInstanceId)}"/> + <sequenceFlow id="flow99" sourceRef="delete" targetRef="theEnd"/> + <!-- Recertification tasks --> + <userTask id="recertificationRequest" name="Recertification Request" flowable:formKey="recertify"> + <extensionElements> + <flowable:formProperty id="username" name="Username" type="string" expression="${user.username}" writable="false"/> + <flowable:formProperty id="approve" name="Recertify?" type="boolean" required="true"/> + <flowable:formProperty id="rejectReason" name="Reason for not recertifying" type="string" variable="rejectReason"/> + </extensionElements> + </userTask> + <serviceTask id="recertify-task" name="Recertify" flowable:expression="#{recertify.execute(execution.processInstanceId)}"/> + <sequenceFlow id="recert-request-start-flow" sourceRef="activeGw" targetRef="recertificationRequest"> + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${task == 'request-certify'}]]></conditionExpression> + </sequenceFlow> + <exclusiveGateway id="recert-condition"/> + <sequenceFlow id="recert-flow1" sourceRef="recertificationRequest" targetRef="recertify-task"/> + <sequenceFlow id="recert-flow2" sourceRef="recertify-task" targetRef="recert-condition"/> + <sequenceFlow id="recert-approved-flow" sourceRef="recert-condition" targetRef="active"> + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approve}]]></conditionExpression> + </sequenceFlow> + <sequenceFlow id="recert-denied-flow" sourceRef="recert-condition" targetRef="suspend"> + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${!approve}]]></conditionExpression> + </sequenceFlow> + <!-- End Recertification flow --> + <endEvent id="theEnd"/> + </process> + + <bpmndi:BPMNDiagram id="BPMNDiagram_userWorkflow"> + <bpmndi:BPMNPlane bpmnElement="userWorkflow" id="BPMNPlane_userWorkflow"> + <bpmndi:BPMNShape bpmnElement="theStart" id="BPMNShape_theStart"> + <omgdc:Bounds height="35.0" width="35.0" x="540.0" y="521.0"></omgdc:Bounds> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape bpmnElement="create" id="BPMNShape_create"> + <omgdc:Bounds height="60.0" width="100.0" x="620.0" y="509.0"></omgdc:Bounds> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape bpmnElement="activate" id="BPMNShape_activate"> + <omgdc:Bounds height="80.0" width="100.0" x="828.0" y="500.0"></omgdc:Bounds> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape bpmnElement="active" id="BPMNShape_active"> + <omgdc:Bounds height="60.0" width="100.0" x="1030.0" y="511.0"></omgdc:Bounds> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape bpmnElement="activeGw" id="BPMNShape_activeGw"> + <omgdc:Bounds height="40.0" width="40.0" x="1400.0" y="520.0"></omgdc:Bounds> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape bpmnElement="update" id="BPMNShape_update"> + <omgdc:Bounds height="60.0" width="100.0" x="1370.0" y="615.0"></omgdc:Bounds> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape bpmnElement="suspend" id="BPMNShape_suspend"> + <omgdc:Bounds height="60.0" width="100.0" x="1490.0" y="370.0"></omgdc:Bounds> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape bpmnElement="suspended" id="BPMNShape_suspended"> + <omgdc:Bounds height="60.0" width="100.0" x="1640.0" y="370.0"></omgdc:Bounds> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape bpmnElement="suspendedGw" id="BPMNShape_suspendedGw"> + <omgdc:Bounds height="40.0" width="40.0" x="1820.0" y="380.0"></omgdc:Bounds> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape bpmnElement="reactivate" id="BPMNShape_reactivate"> + <omgdc:Bounds height="60.0" width="100.0" x="1940.0" y="290.0"></omgdc:Bounds> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape bpmnElement="generateToken4PasswordReset" id="BPMNShape_generateToken4PasswordReset"> + <omgdc:Bounds height="81.0" width="121.0" x="1515.0" y="604.0"></omgdc:Bounds> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape bpmnElement="notify4RequestPasswordReset" id="BPMNShape_notify4RequestPasswordReset"> + <omgdc:Bounds height="81.0" width="121.0" x="1515.0" y="750.0"></omgdc:Bounds> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape bpmnElement="checkToken4ConfirmPasswordReset" id="BPMNShape_checkToken4ConfirmPasswordReset"> + <omgdc:Bounds height="81.0" width="121.0" x="1725.0" y="664.0"></omgdc:Bounds> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape bpmnElement="notify4ConfirmPasswordReset" id="BPMNShape_notify4ConfirmPasswordReset"> + <omgdc:Bounds height="81.0" width="121.0" x="1725.0" y="810.0"></omgdc:Bounds> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape bpmnElement="delete" id="BPMNShape_delete"> + <omgdc:Bounds height="60.0" width="100.0" x="1940.0" y="438.0"></omgdc:Bounds> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape bpmnElement="recertificationRequest" id="BPMNShape_recertificationRequest"> + <omgdc:Bounds height="80.0" width="100.0" x="1370.0" y="375.0"></omgdc:Bounds> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape bpmnElement="recertify-task" id="BPMNShape_recertify-task"> + <omgdc:Bounds height="80.0" width="100.0" x="1230.0" y="375.0"></omgdc:Bounds> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape bpmnElement="recert-condition" id="BPMNShape_recert-condition"> + <omgdc:Bounds height="40.0" width="40.0" x="1178.0" y="475.0"></omgdc:Bounds> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape bpmnElement="theEnd" id="BPMNShape_theEnd"> + <omgdc:Bounds height="35.0" width="35.0" x="2080.0" y="451.0"></omgdc:Bounds> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1"> + <omgdi:waypoint x="575.0" y="538.0"></omgdi:waypoint> + <omgdi:waypoint x="620.0" y="539.0"></omgdi:waypoint> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2"> + <omgdi:waypoint x="720.0" y="539.0"></omgdi:waypoint> + <omgdi:waypoint x="828.0" y="540.0"></omgdi:waypoint> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3"> + <omgdi:waypoint x="928.0" y="540.0"></omgdi:waypoint> + <omgdi:waypoint x="1030.0" y="541.0"></omgdi:waypoint> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8"> + <omgdi:waypoint x="1130.0" y="541.0"></omgdi:waypoint> + <omgdi:waypoint x="1400.0" y="540.0"></omgdi:waypoint> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge bpmnElement="active2Update" id="BPMNEdge_active2Update"> + <omgdi:waypoint x="1420.0" y="560.0"></omgdi:waypoint> + <omgdi:waypoint x="1420.0" y="615.0"></omgdi:waypoint> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge bpmnElement="active2Suspend" id="BPMNEdge_active2Suspend"> + <omgdi:waypoint x="1440.0" y="540.0"></omgdi:waypoint> + <omgdi:waypoint x="1540.0" y="540.0"></omgdi:waypoint> + <omgdi:waypoint x="1540.0" y="430.0"></omgdi:waypoint> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge bpmnElement="active2Delete" id="BPMNEdge_active2Delete"> + <omgdi:waypoint x="1440.0" y="540.0"></omgdi:waypoint> + <omgdi:waypoint x="1990.0" y="540.0"></omgdi:waypoint> + <omgdi:waypoint x="1990.0" y="498.0"></omgdi:waypoint> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge bpmnElement="active2RequestPasswordReset" id="BPMNEdge_active2RequestPasswordReset"> + <omgdi:waypoint x="1440.0" y="540.0"></omgdi:waypoint> + <omgdi:waypoint x="1575.0" y="540.0"></omgdi:waypoint> + <omgdi:waypoint x="1575.0" y="604.0"></omgdi:waypoint> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge bpmnElement="active2ConfirmPasswordReset" id="BPMNEdge_active2ConfirmPasswordReset"> + <omgdi:waypoint x="1440.0" y="540.0"></omgdi:waypoint> + <omgdi:waypoint x="1785.0" y="540.0"></omgdi:waypoint> + <omgdi:waypoint x="1785.0" y="664.0"></omgdi:waypoint> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge bpmnElement="sid-EA22026A-25F0-4ED0-AB6E-9CE9CE74623C" id="BPMNEdge_sid-EA22026A-25F0-4ED0-AB6E-9CE9CE74623C"> + <omgdi:waypoint x="1370.0" y="645.0"></omgdi:waypoint> + <omgdi:waypoint x="1080.0" y="645.0"></omgdi:waypoint> + <omgdi:waypoint x="1080.0" y="571.0"></omgdi:waypoint> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10"> + <omgdi:waypoint x="1590.0" y="400.0"></omgdi:waypoint> + <omgdi:waypoint x="1640.0" y="400.0"></omgdi:waypoint> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11"> + <omgdi:waypoint x="1740.0" y="400.0"></omgdi:waypoint> + <omgdi:waypoint x="1820.0" y="400.0"></omgdi:waypoint> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge bpmnElement="suspended2Reactivate" id="BPMNEdge_suspended2Reactivate"> + <omgdi:waypoint x="1860.0" y="400.0"></omgdi:waypoint> + <omgdi:waypoint x="1902.0" y="400.0"></omgdi:waypoint> + <omgdi:waypoint x="1902.0" y="320.0"></omgdi:waypoint> + <omgdi:waypoint x="1940.0" y="320.0"></omgdi:waypoint> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge bpmnElement="suspended2Delete" id="BPMNEdge_suspended2Delete"> + <omgdi:waypoint x="1860.0" y="400.0"></omgdi:waypoint> + <omgdi:waypoint x="1990.0" y="400.0"></omgdi:waypoint> + <omgdi:waypoint x="1990.0" y="438.0"></omgdi:waypoint> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12"> + <omgdi:waypoint x="1990.0" y="290.0"></omgdi:waypoint> + <omgdi:waypoint x="1990.0" y="261.0"></omgdi:waypoint> + <omgdi:waypoint x="1080.0" y="261.0"></omgdi:waypoint> + <omgdi:waypoint x="1080.0" y="511.0"></omgdi:waypoint> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge bpmnElement="sid-7F78CE07-A7A1-467F-BB4B-40FB234AEFF7" id="BPMNEdge_sid-7F78CE07-A7A1-467F-BB4B-40FB234AEFF7"> + <omgdi:waypoint x="1575.0" y="685.0"></omgdi:waypoint> + <omgdi:waypoint x="1575.0" y="750.0"></omgdi:waypoint> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge bpmnElement="sid-CF9ACA40-7750-47C3-A508-7250D24D4F1F" id="BPMNEdge_sid-CF9ACA40-7750-47C3-A508-7250D24D4F1F"> + <omgdi:waypoint x="1515.0" y="790.0"></omgdi:waypoint> + <omgdi:waypoint x="1080.0" y="790.0"></omgdi:waypoint> + <omgdi:waypoint x="1080.0" y="571.0"></omgdi:waypoint> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge bpmnElement="sid-3E9FE01D-CC60-4A95-B356-CA0DC000FAD6" id="BPMNEdge_sid-3E9FE01D-CC60-4A95-B356-CA0DC000FAD6"> + <omgdi:waypoint x="1785.0" y="745.0"></omgdi:waypoint> + <omgdi:waypoint x="1785.0" y="810.0"></omgdi:waypoint> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge bpmnElement="sid-A37806A7-6B7B-48A2-BB37-DAE640231144" id="BPMNEdge_sid-A37806A7-6B7B-48A2-BB37-DAE640231144"> + <omgdi:waypoint x="1725.0" y="850.0"></omgdi:waypoint> + <omgdi:waypoint x="1080.0" y="850.0"></omgdi:waypoint> + <omgdi:waypoint x="1080.0" y="571.0"></omgdi:waypoint> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge bpmnElement="flow99" id="BPMNEdge_flow99"> + <omgdi:waypoint x="2040.0" y="468.0"></omgdi:waypoint> + <omgdi:waypoint x="2080.0" y="468.0"></omgdi:waypoint> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge bpmnElement="recert-request-start-flow" id="BPMNEdge_recert-request-start-flow"> + <omgdi:waypoint x="1420.0" y="520.0"></omgdi:waypoint> + <omgdi:waypoint x="1420.0" y="455.0"></omgdi:waypoint> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge bpmnElement="recert-flow1" id="BPMNEdge_recert-flow1"> + <omgdi:waypoint x="1370.0" y="415.0"></omgdi:waypoint> + <omgdi:waypoint x="1330.0" y="415.0"></omgdi:waypoint> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge bpmnElement="recert-flow2" id="BPMNEdge_recert-flow2"> + <omgdi:waypoint x="1280.0" y="455.0"></omgdi:waypoint> + <omgdi:waypoint x="1280.0" y="495.0"></omgdi:waypoint> + <omgdi:waypoint x="1218.0" y="495.0"></omgdi:waypoint> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge bpmnElement="recert-approved-flow" id="BPMNEdge_recert-approved-flow"> + <omgdi:waypoint x="1198.0" y="515.0"></omgdi:waypoint> + <omgdi:waypoint x="1194.0" y="541.0"></omgdi:waypoint> + <omgdi:waypoint x="1130.0" y="541.0"></omgdi:waypoint> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge bpmnElement="recert-denied-flow" id="BPMNEdge_recert-denied-flow"> + <omgdi:waypoint x="1198.0" y="475.0"></omgdi:waypoint> + <omgdi:waypoint x="1198.0" y="313.0"></omgdi:waypoint> + <omgdi:waypoint x="1540.0" y="313.0"></omgdi:waypoint> + <omgdi:waypoint x="1540.0" y="370.0"></omgdi:waypoint> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</definitions> http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/core/workflow-flowable/src/main/resources/workflow.properties ---------------------------------------------------------------------- diff --git a/core/workflow-flowable/src/main/resources/workflow.properties b/core/workflow-flowable/src/main/resources/workflow.properties new file mode 100644 index 0000000..50c42fc --- /dev/null +++ b/core/workflow-flowable/src/main/resources/workflow.properties @@ -0,0 +1,22 @@ +# 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. +wf.directory=${conf.directory} +historyLevel=activity +jobExecutorActivate=true +uwfAdapter=org.apache.syncope.core.workflow.flowable.FlowableUserWorkflowAdapter +gwfAdapter=org.apache.syncope.core.workflow.java.DefaultGroupWorkflowAdapter +awfAdapter=org.apache.syncope.core.workflow.java.DefaultAnyObjectWorkflowAdapter http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/core/workflow-flowable/src/main/resources/workflowFlowableContext.xml ---------------------------------------------------------------------- diff --git a/core/workflow-flowable/src/main/resources/workflowFlowableContext.xml b/core/workflow-flowable/src/main/resources/workflowFlowableContext.xml new file mode 100644 index 0000000..517b8d7 --- /dev/null +++ b/core/workflow-flowable/src/main/resources/workflowFlowableContext.xml @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:context="http://www.springframework.org/schema/context" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd + http://www.springframework.org/schema/context + http://www.springframework.org/schema/context/spring-context.xsd"> + + <bean id="userWorkflowDef" class="org.apache.syncope.core.spring.ResourceWithFallbackLoader"> + <property name="primary" value="file:${wf.directory}/userWorkflow.bpmn20.xml"/> + <property name="fallback" value="classpath:userWorkflow.bpmn20.xml"/> + </bean> + + <bean id="flowableUtils" class="org.apache.syncope.core.workflow.flowable.FlowableUtils"/> + + <bean id="syncopeFlowableUserManager" class="org.apache.syncope.core.workflow.flowable.SyncopeUserManager"/> + <bean id="syncopeFlowableGroupManager" class="org.apache.syncope.core.workflow.flowable.SyncopeGroupManager"/> + + <bean class="org.activiti.spring.SpringProcessEngineConfiguration" scope="prototype"> + <property name="transactionsExternallyManaged" value="true"/> + <property name="databaseSchemaUpdate" value="true"/> + + <property name="jpaHandleTransaction" value="true"/> + <property name="jpaCloseEntityManager" value="false"/> + + <property name="history" value="${historyLevel}"/> + <property name="jobExecutorActivate" value="${jobExecutorActivate}"/> + + <property name="customSessionFactories"> + <list> + <bean class="org.apache.syncope.core.workflow.flowable.SyncopeSessionFactory"> + <property name="syncopeSession" ref="syncopeFlowableUserManager"/> + </bean> + <bean class="org.apache.syncope.core.workflow.flowable.SyncopeSessionFactory"> + <property name="syncopeSession" ref="syncopeFlowableGroupManager"/> + </bean> + </list> + </property> + <property name="customPreVariableTypes"> + <list> + <bean class="org.apache.syncope.core.workflow.flowable.SyncopeEntitiesVariableType"/> + </list> + </property> + </bean> + + <bean class="org.apache.syncope.core.workflow.flowable.spring.DomainProcessEngineFactoryBean"/> + + <context:component-scan base-package="org.apache.syncope.core.workflow.flowable"/> + +</beans> http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/deb/core/LICENSE ---------------------------------------------------------------------- diff --git a/deb/core/LICENSE b/deb/core/LICENSE index 28544b5..991f660 100644 --- a/deb/core/LICENSE +++ b/deb/core/LICENSE @@ -733,7 +733,7 @@ This is licensed under the CDDL 1.0, see above. == -For Activiti BPM Platform (http://www.activiti.org/): +For Flowable (http://www.flowable.org/): This is licensed under the AL 2.0, see above. == http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/deb/core/NOTICE ---------------------------------------------------------------------- diff --git a/deb/core/NOTICE b/deb/core/NOTICE index b3f0bd3..f126a65 100644 --- a/deb/core/NOTICE +++ b/deb/core/NOTICE @@ -97,7 +97,7 @@ Copyright 2011-2016 Tirasa S.r.l. All rights reserved. == -This product includes software developed by the Activiti BPM Platform project. +This product includes software developed by the Flowable project. == http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/deb/core/pom.xml ---------------------------------------------------------------------- diff --git a/deb/core/pom.xml b/deb/core/pom.xml index f7321c1..106fc47 100644 --- a/deb/core/pom.xml +++ b/deb/core/pom.xml @@ -56,7 +56,7 @@ under the License. <dependency> <groupId>org.apache.syncope.core</groupId> - <artifactId>syncope-core-workflow-activiti</artifactId> + <artifactId>syncope-core-workflow-flowable</artifactId> <version>${project.version}</version> </dependency> @@ -137,7 +137,7 @@ under the License. <filtering>true</filtering> </resource> <resource> - <directory>${basedir}/../../core/workflow-activiti/src/main/resources</directory> + <directory>${basedir}/../../core/workflow-flowable/src/main/resources</directory> <includes> <include>workflow.properties</include> <include>userWorkflow.bpmn20.xml</include> http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/fit/console-reference/pom.xml ---------------------------------------------------------------------- diff --git a/fit/console-reference/pom.xml b/fit/console-reference/pom.xml index a68b810..f46136e 100644 --- a/fit/console-reference/pom.xml +++ b/fit/console-reference/pom.xml @@ -110,8 +110,8 @@ under the License. <scope>test</scope> </dependency> <dependency> - <groupId>org.activiti</groupId> - <artifactId>activiti-webapp-explorer2</artifactId> + <groupId>org.flowable</groupId> + <artifactId>flowable-webapp-explorer2</artifactId> <type>war</type> <scope>test</scope> </dependency> @@ -140,28 +140,41 @@ under the License. <inherited>true</inherited> <executions> <execution> - <id>setupActivitiModeler</id> + <id>setupFlowableModeler</id> <phase>process-resources</phase> <configuration> <target> - <unzip src="${settings.localRepository}/org/activiti/activiti-webapp-explorer2/${activiti.version}/activiti-webapp-explorer2-${activiti.version}.war" dest="${project.build.directory}/activiti-webapp-explorer2" /> + <unzip src="${settings.localRepository}/org/flowable/flowable-webapp-explorer2/${flowable.version}/flowable-webapp-explorer2-${flowable.version}.war" + dest="${project.build.directory}/flowable-webapp-explorer2"/> - <mkdir dir="${activiti-modeler.directory}" /> - <copy file="${project.build.directory}/activiti-webapp-explorer2/modeler.html" todir="${activiti-modeler.directory}" /> - <replace file="${activiti-modeler.directory}/modeler.html" token="</head>" value="<script type="text/javascript">window.onunload = refreshParent; function refreshParent() { window.opener.location.reload(); }</script></head>" /> - <copy file="${project.build.directory}/activiti-webapp-explorer2/WEB-INF/classes/stencilset.json" todir="${activiti-modeler.directory}" /> + <mkdir dir="${flowable-modeler.directory}"/> + <copy file="${project.build.directory}/flowable-webapp-explorer2/modeler.html" + todir="${flowable-modeler.directory}"/> + <replace file="${flowable-modeler.directory}/modeler.html" + token="</head>" + value="<script type="text/javascript">window.onunload = refreshParent; function refreshParent() { window.opener.location.reload(); }</script></head>"/> + <copy file="${project.build.directory}/flowable-webapp-explorer2/WEB-INF/classes/stencilset.json" + todir="${flowable-modeler.directory}"/> - <mkdir dir="${activiti-modeler.directory}/editor-app" /> - <copy todir="${activiti-modeler.directory}/editor-app"> - <fileset dir="${project.build.directory}/activiti-webapp-explorer2/editor-app" /> + <mkdir dir="${flowable-modeler.directory}/editor-app"/> + <copy todir="${flowable-modeler.directory}/editor-app"> + <fileset dir="${project.build.directory}/flowable-webapp-explorer2/editor-app"/> </copy> - <replaceregexp file="${activiti-modeler.directory}/editor-app/editor/oryx.debug.js" match="ORYX.CONFIG.ROOT_PATH =.*"editor/"; //TODO: Remove last slash!!" replace="BASE_PATH = window.location.toString().substr(0, window.location.toString().indexOf('/wicket')); ORYX.CONFIG.ROOT_PATH = BASE_PATH + "/activiti-modeler/editor-app/editor/";" byline="true" /> - <replace file="${activiti-modeler.directory}/editor-app/editor/oryx.debug.js" token="new Ajax.Request(ACTIVITI.CONFIG.contextRoot + '/editor/stencilset?version=' + Date.now(), {" value="new Ajax.Request(window.location.toString().substr(0, window.location.toString().indexOf('/activiti-modeler')) + "/activiti-modeler/stencilset.json", {" /> - <replace file="${activiti-modeler.directory}/editor-app/editor/oryx.debug.js" token="ORYX.Editor.createByUrl = function(modelUrl){" value="modelUrl = BASE_PATH + "/workflowDefGET?modelId=" + this.modelId; ORYX.Editor.createByUrl = function(modelUrl){" /> - <replace file="${activiti-modeler.directory}/editor-app/configuration/toolbar-default-actions.js" token="window.location.href = "./";" value="window.close();" /> + <replace file="${flowable-modeler.directory}/editor-app/editor/oryx.debug.js" + token="return this.changeDifference !== 0 || (this.facade.getModelMetaData()['new'] && this.facade.getCanvas().getChildShapes().size() > 0);" + value="return this.changeDifference !== 0 + || (typeof this.facade.getModelMetaData() != 'undefined' + && this.facade.getModelMetaData()['new'] && this.facade.getCanvas().getChildShapes().size() > 0);"/> + <replace file="${flowable-modeler.directory}/editor-app/configuration/toolbar-default-actions.js" + token="window.location.href = "./";" + value="window.close();"/> - <copy file="${basedir}/src/main/resources/url-config.js" todir="${activiti-modeler.directory}/editor-app/configuration" overwrite="true" /> - <copy file="${basedir}/src/main/resources/save-model.html" todir="${activiti-modeler.directory}/editor-app/popups" overwrite="true" /> + <copy file="${basedir}/src/main/resources/url-config.js" + todir="${flowable-modeler.directory}/editor-app/configuration" + overwrite="true"/> + <copy file="${basedir}/src/main/resources/save-model.html" + todir="${flowable-modeler.directory}/editor-app/popups" + overwrite="true"/> </target> </configuration> <goals> @@ -364,7 +377,7 @@ under the License. <phase>package</phase> <configuration> <target> - <copy file="${basedir}/../core-reference/target/test-classes/rebel.xml" tofile="${basedir}/../core-reference/target/syncope-fit-core-reference-${project.version}/WEB-INF/classes/rebel.xml" overwrite="true" /> + <copy file="${basedir}/../core-reference/target/test-classes/rebel.xml" tofile="${basedir}/../core-reference/target/syncope-fit-core-reference-${project.version}/WEB-INF/classes/rebel.xml" overwrite="true"/> </target> </configuration> <goals> http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/fit/console-reference/src/main/resources/console.properties ---------------------------------------------------------------------- diff --git a/fit/console-reference/src/main/resources/console.properties b/fit/console-reference/src/main/resources/console.properties index 1453ad0..418f2f0 100644 --- a/fit/console-reference/src/main/resources/console.properties +++ b/fit/console-reference/src/main/resources/console.properties @@ -29,7 +29,7 @@ useGZIPCompression=true csrf=true -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/console-reference/src/main/resources/url-config.js ---------------------------------------------------------------------- diff --git a/fit/console-reference/src/main/resources/url-config.js b/fit/console-reference/src/main/resources/url-config.js index cb22a08..054d516 100644 --- a/fit/console-reference/src/main/resources/url-config.js +++ b/fit/console-reference/src/main/resources/url-config.js @@ -20,15 +20,15 @@ var KISBPM = KISBPM || {}; KISBPM.URL = { getModel: function (modelId) { - return window.location.toString().substr(0, window.location.toString().indexOf('/activiti-modeler')) + return window.location.toString().substr(0, window.location.toString().indexOf('/flowable-modeler')) + "/workflowDefGET?modelId=" + modelId; }, getStencilSet: function () { - return window.location.toString().substr(0, window.location.toString().indexOf('/activiti-modeler')) - + "/activiti-modeler/stencilset.json"; + return window.location.toString().substr(0, window.location.toString().indexOf('/flowable-modeler')) + + "/flowable-modeler/stencilset.json"; }, putModel: function (modelId) { - return window.location.toString().substr(0, window.location.toString().indexOf('/activiti-modeler')) + return window.location.toString().substr(0, window.location.toString().indexOf('/flowable-modeler')) + "/workflowDefPUT?modelId=" + modelId; } }; http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/fit/core-reference/pom.xml ---------------------------------------------------------------------- diff --git a/fit/core-reference/pom.xml b/fit/core-reference/pom.xml index 43b48a1..a6fddb1 100644 --- a/fit/core-reference/pom.xml +++ b/fit/core-reference/pom.xml @@ -1019,7 +1019,7 @@ under the License. <dependencies> <dependency> <groupId>org.apache.syncope.core</groupId> - <artifactId>syncope-core-workflow-activiti</artifactId> + <artifactId>syncope-core-workflow-flowable</artifactId> <version>${project.version}</version> </dependency> @@ -1059,7 +1059,7 @@ under the License. <build> <plugins> - <!-- Adds Activiti test content --> + <!-- Adds Flowable test content --> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>xml-maven-plugin</artifactId> @@ -1080,7 +1080,7 @@ under the License. <include>domains/MasterContent.xml</include> </includes> <outputDir>${project.build.directory}/classes</outputDir> - <stylesheet>${basedir}/src/test/resources/addActivitiToContent.xsl</stylesheet> + <stylesheet>${basedir}/src/test/resources/addFlowableToContent.xsl</stylesheet> <outputProperties> <outputProperty> <name>indent</name> http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/fit/core-reference/src/main/resources/all/workflow.properties ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/main/resources/all/workflow.properties b/fit/core-reference/src/main/resources/all/workflow.properties index 771b11c..50c42fc 100644 --- a/fit/core-reference/src/main/resources/all/workflow.properties +++ b/fit/core-reference/src/main/resources/all/workflow.properties @@ -17,6 +17,6 @@ wf.directory=${conf.directory} historyLevel=activity jobExecutorActivate=true -uwfAdapter=org.apache.syncope.core.workflow.activiti.ActivitiUserWorkflowAdapter +uwfAdapter=org.apache.syncope.core.workflow.flowable.FlowableUserWorkflowAdapter gwfAdapter=org.apache.syncope.core.workflow.java.DefaultGroupWorkflowAdapter awfAdapter=org.apache.syncope.core.workflow.java.DefaultAnyObjectWorkflowAdapter http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/fit/core-reference/src/main/resources/userWorkflow.bpmn20.xml ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/main/resources/userWorkflow.bpmn20.xml b/fit/core-reference/src/main/resources/userWorkflow.bpmn20.xml index 6981dbd..9aa100d 100644 --- a/fit/core-reference/src/main/resources/userWorkflow.bpmn20.xml +++ b/fit/core-reference/src/main/resources/userWorkflow.bpmn20.xml @@ -19,40 +19,40 @@ under the License. --> <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:activiti="http://activiti.org/bpmn" + xmlns:flowable="http://flowable.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" - targetNamespace="http://activiti.org/bpmn20"> - + targetNamespace="http://www.flowable.org/processdef"> + <process id="userWorkflow" name="User Workflow" isExecutable="true"> <startEvent id="theStart"/> <sequenceFlow id="flow1" sourceRef="theStart" targetRef="create"/> - <serviceTask id="create" name="Create" activiti:expression="#{create.execute(execution.processInstanceId)}"/> + <serviceTask id="create" name="Create" flowable:expression="#{create.execute(execution.processInstanceId)}"/> <sequenceFlow id="flow2" sourceRef="create" targetRef="createGW"/> <exclusiveGateway id="createGW"/> <sequenceFlow id="createAsAnonymous2Approval" sourceRef="createGW" targetRef="createApproval"> <conditionExpression xsi:type="tFormalExpression"> - <![CDATA[${wfExecutor == 'anonymous' || activitiUtils.isUserIngroup(user, 'groupForWorkflowApproval')}]]> + <![CDATA[${wfExecutor == 'anonymous' || flowableUtils.isUserIngroup(user, 'groupForWorkflowApproval')}]]> </conditionExpression> </sequenceFlow> <sequenceFlow id="create2Activate" sourceRef="createGW" targetRef="enableGW"> <conditionExpression xsi:type="tFormalExpression"> - <![CDATA[${!activitiUtils.isUserIngroup(user, 'groupForWorkflowApproval')}]]> + <![CDATA[${!flowableUtils.isUserIngroup(user, 'groupForWorkflowApproval')}]]> </conditionExpression> </sequenceFlow> <userTask id="createApproval" name="Create approval" - activiti:candidateGroups="managingDirector" activiti:formKey="createApproval"> + flowable:candidateGroups="managingDirector" flowable:formKey="createApproval"> <extensionElements> - <activiti:formProperty id="username" name="Username" type="string" expression="${user.username}" writable="false"/> - <activiti:formProperty id="approve" name="Approve?" type="boolean" variable="approve" required="true"/> - <activiti:formProperty id="rejectReason" name="Reason for rejecting" type="string" variable="rejectReason"/> + <flowable:formProperty id="username" name="Username" type="string" expression="${user.username}" writable="false"/> + <flowable:formProperty id="approve" name="Approve?" type="boolean" variable="approve" required="true"/> + <flowable:formProperty id="rejectReason" name="Reason for rejecting" type="string" variable="rejectReason"/> </extensionElements> </userTask> <sequenceFlow id="flow3" sourceRef="createApproval" targetRef="CreateApprovalEvaluation"/> - <scriptTask id="CreateApprovalEvaluation" name="Create approval evaluation" scriptFormat="groovy" activiti:autoStoreVariables="false"> + <scriptTask id="CreateApprovalEvaluation" name="Create approval evaluation" scriptFormat="groovy" flowable:autoStoreVariables="false"> <script><![CDATA[ try { if (approve){ @@ -85,7 +85,7 @@ try { <exclusiveGateway id="enableGW"/> <sequenceFlow id="createApprovalGW2OptIn" sourceRef="enableGW" targetRef="generateToken"> <conditionExpression xsi:type="tFormalExpression"> - <![CDATA[${activitiUtils.isUserIngroup(user, 'groupForWorkflowOptIn')}]]> + <![CDATA[${flowableUtils.isUserIngroup(user, 'groupForWorkflowOptIn')}]]> </conditionExpression> </sequenceFlow> <sequenceFlow id="createApprovalGW2Activate" sourceRef="enableGW" targetRef="activate"> @@ -97,9 +97,9 @@ try { <sequenceFlow id="createApprovalGW2Suspended" sourceRef="enableGW" targetRef="suspend"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${!enabled}]]></conditionExpression> </sequenceFlow> - <serviceTask id="activate" name="Activate" activiti:expression="#{autoActivate.execute(execution.processInstanceId)}"/> + <serviceTask id="activate" name="Activate" flowable:expression="#{autoActivate.execute(execution.processInstanceId)}"/> <sequenceFlow id="flow4" sourceRef="activate" targetRef="active"/> - <serviceTask id="generateToken" name="Generate token" activiti:expression="#{generateToken.execute(execution.processInstanceId)}"/> + <serviceTask id="generateToken" name="Generate token" flowable:expression="#{generateToken.execute(execution.processInstanceId)}"/> <sequenceFlow id="flow5" sourceRef="generateToken" targetRef="created"/> <userTask id="created" name="Created"/> <sequenceFlow id="flow6" sourceRef="created" targetRef="optinGW"/> @@ -110,7 +110,7 @@ try { <sequenceFlow id="created2Created" sourceRef="optinGW" targetRef="created"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${!user.checkToken(token)}]]></conditionExpression> </sequenceFlow> - <scriptTask id="removeToken" name="Remove Token and Activate" scriptFormat="groovy" activiti:autoStoreVariables="false"> + <scriptTask id="removeToken" name="Remove Token and Activate" scriptFormat="groovy" flowable:autoStoreVariables="false"> <script><![CDATA[ user.removeToken() ]]></script> @@ -142,15 +142,15 @@ try { <conditionExpression xsi:type="tFormalExpression"><![CDATA[${task == 'confirmPasswordReset'}]]></conditionExpression> </sequenceFlow> <userTask id="updateApproval" name="Update approval" - activiti:candidateGroups="managingDirector" activiti:formKey="updateApproval"> + flowable:candidateGroups="managingDirector" flowable:formKey="updateApproval"> <extensionElements> - <activiti:formProperty id="username" name="Username" type="string" expression="${user.username}" writable="false"/> - <activiti:formProperty id="approve" name="Approve?" type="boolean" variable="approve" required="true"/> - <activiti:formProperty id="rejectReason" name="Reason for rejecting" type="string" variable="rejectReason"/> + <flowable:formProperty id="username" name="Username" type="string" expression="${user.username}" writable="false"/> + <flowable:formProperty id="approve" name="Approve?" type="boolean" variable="approve" required="true"/> + <flowable:formProperty id="rejectReason" name="Reason for rejecting" type="string" variable="rejectReason"/> </extensionElements> </userTask> <sequenceFlow id="sid-A2BDF803-688C-4A4D-9D33-6D859C029245" sourceRef="updateApproval" targetRef="UpdateApprovalEvaluation"/> - <scriptTask id="UpdateApprovalEvaluation" name="Update approval evaluation" scriptFormat="groovy" activiti:autoStoreVariables="false"> + <scriptTask id="UpdateApprovalEvaluation" name="Update approval evaluation" scriptFormat="groovy" flowable:autoStoreVariables="false"> <script><![CDATA[ try { if (approve){ @@ -180,24 +180,24 @@ try { <sequenceFlow id="sid-B5FFEBCA-1FBF-457F-BC55-39FD387188B2" sourceRef="updateApprovalGW" targetRef="delete"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${task == 'delete'}]]></conditionExpression> </sequenceFlow> - <scriptTask id="rejectUpdate" name="Reject update" scriptFormat="groovy" activiti:autoStoreVariables="false"> + <scriptTask id="rejectUpdate" name="Reject update" scriptFormat="groovy" flowable:autoStoreVariables="false"> <script><![CDATA[ execution.setVariable("propByResource", null); ]]></script> </scriptTask> <sequenceFlow id="flow8ter" sourceRef="rejectUpdate" targetRef="active"/> - <serviceTask id="update" name="Update" activiti:expression="#{update.execute(execution.processInstanceId)}"/> + <serviceTask id="update" name="Update" flowable:expression="#{update.execute(execution.processInstanceId)}"/> <sequenceFlow id="flow9" sourceRef="update" targetRef="active"/> <userTask id="recertificationRequest" name="Recertification Request" - activiti:candidateGroups="managingDirector" activiti:formKey="recertify"> + flowable:candidateGroups="managingDirector" flowable:formKey="recertify"> <extensionElements> - <activiti:formProperty id="username" name="Username" type="string" expression="${user.username}" writable="false"/> - <activiti:formProperty id="approve" name="Recertify?" type="boolean" required="true"/> - <activiti:formProperty id="rejectReason" name="Reason for not recertifying" type="string" variable="rejectReason"/> + <flowable:formProperty id="username" name="Username" type="string" expression="${user.username}" writable="false"/> + <flowable:formProperty id="approve" name="Recertify?" type="boolean" required="true"/> + <flowable:formProperty id="rejectReason" name="Reason for not recertifying" type="string" variable="rejectReason"/> </extensionElements> </userTask> <sequenceFlow id="recert-flow1" sourceRef="recertificationRequest" targetRef="recertify-task"/> - <serviceTask id="recertify-task" name="Recertify" activiti:expression="#{recertify.execute(execution.processInstanceId)}"/> + <serviceTask id="recertify-task" name="Recertify" flowable:expression="#{recertify.execute(execution.processInstanceId)}"/> <sequenceFlow id="recert-request-start-flow" sourceRef="activeGw" targetRef="recertificationRequest"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${task == 'request-certify'}]]></conditionExpression> </sequenceFlow> @@ -210,7 +210,7 @@ try { <conditionExpression xsi:type="tFormalExpression"><![CDATA[${!approve}]]></conditionExpression> </sequenceFlow> <!-- End Recertification flow --> - <serviceTask id="suspend" name="Suspend" activiti:expression="#{suspend.execute(execution.processInstanceId)}"/> + <serviceTask id="suspend" name="Suspend" flowable:expression="#{suspend.execute(execution.processInstanceId)}"/> <sequenceFlow id="flow10" sourceRef="suspend" targetRef="suspended"/> <userTask id="suspended" name="Suspended"/> <sequenceFlow id="flow11" sourceRef="suspended" targetRef="suspendedGw"/> @@ -221,9 +221,9 @@ try { <sequenceFlow id="suspended2Delete" sourceRef="suspendedGw" targetRef="delete"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${task == 'delete'}]]></conditionExpression> </sequenceFlow> - <serviceTask id="reactivate" name="Reactivate" activiti:expression="#{reactivate.execute(execution.processInstanceId)}"/> + <serviceTask id="reactivate" name="Reactivate" flowable:expression="#{reactivate.execute(execution.processInstanceId)}"/> <sequenceFlow id="flow12" sourceRef="reactivate" targetRef="active"/> - <scriptTask id="reject" name="Reject" scriptFormat="groovy" activiti:autoStoreVariables="false"> + <scriptTask id="reject" name="Reject" scriptFormat="groovy" flowable:autoStoreVariables="false"> <script><![CDATA[ def scriptVar = rejectReason execution.setVariable("propByResource", null); @@ -240,11 +240,11 @@ try { <conditionExpression xsi:type="tFormalExpression"><![CDATA[${empty task}]]></conditionExpression> </sequenceFlow> <userTask id="deleteApproval" name="Delete approval" - activiti:candidateGroups="managingDirector" activiti:formKey="deleteApproval"> + flowable:candidateGroups="managingDirector" flowable:formKey="deleteApproval"> <extensionElements> - <activiti:formProperty id="username" name="Username" type="string" expression="${user.username}" writable="false"/> - <activiti:formProperty id="approve" name="Approve?" type="boolean" variable="approve" required="true"/> - <activiti:formProperty id="rejectReason" name="Reason for rejecting" type="string" variable="rejectReason"/> + <flowable:formProperty id="username" name="Username" type="string" expression="${user.username}" writable="false"/> + <flowable:formProperty id="approve" name="Approve?" type="boolean" variable="approve" required="true"/> + <flowable:formProperty id="rejectReason" name="Reason for rejecting" type="string" variable="rejectReason"/> </extensionElements> </userTask> <sequenceFlow id="flow14bis" sourceRef="deleteApproval" targetRef="deleteApprovalGW"/> @@ -255,21 +255,21 @@ try { <sequenceFlow id="deleteApprovalGW2Reject" sourceRef="deleteApprovalGW" targetRef="rejectDelete"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${!approve}]]></conditionExpression> </sequenceFlow> - <scriptTask id="rejectDelete" name="Reject delete" scriptFormat="groovy" activiti:autoStoreVariables="false"> + <scriptTask id="rejectDelete" name="Reject delete" scriptFormat="groovy" flowable:autoStoreVariables="false"> <script><![CDATA[ execution.setVariable("propByResource", null); ]]></script> </scriptTask> <sequenceFlow id="flow14ter" sourceRef="rejectDelete" targetRef="active"/> - <serviceTask id="generateToken4PasswordReset" name="Generate token" activiti:expression="#{generateToken.execute(execution.processInstanceId)}"/> + <serviceTask id="generateToken4PasswordReset" name="Generate token" flowable:expression="#{generateToken.execute(execution.processInstanceId)}"/> <sequenceFlow id="flow15" sourceRef="generateToken4PasswordReset" targetRef="notify4RequestPasswordReset"/> - <serviceTask id="notify4RequestPasswordReset" name="Notification" activiti:expression="#{notify.execute(execution.processInstanceId)}"/> + <serviceTask id="notify4RequestPasswordReset" name="Notification" flowable:expression="#{notify.execute(execution.processInstanceId)}"/> <sequenceFlow id="flow16" sourceRef="notify4RequestPasswordReset" targetRef="active"/> - <serviceTask id="checkToken4ConfirmPasswordReset" name="Check token, remove and update password" activiti:expression="#{passwordReset.execute(execution.processInstanceId)}"/> + <serviceTask id="checkToken4ConfirmPasswordReset" name="Check token, remove and update password" flowable:expression="#{passwordReset.execute(execution.processInstanceId)}"/> <sequenceFlow id="flow17" sourceRef="checkToken4ConfirmPasswordReset" targetRef="notify4ConfirmPasswordReset"/> - <serviceTask id="notify4ConfirmPasswordReset" name="Notification" activiti:expression="#{notify.execute(execution.processInstanceId)}"/> + <serviceTask id="notify4ConfirmPasswordReset" name="Notification" flowable:expression="#{notify.execute(execution.processInstanceId)}"/> <sequenceFlow id="flow18" sourceRef="notify4ConfirmPasswordReset" targetRef="active"/> - <serviceTask id="delete" name="Delete" activiti:expression="#{delete.execute(execution.processInstanceId)}"/> + <serviceTask id="delete" name="Delete" flowable:expression="#{delete.execute(execution.processInstanceId)}"/> <sequenceFlow id="flow99" sourceRef="delete" targetRef="theEnd"/> <endEvent id="theEnd"/> </process> @@ -702,4 +702,4 @@ try { </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> -</definitions> +</definitions> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/fit/core-reference/src/test/java/org/apache/syncope/fit/ActivitiDetector.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/ActivitiDetector.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/ActivitiDetector.java deleted file mode 100644 index d14eec2..0000000 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/ActivitiDetector.java +++ /dev/null @@ -1,36 +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; - -import org.apache.syncope.common.rest.api.service.SyncopeService; - -public class ActivitiDetector { - - public static boolean isActivitiEnabledForUsers(final SyncopeService syncopeService) { - return syncopeService.platform().getUserWorkflowAdapter().contains("Activiti"); - } - - public static boolean isActivitiEnabledForGroups(final SyncopeService syncopeService) { - return syncopeService.platform().getGroupWorkflowAdapter().contains("Activiti"); - } - - public static boolean isActivitiEnabledForAnyObjects(final SyncopeService syncopeService) { - return syncopeService.platform().getAnyObjectWorkflowAdapter().contains("Activiti"); - } -} http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/fit/core-reference/src/test/java/org/apache/syncope/fit/FlowableDetector.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/FlowableDetector.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/FlowableDetector.java new file mode 100644 index 0000000..0fbb094 --- /dev/null +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/FlowableDetector.java @@ -0,0 +1,36 @@ +/* + * 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; + +import org.apache.syncope.common.rest.api.service.SyncopeService; + +public class FlowableDetector { + + public static boolean isFlowableEnabledForUsers(final SyncopeService syncopeService) { + return syncopeService.platform().getUserWorkflowAdapter().contains("Flowable"); + } + + public static boolean isFlowableEnabledForGroups(final SyncopeService syncopeService) { + return syncopeService.platform().getGroupWorkflowAdapter().contains("Flowable"); + } + + public static boolean isFlowableEnabledForAnyObjects(final SyncopeService syncopeService) { + return syncopeService.platform().getAnyObjectWorkflowAdapter().contains("Flowable"); + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AjaxBrowseITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AjaxBrowseITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AjaxBrowseITCase.java index 5c80cca..a941be5 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AjaxBrowseITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AjaxBrowseITCase.java @@ -30,7 +30,7 @@ import org.apache.syncope.client.console.pages.SecurityQuestions; import org.apache.syncope.client.console.pages.Types; import org.apache.syncope.client.console.pages.Workflow; import org.apache.syncope.client.console.topology.Topology; -import org.apache.syncope.fit.ActivitiDetector; +import org.apache.syncope.fit.FlowableDetector; import org.junit.Test; // Please, keep the class name as is in order to respect the execution order. It seems that from wicket 7.5.0 the @@ -70,7 +70,7 @@ public class AjaxBrowseITCase extends AbstractConsoleITCase { TESTER.clickLink("body:reportsLI:reports"); TESTER.assertRenderedPage(Reports.class); - if (ActivitiDetector.isActivitiEnabledForUsers(SYNCOPE_SERVICE)) { + if (FlowableDetector.isFlowableEnabledForUsers(SYNCOPE_SERVICE)) { TESTER.clickLink("body:configurationLI:configurationUL:workflowLI:workflow"); TESTER.assertRenderedPage(Workflow.class); } http://git-wip-us.apache.org/repos/asf/syncope/blob/7098ca9f/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AuthenticationITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AuthenticationITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AuthenticationITCase.java index a2cad27..ac043bf 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AuthenticationITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AuthenticationITCase.java @@ -71,7 +71,7 @@ import org.apache.syncope.common.rest.api.service.SchemaService; import org.apache.syncope.common.rest.api.service.UserService; import org.apache.syncope.core.spring.security.Encryptor; 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.Test; import org.junit.runner.RunWith; @@ -479,7 +479,7 @@ public class AuthenticationITCase extends AbstractITCase { @Test public void issueSYNCOPE434() { - Assume.assumeTrue(ActivitiDetector.isActivitiEnabledForUsers(syncopeService)); + Assume.assumeTrue(FlowableDetector.isFlowableEnabledForUsers(syncopeService)); // 1. create user with group 'groupForWorkflowApproval' // (users with group groupForWorkflowApproval are defined in workflow as subject to approval)