com.adobe.granite.workflow.WorkflowException: Cannot load workItem: VolatileWorkItem_node6_var_workflow_instances_server0_2024-03-26_ | Community
Skip to main content
Adobe Employee
March 28, 2024
Solved

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

  • March 28, 2024
  • 2 replies
  • 686 views

I am getting volatile exception in workflow.

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

Please provide your thoughts here.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Raja_Reddy

Hi @sateeshre2 

 

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 }



2 replies

Raja_Reddy
Community Advisor
Raja_ReddyCommunity AdvisorAccepted solution
Community Advisor
March 28, 2024

Hi @sateeshre2 

 

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 }



kautuk_sahni
Community Manager
Community Manager
May 20, 2024

@sateeshre2 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