Created
January 18, 2011 16:22
-
-
Save estebanroblesluna/784681 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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