Using Integration Controls

     Previous  Next    Open TOC in new window  Open Index in new window  View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Worklist Controls

Insert Control:Task

Oracle WebLogic Integration Worklist provides the capability to direct the flow of work and manage the routing of tasks to the people in an enterprise. Integral to the flow of work are actions such as receiving, approving, modifying, and routing documents. The documents that accompany work activities provide the information necessary for people to perform and complete tasks. The Worklist enables people to collaborate in business processes including assigning tasks, tracking the status of tasks, handling approvals, and other activities required to manage workflow.

To support the Worklist functionality, Oracle WebLogic Integration provides two controls in Oracle Workshop for WebLogic, the Task control and the Task Batch control. These controls expose Java interfaces that can be invoked directly from your business processes. The Task control enables a business process to create a single Task instance, manage its state and data, and provide callback methods that report status. The Task Worker control allows specified users to acquire ownership of Tasks, work on them, and complete them. It also provides administrative privileges, such as starting, stopping, deleting, and assigning. Access to the Task Worker control can be done with a business process or through a user interface (UI).

 


Topics Included in This Section

Overview: Worklist Controls

Describes what Tasks are and provides an overview of the Worklist controls.

Creating a New Task Control

Describes how to create a new Task control using the Oracle Workshop for WebLogic graphical design interface.

Creating a New Task Batch Control

Describes how to create a new Task Worker control using the Oracle Workshop for WebLogic graphical design interface.

Using Task and Task Batch Controls in Business Processes

Provides information about using the Worklist controls in business processes.

Example: Task Control

Provides a link to the Tutorial: Building a Worklist Application, which shows an example of using a Task Control.

Related Topics

Interface TaskControl

Interface TaskWorkerControl

Control Annotations

Using the Worklist

Tutorial: Building a Worklist Application

 


Overview: Worklist Controls

Worklist controls enable the automated manipulation, creation, and management of Tasks. A Task instance represents a unit of work that requires completion within a certain time period. After the work is completed, you can use a Task instance to represent a detailed record of that unit of work.

A Task instance is a particular object in the run-time Worklist system that represents a work assignment in the real world. Task instances are part of the Oracle WebLogic Integration server and exist independently of any controls or business processes. Multiple business processes can interact with a Task throughout its lifecycle concurrently. Tasks remain in the run time indefinitely, either until they are explicitly deleted or purged by the Oracle WebLogic Integration purging process. You can create, delete, and manage Tasks through the following mechanisms:

Task instances, or simply Tasks, offer a variety of properties that describe the work to be done and the state of the work. Task instance properties can describe the following:

Table 19-1 Task Instance Properties
Property
Description
Assignees List
The list of users and groups that have permission to claim the task and work on it.
Completion Due Date
The date the work is due.
Task Owner
The user who manages the process of getting the work done.
Claimant
The user who has claimed the Task and completes the work.
Request and response documents
The records that describe the work to be done and the results.

Tasks have the following characteristics, qualities and behaviors that can be defined, configured or used:

Table 19-2 Task Characteristics
Characteristics
Description
Task Due Dates
Due dates can be set to track how long it should take for a Task to get claimed by a user or for the claimant to actually complete the task. Due dates can be set with actual dates, or using business time with a business calendar.
Task States
States can describe such things as whether a Task is complete, started, or aborted.
Task Operations
Tasks depend on users to invoke operations that make changes to properties and states. For example, an operation could indicate that a Task is complete or to assign a Task to a new user.

The following Worklist controls are provided for building a Worklist system with Oracle WebLogic Integration:

Worklist controls are extensible. Common extensions include implementing callback functions and performing system queries. Extensibility is provided by Java annotations.

 


Creating a New Task Control

An instance of a Task control can create a single task instance. If multiple tasks need to be created, use a factory type of Task control. See “Using Task Control Factories” in Advanced Topics in Using the Worklist Tutorial.

A Task control instance can also interact with a task instance that already exists by setting its active task ID. After creating or setting the active task ID, your control instance can get information about that task or update that task in various ways.

You can customize Task controls for different business purposes, by adding new operations or callbacks, or by altering the signatures of existing operations or callbacks.

