Synchronous Phase Operations
In the synchronous phase, the following operations are performed:
cim1265
In the synchronous phase, the following operations are performed:
- The user selects a task to perform.After the user selects a task for processing, but before the user is presented with a list of possible subjects for the task, the following processing can occur:Business processing through a business logic task handler’s handleStart() method.API:Business Logic Task Handler API
- The task subject is selected but not yet displayed.The subject of a task is the object that is being directly affected by the task, for example, a User object in a Create User task.After the user selects the subject of the task, but before the subject’s data is displayed on the task screen, the following processing can occur:
- Business processing through a business logic task handler’s handleSetSubject() method.API:Business Logic Task Handler API
- Default values for fields can be initialized with JavaScript.
- During task screen configuration, default values can be hard-coded, or JavaScript can be provided to initialize fields dynamically.
- Fields associated with physical attributes are automatically populated with the corresponding data from the data store.
- displays and populates the task screenAfter the user has selected the task to perform and the task’s subject, displays the appropriate task screen containing the subject’s data.A task screen may contain fields associated with physical attributes or logical attributes.Fields associated with logical attributes are populated with data provided by logical attribute handlers. For example, a department number may be converted from a numeric code (physical attribute) to its corresponding user-friendly name (logical attribute) before being displayed on the task screen.API:Logical Attribute API
- invokes validation rules during data entry.can execute validation rules during data entry. Validation rules are specified in the directory.xml file for an entire environment, or in a task screen for a particular task. Validation rules are not performed by logical attribute handlers.During data entry, validation rules can be invoked in any of the following ways:
- A tab’s Validate button is clicked.
- The user changes tabs on the task screen.
- A value is modified in a field for which Validate on change is enabled.
- User submits the task screenAfter the user finishes supplying data on the task screen and clicks Submit, performs the following operations in order:
- Invokes validation rules.Validation rules can be implemented as regular expressions, JavaScript, or Java classes.
- Calls validate() in each logical attribute handler. This method performs field-level validation.Field-level validation takes place within the scope of the user-supplied attribute value only. For example, if you are validating a date, you can validate the date itself, but you cannot compare the date against other information in the task. Validating data against other data in the task is called task-level validation.API:Logical Attribute API
- Calls toPhysical() in each logical attribute handler. This method converts logical attributes back to their corresponding physical attributes.API:Logical Attribute API.
- Calls the handleValidation() method in business logic task handlers to perform task-level validation.Task-level validation lets you validate field data against any information in the task session or in the data store. For example, during a Create User task, calls a predefined business logic task handler that verifies whether the user ID for the new user is unique.Business logic task handlers can be called at the following times during the synchronous phase of task processing:
- When a task session is created (to initialize or process task data)
- After selecting a subject from the search result, but before presenting data to a user
- After a user submits a task, but before any security checks
- After security checks are done, but before the asynchronous phase
API:Business Logic Task Handler API
- displays validation results.If validation errors occur, the errors are reported to the user immediately. The user is allowed to correct the errors and resubmit the task.
- instantiates events for the task.After all validation is performed successfully, breaks down the task into the individual transactions that occur during the execution of the task. Each transaction is represented by anevent. For example, a Create User task may consist of the following events:
- CreateUserEvent. The event representing the creation of the User object.
- AddToGroupEvent. If the newly created user is being added to a group, this event represents the addition.
Business processing through a business logic task handler’s handleSubmission() method.For example, workflow approvals can be required for individual events, so that the rejection of one event may not impact the execution of other events or the overall task.API:Business Logic Task Handler APIAfter calls this method for all associated business logic task handlers, the synchronous phase is complete. - The task enters the asynchronous phase for processing.
Note:
Validation rules can be implemented as regular expressions, JavaScript, or Java classes. For more information, see the Configuration Guide
.