Class SetupService

java.lang.Object
org.imixs.workflow.engine.SetupService

@DeclareRoles("org.imixs.ACCESSLEVEL.MANAGERACCESS") @RunAs("org.imixs.ACCESSLEVEL.MANAGERACCESS") public class SetupService extends Object
The SetupService EJB initializes the Imxis-Workflow engine and returns the current status.

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 Details

    • SETUP_OK

      public static String SETUP_OK
    • MODEL_INITIALIZED

      public static String MODEL_INITIALIZED
    • setupEvents

      @Inject protected jakarta.enterprise.event.Event<SetupEvent> 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:
    • getModelGroupCount

      public int getModelGroupCount()
      Returns the count of available unique model groups
      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