return (MailNode) getNode();
}
public void execute(NodeInstance from, String type) {
MailNode mailNode = getMailNode();
WorkItemManager workItemManager = getProcessInstance().getWorkingMemory().getWorkItemManager();
WorkItemImpl workItem = new WorkItemImpl();
workItem.setName("JpdlEmail");
workItem.setProcessInstanceId(getProcessInstance().getId());
workItem.setParameter("template", mailNode.getTemplate());
workItem.setParameter("actors", mailNode.getActors());
workItem.setParameter("to", mailNode.getTo());
workItem.setParameter("subject", mailNode.getSubject());
workItem.setParameter("text", mailNode.getText());
workItemManager.internalExecuteWorkItem(workItem);
leave();
}