Broadleaf Commerce Enterprise Module
Workflow
- AdminScheduledDeploymentController.saveScheduledDeployment(....) is called where a
WorkflowScheduledDeploymentis made. (a.k.a.deployment) - then the
ScheduledDeploymentManager.scheduleDeploymentJob(WorkflowScheduledDeployment scheduledDeployment)is called to create aScheduledJoband tie it to thedeployment. - the
ScheduledJob(a.k.a.job) is created bybuildScheduledJob(WorkflowScheduledDeployment schedule). In this method thedeploymentis given aactiveDateandnextDeployTime -
jobis then saved to thedatabaseSystemEventDaoand thejobIdfor thedeploymentis set. - When
jobis scheduled to run; theScheduledJobManagerImplwill run itsmanageJobs(....)method where it creates aIntervalJobto trigger. - In that
IntervalJob, it runs its "excecute(...)" method that searches for allSystemEventFactory
RecurringDeploymentEventFactoryis found since it is anSystemEventFactoryand creates aSystemEventofEventType.RECURRING_DEPLOYMENT
- Lastly the
IntervalJobthen invokes thesystemEventSenderwith theSystemEventproduced by theSystemEventFactory -
DatabaseSystemEventNodeImpl"hears" thesystemEventSenderand runs itsbuildEventScheduler()method that seeks to creates aConsumeJob - In
ConsumeJob, it goes through allSystemEventConsumerto attempt to find one that can handle theSystemEventthat got passed to it:
RecurringDeploymentEventFactorycreated aSystemEventthat wasEventType.RECURRING_DEPLOYMENTso theSystemEventConsumerwill beRecurringDeploymentSystemEventConsumer
- Inside the
RecurringDeploymentSystemEventConsumer, it will retrieve the "jobId" from theEventDetailsset on theSystemEventand invoke theWorkflowScheduledDeploymentServiceto find the correctWorkflowScheduledDeploymentby jobId. Then thedeploy(....)method will get called. - the
deploy(...)method gets all the deployment details from the the passed inWorkflowScheduledDeploymentand invokesScheduledDeploymentManagerto schedule the next "job" for theWorkflowScheduledDeploymentby this block.deploymentManger.scheduleNextJob(workflowDeployment); - The manager sets the "lastDeployDate" then uses its
scheduleDeploymentJob(WorkflowScheduledDeployment scheduledDeploymentmethod to create and save a newScheduledJob
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.