AEM 6.4: From Action Manager(acs_commons) tasks, how to obtain active workflow details

dibyajyotis2501

04-11-2019

Hi all,

I'm working on optimizing batch processing on Dynamic media (s7) asset sync process. So basically, what I'm doing is ,creating a batch of specific size e.g. 100/150 etc.

So these many assets will be triggered via Scene7 workflow model from one acs-commons custom tool. Within one batch, simultaneously workflows will keep on running multithreaded.

Now as per the requirement, if any workflow is still running/active in the previous batch after 10-15 sec, then that workflow should be terminated and flow will proceed for the next subsequent batches. But I'm not able to find any suitable method to extract worklow details from ActionManager (as using acs-commons), which is actually built upon Throttled Task runner.

Hence, it'll be great to know if there remains a way to -

1. Get workflow id / task path or atleast some sort of data which I can use to extract the running workflow from previous Action batch

2. Get "Running" workflow details from source asset path.(jcr path of asset folder), so that after detecting out, it can be terminated.

3. Is it a good practice to use PayloadMap to get active instances?

Thanks,

DJ