Hi,

I have question on integrating Joget with our current application. Do we have a step by step documentation on how we push the from data into joget and how to populate the task details in jsp form?

Please provide me the steps asap. We are currently doing a POC and your help will be greatly appreciated.

  • No labels

8 Comments

  1. Pushing form data into Joget Workflow

    If you are referring to how you can set data from external web form into Joget Workflow, here are my thoughts:

    1. When using external form, you would be saving your business data into the preferred external database. This makes sense, as you could have full control with the table entity relationship.
    2. In this case, you might not need to get all data captured from the external form into Joget Workflow. However, you might want to keep Joget Workflow informed with some data relation to the value of workflow variable, so that routes could work.
    3. To set workflow variable value for a workflow activity, you can use the web/json/workflow/assignment/variable/(:activityId)/(:variable) JSON API
    4. You can also use JavaScript API to complete an activity and at the same time set some workflow variable values: AssignmentManager.completeAssignmentWithVariable(baseUrl, activityId, variableData, redirect)

    Display External Data in Joget Form

    To display data from external source, in forms designed with Joget Workflow, these are some possibilities:

    1. Use BeanShell Plugin to query from database using Java codes
    2. Use JSON Plugin to call a JSON API, and set its returning value to a workflow variable
    3. Write an AJAX call in Form Builder using Custom HTML, to get data from external source

    Display Task Details in JSP

    If you are referring to task details as in the monitoring details, you can use the web/json/monitoring/activity/view/(*:activityId) JSON API.

    But if you are looking for form data, you can consider to query the form data table (those table prefixed with formdata_ in Joget Workflow database)

    1. Hello Tiensoon,hope you are doing well,

      Display External Data in Joget Form

      To display data from external source, in forms designed with Joget Workflow, these are some possibilities:

      1. Use BeanShell Plugin to query from database using Java codes
      2. Use JSON Plugin to call a JSON API, and set its returning value to a workflow variable
      3. Write an AJAX call in Form Builder using Custom HTML, to get data from external source.

      refer to the above discussion can you pleae give a simple example of what code should i place in the script box when i define the workflow variable,please give some general code example,that should query a database ,select some values and then display them in the drop down box that we have included in our form.

      i have tried it with the following code,please see it and tell what i am missing ?thank you..

      import java.sql.*;
      import org.joget.workflow.model.service.*;
      
      WorkflowManager wm = (WorkflowManager) pluginManager.getBean("workflowManager");
      
      wm.activityVariable(workflowAssignment.getActivityId(), "variableId", "variableValue");
      
      Connection con = null;
      
      try {
      
          Class.forName("com.mysql.jdbc.Driver").newInstance();
      
          con = DriverManager.getConnection("jdbc:mysql://localhost:3307/sampledb?characterEncoding=UTF-8", "root", "root");
      
          if(!con.isClosed()) {
              PreparedStatement stmt = con.createStatement();
              stmt.executeQuery("select id,username from dir_user");
          }
      } catch(Exception e) {
          System.err.println("Exception}
      finally {
          try {
              if(con != null)
                  con.close();
          }
          catch(SQLException e) {}
      }
      1. Hi Salman,

        Please have a look at the below posts, you will get an idea on how to achieve this. Let us know how it goes.

        http://dev.joget.org/community/display/FORUM/Several+questions

        http://dev.joget.org/community/display/KB/BeanShell+Plugin

        http://dev.joget.org/community/display/KB/Form+Variables

        Thanks,

        Arun

  2. @Arun.....could you give me step-by-step simple web application developed using Joget+Java(struts2)  ???

    plz its urgent

  3. is there any way to integrate web application form in joget(ex: drupal form into joget)

    1. Hi there,

      Please see Sample External Form Integration and the sibling pages.

      Hope this helps.

      1. Hi

        The above url does not work! Please provide the working url for us to refer.

  4. thanks Hugo

    is there any way to pass dynamic link in map to external form in activity mapping.