The below script works as of 4.5.5, and note that you need to specify com.trackstudio.secured before the SecuredMessageTriggerBean. You would create this script and put it in a trigger on the DEFAULT message in your workflow.
This is set in Workflow, Message Types, choose Default Message Type, Trigger, BEFORE trigger. You have to make separate scripts for each workflow (but I figure there must be a nicer way to make one script for ALL workflows that you can then put some logic in, but, I do not know how to do this....).
Below, note:
Searched Secret Code: =INTERNAL=
Workflow: Ticket
Message Type to Add: 000 Memo INTERNAL
- Code: Select all
String desc = message.getDescription();
if (desc != null && desc.indexOf("=INTERNAL=") != -1) {
String mtId = CSVImport.findMessageTypeIdByName("000 Memo INTERNAL", "Ticket");
return new com.trackstudio.secured.SecuredMessageTriggerBean(message.getId(), desc, message.getTime(), message.getHrs(), message.getDeadline(), message.getBudget(), message.getTaskId(), message.getSubmitterId(), message.getResolutionId(), message.getPriorityId(), null, message.getHandlerUserId(), message.getHandlerGroupId(), mtId, message.getUdfValues(), message.getSecure());
}
return message;
FYI, hope this helps someone.