Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Table of Contents |
---|
Description
Completes an assignment with a specific process instance id & activity instance id
Parameters
Sample code
Code Block | ||
---|---|---|
| ||
AssignmentManager.completeAssignment('http://localhost/jw', '1_1_activity', 'http://localhost/completed.jsp'); |
Description
Completes an assignment with a specific process instance id & activity instance id with option to set workflow variables
Parameters
Sample code
Code Block | ||
---|---|---|
| ||
AssignmentManager.completeAssignmentWithVariable('http://localhost/jw', '1_1_activity', 'var_status=new&var_id=123', 'http://localhost/completed.jsp'); |
Description
Gets the current logged in username in Joget Workflow
Parameters
Sample code
Code Block | ||
---|---|---|
| ||
var callback = { success : function(response){ //response.username if(response.username != "roleAnonymous"){ console.log("Username is " + response.username); }else{ console.log("User is anonymous"); } } }; AssignmentManager.getCurrentUsername('http://localhost/jw', callback); |
Description
Gets the current logged in username in Joget Workflow
Parameters
Sample code
Code Block | ||
---|---|---|
| ||
var callback = { success : function(response){ //response.username && response.isAdmin if(response.username != "roleAnonymous"){ console.log("username (" + response.username + ") is " + ((response.isAdmin !== undefined && response.isAdmin === "true")?"admin":"not an admin")); }else{ console.log("Fail to login user!"); } } }; AssignmentManager.login('http://localhost/jw', 'admin', 'admin', callback); |
Description
Gets the current logged in username in Joget Workflow
Parameters
Sample code
Code Block | ||
---|---|---|
| ||
var callback = { success : function(response){ //response.username && response.isAdmin if(response.username != "roleAnonymous"){ console.log("username (" + response.username + ") is " + ((response.isAdmin !== undefined && response.isAdmin === "true")?"admin":"not an admin")); }else{ console.log("Fail to login user!"); } } }; AssignmentManager.loginWithHash('http://localhost/jw', 'admin', '14ACD782DCFEB2BCDE2B271CCD559477', callback); |
Description
Gets the current logged in username in Joget Workflow
Parameters
Sample code
Code Block | ||
---|---|---|
| ||
AssignmentManager.logout('http://localhost/jw'); |
Description
Withdraws an assignment with a specific activity instance id
Note |
---|
Deprecated since v3, the concept of accept & withdraw assignment is removed. |
Parameters
Sample code
Code Block | ||
---|---|---|
| ||
AssignmentManager.withdrawAssignment('http://localhost/jw', '1_1_activity'); |
Description
Initiates Ajax call with JSONP
Parameters
Sample code
Code Block | ||
---|---|---|
| ||
var callback = {
success : function(response){
//do something
}
};
ConnectionManager.ajaxJsonp('http://localhost/test', callback, 'id=4&name=test'); |
Description
Initiates Ajax GET to a specific URL
Parameters
Sample code
Code Block | ||
---|---|---|
| ||
var callback = {
success : function(response){
//do something
}
};
ConnectionManager.get('http://localhost/test', callback, 'id=6&name=test', false); |
Description
Initiates Ajax POST to a specific URL
Parameters
Sample code
Code Block | ||
---|---|---|
| ||
var callback = { success : function(response){ //do something } }; ConnectionManager.post('http://localhost/test', callback, 'id=6&name=test'); |
Description
Used to gets the field object of a form field
Parameters
Sample code
Code Block |
---|
var field = FormUtil.getField("field1"); $(field).val("test"); //set value |
Description
Used to generates the fields value as url query parameter string
Parameters
Sample code
Code Block | ||
---|---|---|
| ||
var fields = [
{"field":"field1", "param":"p_field1"},
{"field":"field2", "param":"p_field2"},
{"field":"field3", "param":"p_field3", "defaultValue":"default value"},
];
var queryString = FormUtil.getFieldsAsUrlQueryString(fields);
console.log(queryString); //p_field1=Field1%20value&p_field2=Field2%20value;Field2%20second%20value&p_field3=default%20value |
Description
Used to gets the cell objects of every rows of a grid field
Parameters
Sample code
Code Block | ||
---|---|---|
| ||
var cells = FormUtil.getGridCell("gridId.field1");
$(cells).each(function(){
//do something
}); |
Description
Used to gets the cell values of every rows of a grid field and return it in an array.
Parameters
Sample code
Code Block | ||
---|---|---|
| ||
var values = FormUtil.getGridCellValues("gridId.field1");
for (var i = 0; i < values.length; i++) {
console.log(values[i]); //i equals to row number start from 0
} |
Description
Used to gets the value of a form field.
Parameters
Sample code
Code Block | ||
---|---|---|
| ||
var value = FormUtil.getField("field1"); |
Description
Used to gets the values of a form field. Values will return in array.
Parameters
Sample code
Code Block | ||
---|---|---|
| ||
var values = FormUtil.getValues("field1"); for (var i = 0; i < values.length; i++) { console.log(values[i]); } |
Description
Used to creates a popup dialog element.
Parameters
Sample code
Code Block | ||
---|---|---|
| ||
JPopup.create("testPopup", "Test Popup Dialog"); |
Used to hides a created and shown popup dialog element.
Parameters
Sample code
Code Block | ||
---|---|---|
| ||
JPopup.hide("testPopup"); |
Description
Used to creates a popup dialog element.
Parameters
Sample code
Code Block | ||
---|---|---|
| ||
var params = { id : "1", name : "test" }; JPopup.show(frameId, url, params); |
...
...