To create a new Task control
  1. Open your Oracle WebLogic Integration application in Oracle Workshop for WebLogic.
  2. In the Package Explorer pane, double-click the business process (Process.java file) to which you want to add the logic to integrate business users using the Worklist system. The business process is displayed in the Design view.
  3. Click Insert Control:Task on the Data Palette and from the drop-down list choose Integration Controls to display the list of controls used for integrating applications.
  4. Note: If the Data Palette view is not visible in Oracle Workshop for WebLogic, click
    Window > Show View > Data Palette from the menu bar.
  5. Select Task.
  6. The Insert control: Task dialog box appears (see Figure 19-1).

    Figure 19-1 Insert Control:Task


    Insert Control:Task

  7. In the Insert control: Task dialog box enter the following details:
    • In the Field Name, type the variable name used to access the new Task control instance from your business process. The name you enter must be a valid Java identifier.
    • In the Insertion point: from the drop-down list select the point where you want the field name to be inserted in the process file.
    • Choose whether you want to make this a control factory by selecting or clearing the Make this a control factory that can create multiple instances at runtime check box.
    • Click Next.
    • The Create Control dialog-box appears.

  8. In the Create Control dialog box enter the following details:
    • In the Name field, type the name of your new control extension file.
    • Click Next.
    • The Insert control- Task dialog-box appears.

  9. In the Insert control- Task dialog box enter the following details:
    • Enter a filename for the Task control in the Task Plan field, by clicking Browse to find the Java file in your file system and click OK.
    • Click Finish.
    • A new Task control and an instance of it are created and the Insert Control dialog box is closed.

      A new Java file is created and displayed in the Package Explorer pane in Oracle Workshop for WebLogic. (You can double-click any Java file to view or edit it in the Design or Source view.) The instance of the control is displayed on the Controls tab of the Data Palette.

  10. To display the base methods provided on a Task control, expand the control instance by clicking the + beside its name on the Data Palette.
  11. After you create an instance of the Task control in your business process, you can design the interaction of the business process with the Task control by simply dragging and dropping the Task control methods from the Data Palette onto the Design view at the point in your business process at which you want to design the interaction.
  12. For examples of designing interactions between a business process and an instance of a Task control, see Using Task and Task Batch Controls in Business Processes.

  13. After you create a Task control in your business process, you can view and edit the properties of the control type or the instance of that control type in the JPD Configuration pane. The control type is represented as a java file in the Package Explorer pane and the instance is represented in the Data Palette.
  14. Task Instances have data values associated with them, many of which are set when the task is created. You can use the JPD Configuration pane on a Task control to set the default values for some of these data values. These values are used whenever that control instance creates a new task. Note that the properties set on a factory type Task control propagate to any Task control instances created from that factory.

    Note: To learn how to use the JPD Configuration and Properties pane for specifying properties for control types versus control instances, see Interacting With Resources Using Controls.

 


Creating a New Task Batch Control

The Task Worker control allows specified users to acquire ownership of Tasks, work on them, and complete them. It also provides administrative privileges, such as starting, stopping, deleting, and assigning. Access to the Task Worker control can be done with a business process or through a user interface (UI). You can customize each Task worker control for different business purposes.

This topic describes how to create a new Task Worker control. Task Worker controls do not have any properties to configure.

  1. In the Package Explorer pane, double-click the business process (Process.java file) to which you want to add the logic to integrate business users using the Worklist system. The business process is displayed in the Design view.
  2. Click Insert Control:Task on the Data Palette and from the drop-down list choose Integration Controls to display the list of controls used for integrating applications.
  3. Note: If the Data Palette view is not visible in Oracle Workshop for WebLogic, click Window > Show View > Data Palette from the menu bar.
  4. Select Task Batch.
  5. The Insert control: Task Batch dialog box appears.

  6. In the Insert control: Task Batch dialog box enter the following details:
    • In the Field Name, type the variable name used to access the new Task Batch control instance from your business process. The name you enter must be a valid Java identifier.
    • In the Insertion point: from the drop-down list select the insertion node, you want to add the control.
    • Decide whether you want to make this a control factory and select or clear the Make this a control factory that can create multiple instances at runtime check box.
    • Click Next.
    • The Create Control dialog-box appears.

  7. In the Create Control dialog box enter the following details:
    • In the Name field, type the name of your new control extension file.
    • Decide whether you want to add comments as configured in the properties of the current project and select or clear the Generate comments check box.
    • Click Next.
    • The Insert control: Task Batch dialog-box appears.

  8. In the Insert control: Task Batch dialog box, select the Task Plan.
  9. Click Finish.
  10. When you click finish, the control java file is displayed in the Package Explorer pane. In both Design and Source view, you can double-click any control java file to view or edit it. The instance of the control is displayed on the Controls tab of the Data Palette.

  11. To display the base methods provided for the control instance, click the + beside its name on the Data Palette. The following figure shows an example of a Task Worker control instance displayed on the Controls tab in the Data Palette.
  12. After you create an instance of the Task control in your business process, you can design the interaction of the business process with the Task control by simply dragging and dropping the Task control methods from the Data Palette onto the Design view at the point in your business process at which you want to design the interaction.
  13. For examples of designing interactions between a business process and an instance of a Task control, see Using Task and Task Batch Controls in Business Processes.

 


Using Task and Task Batch Controls in Business Processes

Before you begin working with the Task and Task Batch controls, you should be familiar with the features and components of the Worklist. To learn more about the Worklist, see Using the Worklist.

To design the interaction of a Task or Task Worker control with a business process, you must decide which methods on the control you want to call from the business process to support the business logic.

In the same way that you design the interactions between business processes and other controls in the Oracle Workshop for WebLogic, you can bind the Worklist control method to the appropriate control node in your business process (Control Send, Control Receive, and Control Send with Return). You do this in the Design view by simply dragging a control method from the Data Palette onto the business process at the point in your business process at which you want to design the logic.

When you create task control, out of user properties like Integer and Float in the task plan, the user properties argument become long and double instead of Integer and Float, this change in input will not lead to data loss.

 


Example: Task Control

To see an example of using a Task control in a business process, see Tutorial: Building a Worklist Application.


  Back to Top       Previous  Next