All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.dynamicextensionsalfresco.workflow.activiti.DelegateTask Maven / Gradle / Ivy

Go to download

Adds an OSGi container to alfresco repository supporting dynamic code reloading, classpath isolation and a bunch of other useful features

There is a newer version: 3.1.0
Show newest version
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