Class SetupService
During startup, the service loads a default model defined by the optional environment variable 'MODEL_DEFAULT_DATA'. This variable can point to multiple model resources separated by a ';'. A model resource file must have the file extension '.bpmn'.
The variable can be defined also in the imixs.properties file. In this case the variable is named: 'model.default.data'.
Optional it is also possible to provide setup workflow initial data in a XML file.
Finally the service starts optional registered scheduler services.
With the method 'getModelCount' the service returns the current status of the workflow engine by returning the count of valid workflow models.
The SetupSerivce has a migration method to migrate old Workflow Schedulers into the new Scheduler concept. The method migrateWorkflowScheduler is nust for migration and can be deprecated in future releases.
- Version:
- 1.0
- Author:
- rsoika
-
Field Summary
Modifier and TypeFieldDescriptionstatic String
static String
protected jakarta.enterprise.event.Event<SetupEvent>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Check database accessboolean
Check database indexint
Returns the count of available model versionsvoid
importXmlEntityData
(byte[] filestream) this method imports an xml entity data stream.void
This method migrates the deprecated WorkflowScheduelr configuration into the new Imixs Scheduler APIvoid
This method loads the default model if no models exist in the current instancevoid
startup()
This method start the system setup during deployment
-
Field Details
-
SETUP_OK
-
MODEL_INITIALIZED
-
setupEvents
-
-
Constructor Details
-
SetupService
public SetupService()
-
-
Method Details
-
startup
@PostConstruct public void startup()This method start the system setup during deployment- Throws:
AccessDeniedException
-
getModelVersionCount
public int getModelVersionCount()Returns the count of available model versions- Returns:
-
checkDatabase
public boolean checkDatabase()Check database access- Returns:
- true if database access was successful
-
checkIndex
public boolean checkIndex()Check database index- Returns:
- true if database index access was successful
-
scanDefaultModels
public void scanDefaultModels()This method loads the default model if no models exist in the current instance -
importXmlEntityData
public void importXmlEntityData(byte[] filestream) this method imports an xml entity data stream. This is used to provide model uploads during the system setup. The method can also import general entity data like configuration data.- Parameters:
event
-- Throws:
Exception
-
migrateWorkflowScheduler
public void migrateWorkflowScheduler()This method migrates the deprecated WorkflowScheduelr configuration into the new Imixs Scheduler API
-