12-13-2013 09:25 AM
12-16-2013 02:19 AM
try {
Authentication.setAuthenticatedUserId("kermit");
// Your code here
} finally {
Authentication.setAuthenticatedUserId(null);
}
12-16-2013 05:45 AM
12-16-2013 07:41 PM
12-17-2013 03:46 AM
public void createAttachmentComment(String taskId, String processInstanceId, String attachmentName, boolean create) {
if (isHistoryEnabled()) {
String userId = Authentication.getAuthenticatedUserId();
CommentEntity comment = new CommentEntity();
comment.setUserId(userId);
comment.setType(CommentEntity.TYPE_EVENT);
comment.setTime(ClockUtil.getCurrentTime());
comment.setTaskId(taskId);
comment.setProcessInstanceId(processInstanceId);
if(create) {
comment.setAction(Event.ACTION_ADD_ATTACHMENT);
} else {
comment.setAction(Event.ACTION_DELETE_ATTACHMENT);
}
comment.setMessage(attachmentName);
getSession(CommentEntityManager.class).insert(comment);
}
}
12-17-2013 05:21 AM
12-17-2013 10:11 AM
12-18-2013 03:31 AM
12-18-2013 06:26 AM
12-18-2013 03:37 PM
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.