Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Sample

Thai

ตัวอย่างโค้ด

English
The following example assume that you are using BeanShell Plugin in a Process Tool. Please refer to Bean Shell Programming Guide for more information.
Thai

ตัวอย่างต่อไปนี้สมมติว่าคุณใช้ BeanShell Plugin ในเครื่องมือกระบวนการ โปรดอ้างอิง Bean Shell Programming Guide สำหรับข้อมูลเพิ่มเติม

Code Block
languagejava
import org.joget.apps.app.service.AppService;
import org.joget.apps.app.service.AppUtil;
import org.joget.apps.form.model.FormRowSet;
 
//Get App Service
AppService appService = (AppService) AppUtil.getApplicationContext().getBean("appService");
 
String processId = workflowAssignment.getProcessId(); //Please note that workflowAssignment is auto injected in BeanShell Plugin when mapped to Process Tool
 
//Get the record id
String primaryKey = appService.getOriginProcessId(processId);
 
//Load form data
FormRowSet rowSet = appService.loadFormData(appDef.getAppId(), appDef.getVersion().toString(), "sampleFormDefId", primaryKey); //Please note that appDef is auto injected in BeanShell Plugin when mapped to Process Tool

Methods

Thai

กระบวนการ

completeAssignmentForm
public org.joget.apps.form.model.FormData completeAssignmentForm(java.lang.String appId, java.lang.String version, java.lang.String activityId, org.joget.apps.form.model.FormData formData, java.util.Map<java.lang.String, java.lang.String> workflowVariableMap)

...