bea.com | products | dev2dev | support | askBEA

Download Docs | Site Map | Glossary
Search

Using the Studio

Monitoring Workflows

The following sections discuss workflow monitoring:

- Overview of Workflow Monitoring Tasks

- Working with Workflow Instances

- Viewing User and Role Worklists

- Changing Task Permissions and Priority

- Changing Task Status and Assignment

- Using Workload Reports

- Using Statistics Reports

Overview of Workflow Monitoring Tasks

The Studio workflow monitoring features allow workflow designers to perform run-time monitoring to help debug and troubleshoot workflow designs in a design environment, and system administrators to monitor and intervene in the real-time execution of workflows in a production environment.

Additionally, in a production environment, administrators can monitor user and role workloads for manually-assigned tasks.

Finally, business analysts can perform post-run-time data collection on manually assigned tasks to gather and compile historical raw and statistical workload and performance data to determine bottlenecks and inefficiencies in business processes. This section describes the following tasks you can perform:

- Display the status of running or completed workflow instances. Procedures are given in Viewing Workflow Instance Status.

- Display and modify the current value of variables in running instances. Procedures are given in Viewing and Updating Workflow Instance Variables.

- Modify the tasks associated with a workflow instance, for example, reassigning tasks or forcing work to be redone. Procedures are given in Changing Task Status and Assignment.

- Modify the permissions defined for tasks to allow Worklist users or other administrators to modify tasks. Procedures are given in Changing Task Permissions and Priority.

- View the task lists for users or roles and modify task assignment, status or permissions. Procedures are given in Viewing User and Role Worklists.

- Display the workload status of the system, showing the number of tasks categorized by status (pending, inactive, done, overdue) and user or role. Procedures are given in Using Workload Reports.

- Compile raw data and perform statistical reports on workloads and execution times, according to users and roles. Procedures are given in Using Statistics Reports.

Note: In order to perform any of the monitoring tasks described in this section, with the exception of viewing user and role worklists, you must have Monitor Instance permission. For more information on permissions, see Assigning Permissions to Users and Roles.

Working with Workflow Instances

A workflow instance is a session of a workflow template definition that has been placed into run time. You can view the status of workflow instances and the current value of variables. In a design environment, you can view instances to help you debug and troubleshoot problems with a workflow design. In a production environment, you can view the status of a running workflow and intervene to update variables or modify tasks.

To view a list of workflow instances:

1. In the folder tree, right-click the workflow template or template definition for which you would like to view instances, and from the pop-up menu, select Instances to display the Workflow Instances dialog box.

2. Select one of the following options:

   - Started—select to display all workflows (still in-progress or completed) that were started in a time period you specify.

   - Completed—select to display all workflows that were completed in a time period you specify.

3. From the From and To drop-down boxes, select a start and end date for the period of time for which you would like to view instances for the selected workflow template definition.

   Figure 10-1 Workflow Instances Dialog Box

For each workflow instance, the following information is displayed:

Workflow Label | The label generated from the expression specified in the Workflow Label field of the template definition's properties dialog box. For more information, see Updating, Labeling, and Activating a Template Definition.
Started | The date the workflow was instantiated.
Completed | The date the workflow was completed. If it is not completed, this column will be blank.
Comment | The comment generated from an expression specified in the Set Workflow Comment action in the workflow. For information, see Setting Up a Workflow Comment. If this action was not defined, this column will be blank.

For performance reasons, the process engine only returns 100 items at a time. If there are additional items, a button (+) appears which, when clicked, will retrieve the next 100 items. When no additional items remain, the button is no longer shown.

To update the instances list, click Refresh.

From the Workflow Instances dialog box, you can do the following:

- View the status of the workflow instance in a graphical or list representation. For details, see Viewing Workflow Instance Status.

- View and update the current value of workflow instance variables. For details, see Viewing and Updating Workflow Instance Variables.

- Modify task assignment and properties. For details, see Changing Task Permissions and Priority.

- Delete workflow instances. For details, see Deleting Workflow Instances.

Viewing Workflow Instance Status

To view the status of a particular workflow instance, double-click the instance in the list in the Workflow Instances dialog box, or right-click the instance and select Workflow Status from the pop-up menu.

A window is displayed showing either a flowchart or task list representation of the current state of the running workflow. You can use the buttons at the top of the window to do the following:

Table 10-1 Workflow Status Window Buttons

Button | Use to...
--- | ---
| Display a graphical flowchart view of the workflow instance.
| Display a list of all tasks in the workflow instance.
| Refresh the workflow view.

