Skip to content

Instantly share code, notes, and snippets.

@estebanroblesluna
Created January 18, 2011 16:22
Show Gist options
  • Save estebanroblesluna/784681 to your computer and use it in GitHub Desktop.
Save estebanroblesluna/784681 to your computer and use it in GitHub Desktop.
public class NeedsApprovalDelegate implements org.activiti.engine.delegate.JavaDelegate
{
private static Set<String> imagesWithCopyright = new HashSet<String>();
static {
imagesWithCopyright.add("mule1.jpg");
imagesWithCopyright.add("mule2.jpg");
}
public void execute(DelegateExecution execution) throws Exception
{
String imageName = (String) execution.getVariable("imageName");
boolean needsApproval = imagesWithCopyright.contains(imageName);
execution.setVariable("needsApproval", needsApproval);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment