Source changes

POM

In the root pom.xml:

  • change parent/version from 2.1.1 to 2.1.2
  • change properties/syncope.version from 2.1.1 to 2.1.2

In core/pom.xml, replace

         <dependency>
          <groupId>org.apache.syncope.core</groupId>
          <artifactId>syncope-core-workflow-flowable</artifactId>
           <version>${syncope.version}</version>
         </dependency>

with

        <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

        <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

        <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.propertiescore/src/main/resources/all/workflow.properties or other, depending on your project setup), replace

    uwfAdapter=org.apache.syncope.core.workflow.flowable.FlowableUserWorkflowAdapter

    with

    uwfAdapter=org.apache.syncope.core.flowable.impl.FlowableUserWorkflowAdapter
  • In both console/src/main/resources/console.properties and console/src/test/resources/console.properties, remove

    flowableModelerDirectory=${flowable-modeler.directory}

    and

    page.workflow=org.apache.syncope.client.console.pages.Workflow

    then add

    topology.corePoolSize=10
    topology.maxPoolSize=20
    topology.queueCapacity=50

Replace the following files with their 2.1.2 counterparts (re-apply any customization previously made):

Classes

  • move all workflow tasks from package org.apache.syncope.core.workflow.flowable.task to package org.apache.syncope.core.flowable.task
  • change parent class from AbstractFlowableServiceTask to FlowableServiceTask 

Internal Storage

If not using Flowable

Stop the Java EE container running Syncope Core, then execute the following SQL statement:

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;

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;

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:

./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:

flowable:expression="#{create.execute(execution.processInstanceId)}"

with

flowable:delegateExpression="${create}"

Once the updated definition is set, stop the Java EE container and verify the actual version on the internal storage:

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:

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;

Finally start again the Java EE container and watch the log files to check for any error.

  • No labels