Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

com.adobe.granite.workflow.WorkflowException: Cannot load workItem: VolatileWorkItem_node6_var_workflow_instances_server0_2024-03-26_



I am getting volatile exception in workflow.

WorkItem currentWorkItem = workflowSession.getWorkItem(workItem.getId());

Please provide your thoughts here.

2 Replies


Community Advisor

Hi @SateeshRe 


The VolatileDataException is a checked exception that can be thrown by the getWorkItem method of the  workflowSession interface. This exception indicates that the data associated with the work item has changed since the work item was last accessed, and the current operation cannot be completed.

To handle this exception, you can catch it using a try-catch block and take appropriate action, such as retrying the operation or notifying the user.

try {
    WorkItem currentWorkItem = workflowSession.getWorkItem(workItem.getId());
    // perform operation on currentWorkItem
} catch (VolatileDataException e) {
    // handle the exception
    // e.g. retry the operation or notify the user



@SateeshRe Did you find the suggestion helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni