Please check above xml file.
Finally i executed with static query with given below expression by you
${execution.getEngineServices().getRuntimeService().createNativeExecutionQuery().sql('UPDATE act_custom_process SET status=#{status} WHERE id=#{id}').parameter('status', 'true').parameter('id', '44').singleResult()}
Now, how can i pass dynamic fields instead of static values like 'true' and 44?
You can use variables to pass dynamic fields as the following expression.
${execution.getEngineServices().getRuntimeService().createNativeExecutionQuery().sql('UPDATE act_custom_process SET status=#{status} WHERE id=#{id}').parameter('status', execution.getVariable('flag')).parameter('id', execution.getVariable('id')).singleResult()}
By the way, what was the cause for not working first?
Thank you for your reply once again. almost i reached my requirement. please help me in this too.
Here we have assignee option with variable like ${reporting_manager}. I was set the value through my java code, instead of that how can i set that through sql without java?
You can set variable by the el expression as the following expression.
${execution.setVariable('reporting_manager', %Value%)}
Hi,
if i execute the query in java class mean listener. how can i get those data?
It is not possible to select from any table.
If it is an Activiti table, you can do it.
k now how can i get the application table data? is there any other way?
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
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.