Uploaded image for project: 'Repository'
  1. Repository
  2. REPO-483

The repository does not contain any code or data related to JBPM

    Details

    • Type: Story
    • Status: Done
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: ACS 5.2
    • Component/s: None
    • Work Funnel:
      Architecture
    • Sprint:
      Bravo Sprint 5, Bravo Sprint 6, Bravo Sprint 7
    • Story Points:
      8
    • Template:

      Description

      See ACE-1659.
      JBPM was deprecated in 5.0 and must be removed in order to proceed with Hibernate removal.

      Subtasks will cover specifics related to the implementation, however, the following statements must be true in addition to any implied requirements around quality:

      1. a fresh install of the platform against any database dialect must not create any JBPM tables
        1. No jpbm_ tables
        2. No Hibernate sequence for Oracle and PostgreSQL called hibernate_sequence
      2. all beans related to JBPM must be removed unless they exist as stubs for good reasons agreed by the team
      3. all bootstrap processes related to JBPM must be removed
      4. all APIs and related implementation classes must be cleaned out
      5. all tests must assume in-built Activiti only without any code switches
      6. upgrades must be able to remove JBPM tables (see REPO-1426)
        1. Patch must be optional using property system.remove-jbpm-tables-from-db.ignored=true
        2. Patch must not execute by default but must be tested to confirm it works

      Implementation Notes:

      • We already have SQL patches that are optional using the ignored tag:
            <bean id="patch.db-V4.2-metadata-query-indexes" class="org.alfresco.repo.admin.patch.impl.SchemaUpgradeScriptPatch" parent="basePatch">
                <property name="id"><value>patch.db-V4.2-metadata-query-indexes</value></property>
                <property name="description"><value>patch.db-V4.2-metadata-query-indexes.description</value></property>
                <property name="fixesFromSchema"><value>0</value></property>
                <property name="fixesToSchema"><value>6025</value></property>
                <property name="targetSchema"><value>6026</value></property>
                <property name="ignored"><value>${system.metadata-query-indexes.ignored}</value></property>
                <property name="scriptUrl">
                    <value>classpath:alfresco/dbscripts/upgrade/4.2/${db.script.dialect}/metadata-query-indexes.sql</value>
                </property>
            </bean>
        
      • Hibernate portion of the SQL create scripts is in SchemaBootstrap and can be ripped out:
                    // Build and execute changes generated by Hibernate
                    File tempFile = null;
                    Writer writer = null;
                    try
                    {
                        DatabaseMetadata metadata = new DatabaseMetadata(connection, dialect);
                        String[] sqls = cfg.generateSchemaUpdateScript(dialect, metadata);
                        if (sqls.length > 0)
                        {
                            tempFile = TempFileProvider.createTempFile("AlfrescoSchema-" + dialectStr + "-Update-", ".sql");
                            writer = new BufferedWriter(new FileWriter(tempFile));
                            for (String sql : sqls)
                            {
                                writer.append(sql);
                                writer.append(";\n");
                            }
                            try {writer.close();} catch (Throwable e) {}
                            executeScriptFile(cfg, connection, tempFile, null);
                        }
                    }
                    finally
                    {
                        if (writer != null)
                        {
                            try {writer.close();} catch (Throwable e) {}
                        }
                    }
        

        Attachments

          Issue Links

            Structure

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  dhulley Derek Hulley [X] (Inactive)
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Structure Helper Panel