How to trigger execution of a Java programm automatically within a task in a workflow?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2018 03:44 PM
Hi there,
I would like to automatically trigger the execution of a Java program as soon as a specific task within a workflow is reached / completed. Furthermore, I need to pass the PROC_INST_ID_ of the current process as a parameter into this program. Is there any example available on how to do this or could anyone give me some hints?
Right now, I am working with the community edition.
Best,
Mario
- Labels:
-
Alfresco Process Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2018 09:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2018 09:12 AM
Hi ,
Please refer this documentation https://www.activiti.org/userguide/#bpmnJavaServiceTask
You can get your parameter like this
public class ToUppercase implements JavaDelegate { public void execute(DelegateExecution execution) throws Exception { String var = (String) execution.getVariable("input"); var = var.toUpperCase(); execution.setVariable("input", var); } }
Thanks,
Kalpesh