To display a flowchart view of the workflow instance, click the button.

Figure 10-2 Workflow Status Window: Flowchart View

In the graphical representation, active tasks are green, executed tasks are gray, and the inactive tasks or other nodes are white. (For information on task states, see Understanding Task States.)

For debugging purposes, you can use this information to identify where a stoppage has occurred in the workflow. If a task that should have completed is still showing as green, that is, as activated but not executed, this is usually an indication that there is an error in the definition of that node.

To display a list of all tasks in the workflow and their status, click the button.

Figure 10-3 Workflow Status Window: List View

The list view displays the following information for each task:

Task | The name of the task.
Assignee | The user or role to which the task has been assigned. For more information on task assignment, see Setting Up Manual Tasks.
Started | The date and time the task was started.
Due | The due date for the task, as specified by Set Task Due Date action in the workflow. For more information, see Setting a Task Due Date.
Completed | The date and time the task was completed.
Priority | The priority level assigned to the task. For more information, see About Task Priority.
Comment | The comment generated from an expression specified in the Set Task Comment action in the workflow. For information, see Setting a Task Comment. If this action was not defined, this column will be blank.

In addition, the following indications appear:

- Tasks shown without a box are non-manual tasks or tasks that have not yet been activated (no started or completed date appears).

- An empty box indicates that the task has been activated but is pending, that is, or waiting to be executed (it shows a started date, but not a completed date).

- A checked box indicates a task that has already been completed (it shows a completed date).

- A red box indicates that the task is now overdue, that is, its due date is before the current date.

From the Workflow Instances dialog box, you can also do the following:

- Change a task's status and assignment. For details, see Changing Task Permissions and Priority.

- Change a task's permissions and priority. For details, see Changing Task Permissions and Priority.

Viewing and Updating Workflow Instance Variables

You can view and update the current value of all variables defined for the workflow at any point during its execution.

When debugging workflows at design time, it is a good idea to view variable values to help troubleshoot possible design errors. Even if a workflow appears to have executed correctly, you may find incorrect settings of variable values, which may indicate a design bug.

To view workflow instance variables:

1. Do one of the following:

   - From the Workflow Instances dialog box, right-click the desired workflow instance, and from the pop-up menu, select Variables.

   - From the Workflow Status window for an instance, click the Vars button.

   The Workflow Variables dialog box displays each variable in a list, showing its name, type, and its current value. (For information on variable types, see Working with Variables.)

   Figure 10-4 Workflow Variables Dialog Box

2. To view the content of an XML-type variable only, select an XML variable in the list and click View XML. The View XML window appears with the XML content of the variable displayed.

   Figure 10-5 View XML Window

3. Click Close to close the View XML window.

To update a variable's value:

1. From the Workflow Variables dialog box, select the desired variable, and click Update to display the Set Variable dialog box.

   Figure 10-6 Set Variable Dialog Box

2. In the Value field, enter a constant that will become the new value from the variable.

Note: Because workflow logic often depends on the value of variables, use caution when manually changing the value of a variable. Also be sure that the value you enter is valid for the date type of the variable.

1. Click OK to save the change and reset the variable.

Deleting Workflow Instances

You can delete a single workflow instance or multiple workflow instances according to date.

To delete a single workflow instance:

1. Right-click the workflow instance in the list in the Workflow Instances dialog box, and select Delete from the menu.

2. When prompted by the Delete Workflow Instance warning message, click Yes to delete the instance, or No to cancel the delete.

To delete multiple workflow instances for a template:

1. In the folder tree, right-click the template or template definition folder for the workflow instances you want to delete, and from the pop-up menu, select Delete Instances. The Delete Workflow Instances dialog box is displayed.

   Figure 10-7 Delete Workflow Instances Dialog Box

2. Select one of the following options:

   - Started — if selected, this option finds all workflow instances—started and completed—with a start date in the specified date range.

   - Completed — if selected, this option finds completed workflow instances with a completed date in the specified date range.

3. In the From and To boxes, select a month and date to specify the period of time for which you would like to delete all the instances for the selected workflow.

4. Click OK to delete the selected workflow instances, or Cancel to cancel the delete.

Viewing User and Role Worklists

To view a user worklist, in the folder tree for the desired organization, right-click a user from the list and select Open User Worklist from the pop-up menu. A list of tasks assigned to the user is displayed in the User Worklist dialog box.

Figure 10-8 User Worklist Dialog Box

