Package org.imixs.workflow.engine.adminp
Class JobHandlerUpgradeWorkitems
java.lang.Object
org.imixs.workflow.engine.adminp.JobHandlerUpgradeWorkitems
- All Implemented Interfaces:
JobHandler
@DeclareRoles("org.imixs.ACCESSLEVEL.MANAGERACCESS")
@RunAs("org.imixs.ACCESSLEVEL.MANAGERACCESS")
public class JobHandlerUpgradeWorkitems
extends Object
implements JobHandler
JobHandler to upgrate existing workItems to the latest workflow version.
Missing workflow items will be added.
Version 5.1.10 : new space.|process. Items
- Author:
- rsoika
-
Field Summary
Fields inherited from interface org.imixs.workflow.engine.adminp.JobHandler
ISCOMPLETED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionrun(ItemCollection adminp) This method runs the RebuildLuceneIndexJob.booleanupgradeWorkitem(ItemCollection workitem) This method upgrades missing fields in a workitem
-
Constructor Details
-
JobHandlerUpgradeWorkitems
public JobHandlerUpgradeWorkitems()
-
-
Method Details
-
run
This method runs the RebuildLuceneIndexJob. The AdminP job description contains the start position (numIndex) and the number of documents to read (numBlockSize).The method updates the index for all affected documents which can be filtered by 'type' and '$created'.
An existing lucene index must be deleted manually by the administrator.
After the run method is finished, the properties numIndex, numUpdates and numProcessed are updated.
If the number of documents returned from the DocumentService is less the the BlockSize, the method returns true to indicate that the Timer should be canceled.
The method runs in an isolated new transaction because the method flushes the local persistence manager.
- Specified by:
runin interfaceJobHandler- Parameters:
adminp-- Returns:
- true if no more unprocessed documents exist.
- Throws:
AccessDeniedExceptionPluginExceptionAdminPException
-
upgradeWorkitem
This method upgrades missing fields in a workitem- Parameters:
worktem-- Returns:
-