Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Support ACS Commons "Managed Controlled Processes" #44

Open
ghenzler opened this issue Dec 12, 2019 · 1 comment
Open

Support ACS Commons "Managed Controlled Processes" #44

ghenzler opened this issue Dec 12, 2019 · 1 comment

Comments

@ghenzler
Copy link
Member

ghenzler commented Dec 12, 2019

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

@kwin
Copy link
Member

kwin commented Jun 24, 2020

We should also provide an example on how to use that together with Sling Pipes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants