Documentation Home

Broadleaf Commerce Enterprise Module

Workflow

  1. AdminScheduledDeploymentController.saveScheduledDeployment(....) is called where a WorkflowScheduledDeployment is made. (a.k.a. deployment)
  2. then the ScheduledDeploymentManager.scheduleDeploymentJob(WorkflowScheduledDeployment scheduledDeployment) is called to create a ScheduledJob and tie it to the deployment.
  3. the ScheduledJob (a.k.a. job) is created by buildScheduledJob(WorkflowScheduledDeployment schedule). In this method the deployment is given a activeDate and nextDeployTime
  4. job is then saved to the databaseSystemEventDao and the jobIdfor the deployment is set.
  5. When job is scheduled to run; the ScheduledJobManagerImpl will run its manageJobs(....) method where it creates a IntervalJob to trigger.
  6. In that IntervalJob, it runs its "excecute(...)" method that searches for all SystemEventFactory

RecurringDeploymentEventFactory is found since it is an SystemEventFactory and creates a SystemEvent of EventType.RECURRING_DEPLOYMENT

  1. Lastly the IntervalJob then invokes the systemEventSender with the SystemEvent produced by the SystemEventFactory
  2. DatabaseSystemEventNodeImpl "hears" the systemEventSender and runs its buildEventScheduler() method that seeks to creates a ConsumeJob
  3. In ConsumeJob, it goes through all SystemEventConsumer to attempt to find one that can handle the SystemEvent that got passed to it:

RecurringDeploymentEventFactory created a SystemEvent that was EventType.RECURRING_DEPLOYMENT so the SystemEventConsumer will be RecurringDeploymentSystemEventConsumer

  1. Inside the RecurringDeploymentSystemEventConsumer, it will retrieve the "jobId" from the EventDetails set on the SystemEvent and invoke the WorkflowScheduledDeploymentService to find the correct WorkflowScheduledDeployment by jobId. Then the deploy(....) method will get called.
  2. the deploy(...) method gets all the deployment details from the the passed in WorkflowScheduledDeployment and invokes ScheduledDeploymentManager to schedule the next "job" for the WorkflowScheduledDeployment by this block. deploymentManger.scheduleNextJob(workflowDeployment);
  3. The manager sets the "lastDeployDate" then uses its scheduleDeploymentJob(WorkflowScheduledDeployment scheduledDeployment method to create and save a new ScheduledJob

Compatibility

Enterprise Version Broadleaf Version
3.2.0-GA 5.2.0-GA
4.0.0-GA 6.0.0-GA
4.2.0-GA 6.1.0-GA
4.3.0-GA 6.2.0-GA
5.0.0-GA 7.0.0-GA

Module Dependencies

Module Installation

For detailed instructions on how to integrate the Enterprise module into your project, see the Module Installation document.