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?
HI,
Refer these documents it may help you to achieve your use-case:
Regards
Amruta Wandakar
Would simply marking the service task asynchronous achieve what you are after ?
As described 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.
Can you share the approach? I am looking for similar solution.
I am working on solution for
1) calling a new Child Process fromn within a Service task of Parent Process.
2) submiting the task form of Child process from a Service task of Parent Process.
Problem i am facing is Child process is not getting commited in database until some user task is present.
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.