Activiti with sql not executed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2017 11:58 PM
Dear Team,
I am using activiti in my spring web application and would like to execute sql statement when the task complete. but it isn't work. please check and tell me the right way.
Thanks
- Labels:
-
Alfresco Process Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2017 02:03 AM
Please check above xml file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2017 05:38 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2017 06:45 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2017 07:39 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2017 07:54 AM
You can set variable by the el expression as the following expression.
${execution.setVariable('reporting_manager', %Value%)}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-28-2017 01:42 AM
Hi,
if i execute the query in java class mean listener. how can i get those data?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-28-2017 03:57 AM
It is not possible to select from any table.
If it is an Activiti table, you can do it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-28-2017 04:23 AM
k now how can i get the application table data? is there any other way?
