out = pageContext.getOut();
_jspx_out = out;
out.write("\r\n");
Workflow wf = new BasicWorkflow((String) session.getAttribute("username"));
long id = Long.parseLong(request.getParameter("id"));
String doString = request.getParameter("do");
if (doString != null && !doString.equals("")) {
int action = Integer.parseInt(doString);
wf.doAction(id, action, Collections.EMPTY_MAP);
}
int[] actions = wf.getAvailableActions(id);
for (int i = 0; i < actions.length; i++) {
String name = wf.getActionName("example", actions[i]);
out.write("\r\n ");
out.write("<li> ");
out.write("<a href=\"test.jsp?id=");
out.print(id);
out.write("&do=");
out.print( actions[i] );
out.write("\">");
out.print( name );
out.write("</a>\r\n ");
}
out.write("\r\n\r\n");
out.write("<hr>\r\n");
out.write("<b>Permissions");
out.write("</b>\r\n");
out.write("<p>\r\n\r\n");
List perms = wf.getSecurityPermissions(id);
for (Iterator iterator = perms.iterator(); iterator.hasNext();) {
String perm = (String) iterator.next();
out.write("\r\n ");
out.write("<li>");
out.print( perm );