08-16-2012 05:18 AM
public class AddCommentTransitionListener implements ExecutionListener, Serializable {
private static final Logger log = Logger.getLogger(AddCommentTransitionListener.class);
private static final long serialVersionUID = 1L;
private Expression manualCommentExpression;
private Expression manualCommentTypeExpression;
private String manualComment = null;
private CommentType manualCommentType;
public void notify(DelegateExecution execution) throws Exception {
processConfiguration(execution);
// Add the comment details to the database
}
private void processConfiguration(DelegateExecution execution) {
if (execution != null) {
extractManualCommentConfiguration(execution);
}
}
private void extractManualCommentConfiguration(DelegateExecution execution) {
if (manualCommentExpression != null) {
manualComment = (String) manualCommentExpression.getValue(execution);
if (manualCommentTypeExpression != null) {
// TODO throw exception if we cannot determine the comment type or if the comment type is not
// present
manualCommentType = CommentType.lookup(Integer.parseInt((String) manualCommentTypeExpression
.getValue(execution)));
} else {
// TODO throw exception
}
}
}
}
08-16-2012 06:22 AM
manualCommentExpression.getValue(execution)However, what I should have called was manualCommentExpression.getExpressionText() to get the text that has been configured.listener.manualCommentExpression = new FixedValue("This is my comment");Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.