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 Constructor Description JobHandlerUpgradeWorkitems()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ItemCollection
run(ItemCollection adminp)
This method runs the RebuildLuceneIndexJob.boolean
upgradeWorkitem(ItemCollection workitem)
This method upgrades missing fields in a workitem
-
-
-
Method Detail
-
run
public ItemCollection run(ItemCollection adminp) throws AdminPException
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:
run
in interfaceJobHandler
- Parameters:
adminp
-- Returns:
- true if no more unprocessed documents exist.
- Throws:
AccessDeniedException
PluginException
AdminPException
-
upgradeWorkitem
public boolean upgradeWorkitem(ItemCollection workitem)
This method upgrades missing fields in a workitem- Parameters:
worktem
-- Returns:
-
-