In OSWorkflow, executing an action is very simple:

Workflow wf = new BasicWorkflow(username);
HashMap inputs = new HashMap();
inputs.put("docTitle", request.getParameter("title"));
long id = Long.parseLong(request.getParameter("workflowId"));
wf.doAction(id, 1, inputs);