Alfresco DB Update Query in Running Production

Showing results for 
Search instead for 
Did you mean: 
Senior Member II

Alfresco DB Update Query in Running Production

HI ,

I want to update the act_ru_variable table while Alfresco is up and running. I want to update the value of an execution variable. The reason for doing this is , we want to cancel the workflow on the document. The usual "cancel workflow "and "end workflow" command will not work because we have a custom class defined in between and the variable value is coming as "null".Hence it throws an exception

The query is as follows :

Update public.act_ru_variable
set text_='{"workspace://<some value>":"Sample"}' where proc_inst_id_ ='13859' and name_='status';

I have tested this in various up and running environments and the query works fine and I see no issue. I am raising this question to understand the risks associated with this approach before executing this query on up and running production environment.  So the precise questions are :

Q1. What are the risks associated with this approach?
Q2. What all preventive measures I should take before executing this?
Note : Kindly assume that taking an outage in the production is not an option.
Q3. Is there some alternative better approach to achieve this?

2 Replies
Active Member II

Re: Alfresco DB Update Query in Running Production

Even though it seems like you've done your homework related to what you are trying to achieve, updating Alfresco DB while the system is running is usually a recipe for trouble.

I would recommend you to go through the options provided via the workflow admin-console and see if you can use that to solve your issue : The Workflow Console | Alfresco Documentation it would be far less risky and far more reliable.

Section 7.f seems particularly interesting for your case.

Senior Member II

Re: Alfresco DB Update Query in Running Production

Thank you for help.

Unfortunately, with the update task <variable details to update> command , I can only update the task variable which are defined inside the workflow task model.

Variable which we want to update is inside the execution temporary variable, which I think can not be updated from workflow console(Not 100% sure).