Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-10258

I can programmatically customize resource deployment

    Details

    • Type: Feature Request
    • Status: Closed
    • Priority: L3 - Default
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 7.12.0, 7.12.0-alpha3
    • Component/s: engine
    • Labels:
      None

      Description

      I can extend the process engine such that

      • I can programmatically decide which resources get deployed (when duplicate filtering is enabled)
      • I can programmatically decide which deployments get resumed (when resuming is enabled)

      Could be a handler that can be set via the engine configuration. The handler interface can look like this:

      package org.camunda.bpm;
      
      import java.util.Collection;
      
      import org.camunda.bpm.engine.repository.Deployment;
      import org.camunda.bpm.engine.repository.Resource;
      
      public interface DeploymentHandler {
      
        /**
         * @param newResource the resource to be deployed
         * @param existingResource most recently deployed resource that has the same resource name
         *   and deployment name
         * @return true, if the resource should be deployed
         */
        boolean shouldDeployResource(Resource newResource, Resource existingResource);
      
        /**
         * @param baseDeployment the new deployment, or, if no new resources are being deployed,
         *   the most recent deployment of the same name
         * @return the IDs of deployments that should be resumed (registered with the job executor
         *   and registered for the deploying process application)
         */
        Collection<String> determineDeploymentsToResume(Deployment baseDeployment);
      }
      

        Issue Links

          Activity

          Hide
          nikola.koevski Nikola Koevski added a comment -

          Decisions:

          • The Handler interface was extended to include separate resume methods for resuming by Process Definition Keys and Deployment Name.
          • The Handler interface now also provides a method to determine a Duplicate deployment (old implementation calls it an existingDeployment.
          • A Factory interface is provided to instantiate DeploymentHandlers in the DeployCmd class.
          Show
          nikola.koevski Nikola Koevski added a comment - Decisions: The Handler interface was extended to include separate resume methods for resuming by Process Definition Keys and Deployment Name. The Handler interface now also provides a method to determine a Duplicate deployment (old implementation calls it an existingDeployment . A Factory interface is provided to instantiate DeploymentHandlers in the DeployCmd class.

            People

            • Assignee:
              Unassigned
              Reporter:
              thorben.lindhauer Thorben Lindhauer
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development