Hi, I have a simple process which involves completion of a user task. What I want to add is an asynchronous service task on completion of the user task, but one that would not hold the process from completing. In other words, once the user task is complete, I want the service task to be triggered asynchronously, retried on failures etc., but without affecting the progress of the process this service task implicitly corresponds to.
In a way, while completion of the user task above is set to trigger the service task execution, the service task itself is external to the process. So standalone tasks seem to fit the bill, but it looks there can only be standalone user tasks, not service ones.
Are there any alternatives to achieve what I want here?
It wouldn't, would it? A process cannot be completed until all of its tasks are completed, asyc or not, I would imagine? Sure, having a separate asynchronous task after the user task is complete, as opposed to say an end event listener on the process, disconnects the service task work the user work, but the process completion would still depend on the service task work completing normally.
Didn't mean to hit "No" on the Helpful, sorry, that was a misclick.
Anyway, it looks like a subprocess won't be enough in my case because the parent process (in this case, my process with the user task) won't terminate until the subprocess/call activity with the service task does, which isn't quite what I want.
Ah yes, if you want the process to fully complete then it wouldn't help. One other thing I'm trying in a protoype I'm working on for V5.22 is to use the Activiti Java API from within an Execution or Event listener to start another process which then runs totally independently. In my case monitoring processes that are started when particular events occur. Not sure if that sort of approach could work for you.
I should mention though I have been told that using the API directly in this way isn't recommended in certain circumstances, and I have had to use a seperate thread sometimes to avoid issues.