Informatica ActiveVOS
- Informatica ActiveVOS 9.2.4.6
- All Products
// Function that encapsulates the task form script. var AeTaskForm$ID = function() { // the task name var mTaskName = "ApproveLoan"; // task id var mTaskId = null; // task instance (AeTask instance) var mTask = null; /** * Called by the manager to initialize the task form. */ this.avcform_initialize = function(aTaskId, aTaskFormContext) { mTaskId = aTaskId; mTaskFormContext = aTaskFormContext; // (equivalent to Request's documentReady() fn ) // // Initialize your code here. You can populate // some UI fields, but not the task UI fields. // (see avcform_onTaskReady()) // // Set up form validation if needed } /** * Called when the task instance has been loaded from the server. */ this.avcform_onTaskReady = function(aTask) { // Called one time when the task instance (AeTask object) // is first loaded (via WSHT API). Use this to initialize mTask // and display input and outdata from the task. mTask = aTask; this.showData(); // display task data } /** * Called when the task instance has been updated from the server. */ this.avcform_onTaskUpdated = function(aTask) { // called each time the task has changed. For example, task // was claimed (state went from READY state to IN_PROGRESS). mTask = aTask; } /** * Called when loading task instance from the server failed. */ this.avcform_onTaskLoadError = function(aMessage) { // return false to allow AVC system to handle error. // or return true to indicate that your code handled it. return false; } /** * Called to enable/disable form input fields * @param aEnable Indicates if the form should be enabled or disabled */ this.avcform_enable = function(aEnable) { // return false to allow AVC system to handle enable/disabling of form fields // you can enable/disable your custom controls here. // normally a form is enabled when its editable (Claimed) return false; } /** * Called to validate the task form data before the task is saved */ this.avcform_validate = function() { // Called when the form needs to be validated before saving it (WSHT setOutput operation). // The form is not saved (setOutput not called) if this method returns false. // return true for relaxed validation on saving a form that isn't 100% complete return true; } /** * Called to validate the task form data before the task is completed */ this.avcform_validateForCompletion = function() { // Validation function called before completing a task. // Return true if the form is valid or false to prevent WSHT complete() operation. return true; } /** * Called when the task needs to be saved. */ this.avcform_save = function(aCompleteTask) { // This function is called when the user presses the "Save" button. // Code save the form (WSHT setOuput) goes here. (normally generated for you). } /** * Binds data to the UI controls. */ this.showData = function() { // this method is called when the task is loaded. e.g. via avcform_onTaskReady() above. if(mTask != null) { // show task data in UI } } }
$(document).ready(function() { ACTIVEVOS_TASKFORM_CONTEXT.init(_TASK_INSTANCE_ID_, new AeTaskForm$ID() ); });
// runtime $(document).ready(function() { ACTIVEVOS_TASKFORM_CONTEXT.init("urn:b4p:123", new AeTaskForm_123() ); });