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 ObjectThe 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
Fields Modifier and Type Field Description static intDEFAULT_INTERVALstatic StringJOB_MIGRATIONstatic StringJOB_REBUILD_INDEXstatic StringJOB_RENAME_USERstatic StringJOB_UPGRADE
-
Constructor Summary
Constructors Constructor Description AdminPService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ItemCollectioncreateJob(ItemCollection adminp)This Method starts a new TimerService for a given job.voiddeleteJob(String id)Stops a running job and deletes the job configuration.voidscheduleTimer(jakarta.ejb.Timer timer)This method processes the timeout event.
-
-
-
Field Detail
-
JOB_RENAME_USER
public static final String JOB_RENAME_USER
- See Also:
- Constant Field Values
-
JOB_REBUILD_INDEX
public static final String JOB_REBUILD_INDEX
- See Also:
- Constant Field Values
-
JOB_UPGRADE
public static final String JOB_UPGRADE
- See Also:
- Constant Field Values
-
JOB_MIGRATION
public static final String JOB_MIGRATION
- See Also:
- Constant Field Values
-
DEFAULT_INTERVAL
public static final int DEFAULT_INTERVAL
- See Also:
- Constant Field Values
-
-
Method Detail
-
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
-
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-
-
-