Package com.opensymphony.workflow.basic

Examples of com.opensymphony.workflow.basic.BasicWorkflow


      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n\r\n");

    Workflow wf = new BasicWorkflow((String) session.getAttribute("username"));
    long id = wf.createEntry("example");
    //out.println(id);
  wf.initialize(id, 1, null);
      out.write("\r\n\r\nNew workflow entry ");
      out.write("<a href=\"test.jsp?id=");
      out.print(id);
      out.write("\">#");
      out.print(id);
View Full Code Here


      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 );
View Full Code Here

  /**
   * Creates a <code>Workflow</code> for the supplied caller. The method acts as a hook
   * for subclasses that want to change the way the workflow is created.
   */
  protected Workflow createWorkflow(String caller) throws WorkflowException {
    return new BasicWorkflow(caller);
  }
View Full Code Here

     *
     * @return the unique workflow id
     */
    private long createWorkflow() throws InvalidRoleException,
            InvalidInputException, WorkflowException {
        this.osWorkflowInstance = new BasicWorkflow(this.caller);
        DefaultConfiguration config = new DefaultConfiguration();
        this.osWorkflowInstance.setConfiguration(config);
        long wfId = this.osWorkflowInstance.initialize(
                this.osWorkflowName, this.action, this.map);
        return wfId;
View Full Code Here

   
    AccessConstraintExceptionBuffer ceb = new AccessConstraintExceptionBuffer();
   
    try
    {
      Workflow workflowInit = new BasicWorkflow(infoGluePrincipal.getName());
     
      long id = workflowInit.initialize("MattiasWF", 1, new HashMap());
      logger.info("Workflow initialized....");
      logger.info("id:" + id);
      logger.info("name:" + workflowInit.getWorkflowName(id));
     
     
      Workflow workflow = workflowInit; //new BasicWorkflow(infoGluePrincipal.getName());
     
      int[] actions = workflow.getAvailableActions(id, null);
View Full Code Here

TOP

Related Classes of com.opensymphony.workflow.basic.BasicWorkflow

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.