Interface KogitoWorkItemManager
public interface KogitoWorkItemManager
-
Method Summary
Modifier and TypeMethodDescriptionvoidabortWorkItem(String id, Policy... policies) Notifies the work item manager that the work item with the given id could not be executed and should be aborted.voidNotifies the work item manager that the work item with the given id has been completed.retrieves the handlers names registered in the work item handlerretrieeves the handle registered by the namevoidregisterWorkItemHandler(String workItemName, KogitoWorkItemHandler handler) Register the given handler for all work items of the given type of workvoidtransitionWorkItem(String id, WorkItemTransition transition) Transition work item with given id into the next life cycle phase.<T> TupdateWorkItem(String id, Function<KogitoWorkItem, T> updater, Policy... policies) Updates work item, performing operation indicated by updater
-
Method Details
-
completeWorkItem
Notifies the work item manager that the work item with the given id has been completed. Results related to the execution of this work item can be passed.- Parameters:
id- the id of the work item that has been completedresults- the results related to this work item, ornullif there are no results
-
abortWorkItem
Notifies the work item manager that the work item with the given id could not be executed and should be aborted.- Parameters:
id- the id of the work item that should be aborted
-
updateWorkItem
Updates work item, performing operation indicated by updater- Parameters:
id- the id of the work item that has been completedupdater- consumer implementation that contains the logic to update workitempolicies- optional security information- Returns:
- result of the operation performed by updater consumer
-
registerWorkItemHandler
Register the given handler for all work items of the given type of work- Parameters:
workItemName- the type of work this work item handler can executehandler- the handler for executing work items
-
transitionWorkItem
Transition work item with given id into the next life cycle phase.- Parameters:
id- work item id to be transitionedtransition- actual transition to apply to work item
-
getHandlerIds
Collection<String> getHandlerIds()retrieves the handlers names registered in the work item handler- Returns:
-
getKogitoWorkItemHandler
retrieeves the handle registered by the name- Parameters:
name-- Returns:
-