Package org.imixs.workflow.engine.adminp
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateJob
(ItemCollection adminp) This Method starts a new TimerService for a given job.void
Stops a running job and deletes the job configuration.void
restartJobByID
(String id) Method to restart an existing job.void
scheduleTimer
(jakarta.ejb.Timer timer) This method processes the timeout event.
-
Field Details
-
JOB_RENAME_USER
- See Also:
-
JOB_REBUILD_INDEX
- See Also:
-
JOB_UPGRADE
- See Also:
-
JOB_MIGRATION
- See Also:
-
DEFAULT_INTERVAL
public static final int DEFAULT_INTERVAL- See Also:
-
-
Constructor Details
-
AdminPService
public AdminPService()
-
-
Method Details
-
createJob
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
Stops a running job and deletes the job configuration.- Parameters:
id
-- Throws:
AccessDeniedException
-
restartJobByID
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
-
-