com.github.dynamicextensionsalfresco.workflow.activiti.DelegateTask Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of annotations-runtime Show documentation
Show all versions of annotations-runtime Show documentation
Adds an OSGi container to alfresco repository supporting dynamic code reloading, classpath isolation and a bunch of other useful features
package com.github.dynamicextensionsalfresco.workflow.activiti;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;
import org.springframework.util.Assert;
/**
* Activiti workflow task delegate, that can be configured using a componentId.
* The componentId will identify the {@link JavaDelegate} component.
*
* @author Laurent Van der Linden
*/
public class DelegateTask extends AbstractDelegate implements JavaDelegate {
@Override
public void execute(DelegateExecution execution) throws Exception {
final String componentId = getComponentId(execution);
final JavaDelegate delegate = getWorkflowTaskRegistry().findDelegate(componentId);
Assert.notNull(delegate, String.format("No JavaDelegate found for componentId %s.", componentId));
delegate.execute(execution);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy