Open ghenzler opened 4 years ago
See https://adobe-consulting-services.github.io/acs-aem-commons/features/mcp/index.html
The API ControlledProcessManager can be used as follows to control it (groovy console example):
import com.adobe.acs.commons.mcp.ControlledProcessManager ControlledProcessManager cpm = getService(ControlledProcessManager.class) def processDef = cpm.findDefinitionByNameOrPath("Asset Report") println ("count active="+cpm.getActiveProcesses().size()) def assetsReportInstance = cpm.createManagedProcessInstance(processDef, "Asset Report by groovy") assetsReportInstance.init(resourceResolver, [baseFolder: '/content/dam', folderLevels: 5, includeSubassets: true, includeVersions: true]) assetsReportInstance.run(resourceResolver) println ("Started assetsReportInstance="+assetsReportInstance) println ("count active="+cpm.getActiveProcesses().size()) println ("sleeping 3sec") Thread.sleep(3000) println ("count active="+cpm.getActiveProcesses().size())
It would be nice to be able to trigger a groovy script (and not a java class) that implements the mcp ProcessDefinition
We should also provide an example on how to use that together with Sling Pipes.
See https://adobe-consulting-services.github.io/acs-aem-commons/features/mcp/index.html
The API ControlledProcessManager can be used as follows to control it (groovy console example):
It would be nice to be able to trigger a groovy script (and not a java class) that implements the mcp ProcessDefinition