To view a role worklist, in the folder tree for the desired organization, right-click a role from the list and select Open Role Worklist from the pop-up menu. A list of tasks assigned to the role is displayed in the Role Worklist dialog box.

Figure 10-9 Role Worklist Dialog Box

The task list displays the following information for each task:

Task | The name of the task.
Workflow | The name of the workflow in which the task is defined.
Started | The date and time the task was started.
Due | The due date for the task, as specified by Set Task Due Date action in the workflow. For more information, see Setting a Task Due Date.
Completed | The date and time the task was completed.
Priority | The priority level assigned to the task. For more information, see About Task Priority.
Comment | The comment generated from an expression specified in the Set Task Comment action in the workflow. For information, see Setting a Task Comment. If this action was not defined, this column will be blank.

In addition, the following indications appear:

- Tasks shown without a box have not yet been activated (no started or completed date appears).

- An empty box indicates that the task has been activated but is pending, that is, has not yet been executed by the user (it shows a started date, but not a completed date).

- A checked box indicates a task that has already been completed (it shows a completed date).

- A red box indicates that the task is now overdue, that is, its due date is before the current date.

To refresh the task list for a user or role, click the button.

From the Role Worklist and User Worklist dialog boxes, you can also do the following:

- Change a task's status and assignment. For details, see Changing Task Permissions and Priority.

- Change a task's permissions and priority. For details, see Changing Task Permissions and Priority.

Changing Task Permissions and Priority

If a task has been defined with Modify at Execution permission, you can change the priority and permissions for a task. (For information, see Defining Task Properties.) This also enables you or a Worklist user to change the task's status and assignment. For more information, see Changing Task Status and Assignment.

To change task permissions and priority:

1. From the Workflow Status, User Worklist or Role Worklist dialog boxes, right-click the task you wish to reassign, and from the pop-up menu, select Properties to display the Task Properties dialog box.

   Figure 10-10 Task Properties Dialog Box

2. Optionally, from the Priority field, select a new priority level for the task—Low, Medium, or High.

3. Enable any of the following Task Permissions check boxes:

   Permission | Explanation
   --- | ---
   Mark done without executing | Allows a Worklist user or Studio administrator to mark the task done without it having been executed, and manually set the task's completed date.
   Re-execute if marked done | Allows a Worklist user to re-execute a task even if it has already been completed.
   Unmark if marked done | Allows a Worklist user or Studio administrator to change the status of the task back to not done when the task is marked as done. (If a user marks a completed task as not done, the task status is set to Active; it does not, however, reverse the effects of any actions that have been executed.)
   Modify at execution | Allows a Worklist user or Studio administrator to change the permissions for a task before it has been executed.
   Reassign at execution | Allows a Worklist user to take or reassign the task, or a Studio administrator to reassign the task to another user or role before it has been executed.

4. Click OK to save your changes to the task.

Changing Task Status and Assignment

If a task's permissions allow it, you can intervene in a currently running workflow to reassign tasks to different users or roles, and mark and unmark them done.

Note: Although you can reassign tasks, mark or unmark them done, or change their properties, you cannot execute tasks on worklists invoked from within the Studio. To execute a task, you must do so from the Worklist or custom client application. For more information, see Using the WebLogic Integration Worklist.

Reassigning a Task

If the task has been defined with Reassign at Execution permission, and the task has not already been marked done, you can reassign a task to a different Worklist or custom client user, role, or user in role. (For an explanation of these distinctions and of task assignment, see Setting Up Manual Tasks.)

To reassign a task:

1. From the Workflow Status, User Worklist or Role Worklist dialog boxes, right-click the task you wish to reassign, and from the pop-up menu, select Reassign Task to display the Reassign Task dialog box.

   Figure 10-11 Reassign Task Dialog Box

2. Select one of the following options:

   - User—select to reassign the task to a specific user.

   - Role—select to reassign the task to any user in the specified role.

   - User in Role—select to reassign the task to the user in the specified role with the fewest tasks assigned to him or her.

3. In the Assign To drop-down list, select the name of the user or role to which you are reassigning the task.

4. Click OK to reassign the task.

Marking a Task Done

If the task has been defined with Mark Done Without Executing permission, you can mark a task done before it is actually executed by a user.

To mark a task done, from the Workflow Status, User Worklist or Role Worklist dialog boxes, right-click the task you wish to mark done, and from the pop-up menu, select Mark Task as Done. The task's completed date is set to the current date, and the workflow proceeds.

Unmarking a Task Done

If the task has been defined with Unmark If Marked Done permission, you can unmark a task done that has already been completed.

