Class AdminPService

java.lang.Object
org.imixs.workflow.engine.adminp.AdminPService

@DeclareRoles("org.imixs.ACCESSLEVEL.MANAGERACCESS") @RunAs("org.imixs.ACCESSLEVEL.MANAGERACCESS") public class AdminPService extends Object
The AmdinPService provides a mechanism to start long running jobs. Those jobs can be used to update workitems in a scheduled batch process. This is called a AdminP-Process. The result of a adminp process is documented into an log entity from type='adminp'. The job description is stored in the field '$WorkflowSummary'. The current startpos and maxcount are stored in the configuration entity in the properties 'numStart' 'numMaxCount' The service provides methods to create and start different types of jobs. The job type is stored in the field 'job': RenameUserJob: This job is to replace entries in the fields $WriteAccess, $ReadAccess and owner. An update request is stored in a adminp entity containing alll necessary informations. The service starts a timer instances for each update process LuceneRebuildIndexJob: This job is to update the lucene index.
Author:
rsoika
See Also:
  • AdminPController
  • Field Details

  • Constructor Details

    • AdminPService

      public AdminPService()
  • Method Details

    • createJob

      public ItemCollection createJob(ItemCollection adminp) throws AccessDeniedException
      This Method starts a new TimerService for a given job. The method loads configuration from a ItemCollection (timerdescription) with the following informations: datstart - Date Object datstop - Date Object numInterval - Integer Object (interval in seconds) id - String - unique identifier for the schedule Service. The param 'id' should contain a unique identifier (e.g. the EJB Name) as only one scheduled Workflow should run inside a WorkflowInstance. If a timer with the id is already running the method stops this timer object first and reschedules the timer. The method throws an exception if the timerdescription contains invalid attributes or values.
      Throws:
      AccessDeniedException
    • deleteJob

      public void deleteJob(String id) throws AccessDeniedException
      Stops a running job and deletes the job configuration.
      Parameters:
      id -
      Throws:
      AccessDeniedException
    • restartJobByID

      public void restartJobByID(String id)
      Method to restart an existing job. The method first tries to cancel a running timer and than creates a new one
      Parameters:
      id -
    • scheduleTimer

      public void scheduleTimer(jakarta.ejb.Timer timer)
      This method processes the timeout event. The method loads the corresponding job description (adminp entity) and delegates the processing to the corresponding JobHandler.
      Parameters:
      timer -