...
- change parent/version from 2.1.2 to 2.1.3
- change properties/syncope.version from 2.1.2 to 2.1.3
In core/pom.xml
, replace
Files
Add
Code Block | ||
---|---|---|
notificationManager=org | ||
Code Block | ||
| ||
<dependency> <groupId>org.apache.syncope.core</groupId> <artifactId>syncope-core-workflow-flowable</artifactId> <version>${syncope.version}</version> </dependency> |
with
Code Block | ||
---|---|---|
| ||
<dependency>
<groupId>org.apache.syncope.ext.flowable</groupId>
<artifactId>syncope-ext-flowable-rest-cxf</artifactId>
<version>${syncope.version}</version>
</dependency> |
In console/pom.xml
, add
Code Block | ||
---|---|---|
| ||
<dependency>
<groupId>org.apache.syncope.ext.flowable</groupId>
<artifactId>syncope-ext-flowable-client-console</artifactId>
<version>${syncope.version}</version>
</dependency> |
as first child of the <dependencies>
element in the all
profile; then remove
Code Block | ||
---|---|---|
| ||
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-ui-modeler-app</artifactId>
<type>war</type>
<scope>test</scope>
</dependency> |
and the whole <plugins/>
element (including children).
Files
In the workflow.properties
file enabled with Flowable support (it could be core/src/main/resources/workflow.properties
, core/src/main/resources/all/workflow.properties
or other, depending on your project setup), replace
core.provisioning.java.notification.DefaultNotificationManager
auditManager=org.apache.syncope.core.provisioning.java.DefaultAuditManager |
to core/src/main/resources/provisioning.properties.
Add
Code Block |
---|
entity.factory=org.apache.syncope.core.persistence.jpa.entity.JPAEntityFactory
plainSchema.dao=org.apache.syncope.core.persistence.jpa.dao.JPAPlainSchemaDAO
plainAttr.dao=org.apache.syncope.core.persistence.jpa.dao.JPAPlainAttrDAO
plainAttrValue.dao=org.apache.syncope.core.persistence.jpa.dao.JPAPlainAttrValueDAO
user.dao |
...
language | java |
---|
...
=org.apache.syncope.core.persistence. |
...
with
...
language | java |
---|
...
jpa.dao.JPAUserDAO group.dao=org.apache.syncope.core. |
...
persistence. |
...
In both console/src/main/resources/console.properties
and console/src/test/resources/console.properties
, remove
Code Block |
---|
flowableModelerDirectory=${flowable-modeler.directory} |
and
...
jpa.dao.JPAGroupDAO anyObject.dao=org.apache.syncope.core.persistence.jpa.dao.JPAAnyObjectDAO conf.dao=org.apache.syncope. |
...
core.persistence. |
...
jpa. |
...
dao. |
...
then add
JPAConfDAO |
to core/src/main/resources/persistence.properties
.
...
Replace the following files with their 2.1.2 3 counterparts (if found, re-apply any customization previously made; otherwise, skip):
- under
core/src/main/resources
:- persistenceContext.xml
- provisioningContext.xml
- workflowFlowableContext.xml
views.xml
, depending on the actual DBMS used for internal storage:
- under /restCXFContext.xml core/src/main/resources/workflowFlowableContext.xml (if such file is present in your source tree)META-INF:
- all files under enduser/src/main/webapp/app
...
- move all workflow tasks from package
org.apache.syncope.core.workflow.flowable.task
to packageorg.apache.syncope.core.flowable.task
- change parent class from
AbstractFlowableServiceTask
toFlowableServiceTask
Internal Storage
If not using Flowable
Stop the Java EE container running Syncope Core, then execute the following SQL statement:
Code Block | ||
---|---|---|
| ||
DROP VIEW user_search; ALTER TABLE SyncopeUser DROP COLUMN workflowId; CREATE VIEW user_search AS SELECT u.id as any_id, u.* FROM SyncopeUser u; _null_attr; DROP VIEW group_search; ALTER TABLE SyncopeGroup DROP COLUMN workflowId; CREATE VIEW group_search AS SELECT r.id as any_id, r.* FROM SyncopeGroup r; _null_attr; DROP VIEW anyObject_search; ALTER TABLE AnyObject DROP COLUMN workflowId; CREATE VIEW anyObject_search AS SELECT a.id as any_id, a.* FROM AnyObject a; |
Finally start again the Java EE container.
If using Flowable
Stop the Java EE container running Syncope Core, then follow the instructions to download and extract the upgrade tool, the run it by adding the "-flowable-2.1.2
" switch to the command line as follows:
Code Block | ||
---|---|---|
| ||
./syncopeupgrade.sh org.postgresql.Driver \
jdbc:postgresql://localhost:5432/syncope syncope syncope postgres \
-flowable-2.1.2 \
upgradeFlowable212.sql |
Now execute the SQL statements as generated above in the upgradeFlowable212.sql
file against the internal storage: in case of errors, apply manual corrections until everything runs clear; consider to restore from the backup taken above if needed, before executing the updated SQL statements again.
Finally start again the Java EE container and watch the log files to check for any error.
User workflow definition
The user workflow must be updated: in the XML definition, replace any occurrence like as follows:
Code Block |
---|
flowable:expression="#{create.execute(execution.processInstanceId)}" |
with
Code Block |
---|
flowable:delegateExpression="${create}" |
Once the updated definition is set, stop the Java EE container and verify the actual version on the internal storage:
Code Block | ||
---|---|---|
| ||
SELECT ID_ FROM ACT_RE_PROCDEF ORDER BY VERSION_ DESC LIMIT 1 |
Supposing that the statement above returns userWorkflow:2:12504
, execute the following SQL statements:
Code Block | ||
---|---|---|
| ||
UPDATE ACT_RU_EXECUTION SET PROC_DEF_ID_ = 'userWorkflow:2:12504' WHERE ID_ IS NOT NULL;
UPDATE ACT_RU_TASK SET PROC_DEF_ID_ = 'userWorkflow:2:12504' WHERE ID_ IS NOT NULL; |
...
_null_attr; |