To unmark a task done, from the Workflow Status, User Worklist or Role Worklist dialog boxes, right-click the task you wish to unmark done, and from the pop-up menu, select Unmark Task as Done. The task's status is reset to pending and the completed date is cleared.

Using Workload Reports

The Studio allows you to view workload reports, showing the number of tasks, by workflow, task, user or role, and task status. In the Studio folder tree, right-click Workload Report, and choose Open from the pop-up menu to display the Workload Report Properties dialog box.

Figure 10-12 Workload Report Properties Dialog Box

Compiling Workload Report Information

The workload report will display information according to the selections you make in the Workload Report Properties dialog box:

- Workflow Templates folders — select a workflow template to include information pertaining to all workflow template definitions within that workflow template, or expand a workflow template and select only one workflow template definition. Only information within the selected workflow template or workflow template definition will be included in the workload report.

- Pending — displays pending tasks. Pending tasks have been started and not yet completed.

- Inactive — displays inactive tasks. Inactive tasks are those which have not yet been started.

- Done — displays completed tasks.

- Overdue — displays those tasks which are now overdue. Overdue tasks are pending tasks with a due date on or before the current date.

- Total Tasks — displays all tasks, regardless of task state (that is, inactive, pending, and completed tasks are all counted).

- All users — displays workload information for each user.

- All roles — displays workload information for each role.

- Specified users — displays workload information for each of the selected users in the displayed users list.

- Specified roles — displays workload information for each of the selected roles in the displayed roles list.

- Users of specified roles — displays workload information for each user who is a member of one of the selected roles in the displayed roles list.

- Group together and display totals only — displays total counts of tasks only for the group identified by the above selected option. If not selected, each individual user or role is shown in the workload report.

Viewing Workload Reports

After you make your workload report selections, click OK to display a graphical representation of the current workload.

Figure 10-13 Workload Report Dialog Box

The contents of the report are broken down by user, role, or totals, depending on the options selected. This display may scroll left and right if there is a lot of information. A bar chart indicates the total number of tasks of various state counted. The legend at the top of the window shows what each color represents, depending on the options selected at design time. For more precise indicators, the actual number of tasks is shown above each bar.

Using Statistics Reports

You can view statistics reports that are based on tasks, users, roles, and so on. A statistics report provides statistical information based on historical data kept for completed workflows. It shows number of tasks completed, total time, average time, and minimum and maximum times spent for each task. Standard deviation from the average time is also shown.

Compiling Statistics Report Information

In the Studio folder tree, right-click Statistics Reports and choose Open from the pop-up menu to display the Statistics Report Properties dialog box. The report includes information according to the selections you make in the Statistics Report Properties dialog box.

Figure 10-14 Statistics Report Properties Dialog Box

- List of workflow templates — list of available workflow templates. Expand a template to select the workflow template definition to include in the statistics report.

- For all dates — statistical calculations are gathered regardless of date.

- From — all tasks, in completed workflows, completed on or after this date are included in the statistical calculations.

- To — all tasks, in completed workflows, completed on or before this date are included in the statistical calculations.

- All users — displays statistical information for each user.

- All roles — displays statistical information for each role.

- Specified users — displays statistical information for each selected user.

- Specified roles — displays statistical information for each selected role.

- Users of specified roles — displays statistical information for each user who is a member of one of the selected roles in the displayed roles list.

- Group together — the report displays total counts of tasks only for the group identified by the above selected option. If not selected, each individual user or role is shown in the workload report.

Viewing Statistics Reports

When you make your statistics report selections, click OK to display the statistics report.

Figure 10-15 Statistics Report

The top of the dialog box has several options:

- Build/Rebuild — rebuild the report if you change the units of time or the precision level.

- Seconds, Minutes, Hours, Days — units of time used in the report.

- Precision — drop-down list from which you can select how many decimal places you want in the statistical information.

Several columns are displayed in the report, depending on the options selected at report design time:

- Task — name of the task being measured.

- User — user or role assigned to the task. If the Group together option was selected at report design time, this column is not shown, because the results are totaled for all users or roles.

- Number — total number of tasks completed.

- Total — total amount of time spent on doing the task. This is the time interval between the task start date and completed date.

- Average — average amount of time spent performing this task.

- StdDev — standard deviation from the average amount of time spent performing this task.

- Min — minimum amount of time spent performing this task.

- Max — maximum amount of time spent performing this task.

Because the report definition is stored separately from the results, the statistics report can be run at any time.