For any discussion or question related to the Joget Workflow JSON & JavaScript APIs. The Developer Reference can be downloaded from http://sourceforge.net/projects/jogetworkflow/files or accessed at Joget Workflow Developer Reference

13 Comments

  1. Hi All,

    not sure if I'm doing this right.

    I have a custom plugin based on the json plugin. It seems I get a null form after calling

    loadDynamicFormByProcessId. this plugin executes at the beginning of the workflow similar

    to the referenceid plugin.

    Thanx

    Fred

    1. Hi Fred,

      If you're calling loadDynamicFormByProcessId at the beginning of the process, you'll get null because there is no form data. The form data is only created upon the first form submission. Instead of trying to load the form data, you can insert the form data row. You can refer to the code in the reference ID plugin which actually does that.

      Hope this helps!

      1. Hi Julian,

        yes it does :)

        Thanx for pointing me in the right direction.

  2. By using JSON API to start a Process (as example):

    http://192.168.7.235:8080/wflow-wfweb/web/json/workflow/process/start/testSSO:1:testSSO_wp1

    RESULT: process started without any activityId

    but

    http://192.168.7.235:8080/wflow-wfweb/web/json/workflow/process/start/testSSO:1:testSSO_wp1?apilogin&hash=5196fc950faa9a027a8c11aac24138b2&loginAs=xxx.yyy

    RESULT: process started included username but without any activityId

    Please advise.

    Thanks.

    1. By using URL link to run process, the activityId will be created.

      Is there bug in the JSON API "Start Process"?

      1. Hi Rudy,

        When a JSON API is used without authentication, it is actually run by anonymous user.

        Starting a process using API, and running a process using the Run Process Link, are different. Using JSON API to start a process, a process instance will be created by no activity is accepted yet. By running a process using the Run Process Link, activity acceptance occurs.

        Please refer to Sample Usage of Joget Workflow JSON API for further details.

        1. Hi Tiensoon, 

          I have written a Java code to invoke the JSON API to start a process using the Jersey API in REST way and when i tried starting a process using the below call /web/json/workflow/process/start/processId It is not starting the process and only empty activity/process Id is returned.

          But the same is executing fine (returned a empty activity Id and the process Id corresponding to this invocation), when i invoked the API call using the URL directly in the browser.

          Kindly help/clarify whether I am missing any parameters or provide the right way to invoke the API call from the java code. 

          Thanks,

          Vignesh

          1. Hey there,

            Just a wild guess. Maybe you need to authenticate yourself first before being able to successfully make such a call. See JSON API Authentication for more information.

            Additionally, try to look up in the server log to see if there's any hint on why things are not going well.

            Good luck!

  3. Hi,

    how to call JSON API REEVALUATE? I've tried few times, and the results were always error.

    Thanks.

  4. what is ur code related to joget json api, can share?

    we try to create a full stack MVC implementtion using JSON API.. called YAMA..

    this is the source ->  komodo is our code name for our REST book.

    the code in SVN

    http://komodo.svn.sourceforge.net/viewvc/komodo/komodo2/chp8/yama/

  5. Hi All

    I want to ask about Remove Instance. Is there any json api that call Remove Instance in Running Process?

    Thanks for the answer, :)

    -ferdidolot-

    1. Hi Ferdiansyah,

      Yes. There is one in fact. You can make a JSON call to /json/workflow/process/abort/[processId] to abort a running process instance.

      For example, make a JSON call to /json/workflow/process/abort/5322_simple_package_newpkg1_wp1 and It will return the following object stating the process ID it aborted and the status.

      processId

      "5322_simple_package_newpkg1_wp1"

      status

      "aborted"

      Hope it helps!

      1. I think it is a different case in 'aborting process' and 'removing instance'. When aborting process, the process is become completed and the state is changed into closed.aborted. In process view, there is a button written 'Remove Instance'. When I click the button, the process disappeared. 

        This is what I am looking for. May I have the webservice for request in removing instance? I have debugged from firebug, when I click button 'Remove Instance', the firebug showed me POST :  http://localhost:8080/wflow-wfweb/web/monitoring/running/process/remove?wfProcessId=processId

        When I executed that from curl php, it didn't work.

        Thanks again for your help. :)