1
0
-1

Hi, I am calling joget JSON API from external website. After I click the button in my external page, I got this result {"activityId":"","processId":"1003_BPM_onlineinspection"} . I want to ask, why the activityId is empty? and how do I display the run process form after the API is triggered?

here is my javascript:

<script type="text/javascript">
			function UserAction(){
				var data = null;
				var xhr = new XMLHttpRequest();
				xhr.withCredentials = true;
				xhr.addEventListener("readystatechange", function () {
				  if (this.readyState == 4 && this.status == 200) {
				    document.getElementById("demo").innerHTML =
				    this.responseText;
				  }
				});
				xhr.open("POST", "http://localhost:8080/jw/web/json/workflow/process/start/BPM:8:onlineinspection?j_username=admin&j_password=admin");
				xhr.setRequestHeader("content-type", "application/javascript");
				xhr.setRequestHeader("cache-control", "no-cache");
				xhr.setRequestHeader("postman-token", "36eee796-48be-b719-bcbf-dbd467a1af42");
				xhr.send(data);
			}
</script>

 

 

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi, I think the activity ID could be empty because the next task activity is assigned to another user. You can double check your participant mappings, and also check the running process instance to see which user the activity is assigned to.

        CommentAdd your comment...