Asynchronous subflow doesn't work

Confluence User - 03 Jun, 2019

My problem is exactly the same as Async run of tool plugins (without answer since 2013)

I need to run asynchronoueously a plugin without waiting the end of the plugin.

I made an asynchronous subflow between 2 activities.

When I complete the first activity, I was expecting to have immediatly the second activity and the subflow running in parallele.

Instead of this, I have to wait for the subflow to finish as if it was a synchronous subflow

async;asynchronous;subflow;subprocess

5


03 Jun, 2019
confluenceUser
confluenceUser

Do you write the plugins yourself? Can you share the code?

03 Jun, 2019
confluenceUser
confluenceUser

Hi, It is a custom plugin (extends DefaultApplicationPlugin). The issue is not about the plugin contents but how to launch it in async mode

03 Jun, 2019
confluenceUser
confluenceUser

Ok, basically there are simple and advance approaches. The simple one is create a flow with only 1 tool, and then trigger the flow using Beanshell Plugin (or any other plugin as long as it can trigger to run a flow). The more comprehensive (and advance) approach is create a plugin to run another plugin, you can use PluginManager.getPlugin method to dynamically get plugin object and perhaps you can run the plugin using Java multithreading. I haven't checked the later approach, but seems workable (and surely later I will work on the Async Process Plugin since it is cool and reuseable)

04 Jun, 2019
confluenceUser
confluenceUser

If you have a custom plugin, you can execute the code in a background thread https://docs.oracle.com/javase/tutorial/essential/concurrency/runthread.html

04 Jun, 2019
confluenceUser
confluenceUser

Hi, I created a plugins. It might not be fully tested but I hope it helps. It can run any Tool Plugins asynchronously so you don't need to modify anything. https://github.com/kinnara-digital-studio/jw-plugins-async-run-tool

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print