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?
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.
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).
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.