Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
WCBasicAdminGuide.pdf
Скачиваний:
76
Добавлен:
23.03.2015
Размер:
3.31 Mб
Скачать

Viewing Workflow History

To optimize and streamline your workflow process definitions, you should capture and record events, such as state transitions and variable updates that occur during process execution. The ordered sequence of these events is called a workflow history, which allows you to capture significant events.

In addition, you can specify that a keyed event be emitted, which allows synchronization of other Windchill managers and servers with process events. As described in this section, you can specify the following:

Which events are to be ignored

Which are to be recorded

Which are to be emitted as keyed events

Which are to be both recorded and emitted

Note

When there is a loop link in a workflow with a conditional route, only the last vote is recorded.

Selecting Events

The following events can be generated during execution of a workflow process:

Process creation, which occurs when a Start command is issued for an existing, enabled process definition.

Change of state, which occurs when an execution object (a process or an activity) changes states (for example, from running to completed).

Change of data value, which occurs when values are read into a process activity or written to process variables.

Change of assignee, which occurs when assignment of a workflow task changes from one user to another.

Error event, which occurs when an exception is thrown during process execution.

You can identify the events to be recorded in the workflow history or emitted as keyed events by setting the default event configuration in the wt.properties file.

Understanding Workflow

359

Note

Workflows that are created before changes to the wt.properties are applied are not affected.

When one or more of the following properties is set to true, the corresponding event is recorded or emitted:

wt.workflow.engine.recordProcessStateChange

wt.workflow.engine.recordProcessDataChange

wt.workflow.engine.recordActivityStateChange

wt.workflow.engine.recordActivityDataChange

wt.workflow.engine.recordProcessCreation

wt.workflow.engine.recordAssigneeChange

wt.workflow.engine.recordException

wt.workflow.engine.recordVoting

wt.workflow.engine.emitProcessStateChange

wt.workflow.engine.emitProcessDataChange

wt.workflow.engine.emitActivityStateChange

wt.workflow.engine.emitActivityDataChange

wt.workflow.engine.emitProcessCreation

wt.workflow.engine.emitAssigneeChange

wt.workflow.engine.emitException

All running workflow processes record and emit events based on this default configuration. You can use the Workflow History Viewer to change the events recorded or emitted by a given process.

Using the Workflow History Viewer

You can view workflow-generated events on the Workflow History Viewer, a simple ASCII utility. Issue the following command to start the Workflow History Viewer:

windchill wt.workflow.engine.WfMonitor

The following is the main menu of the Workflow History Viewer:

Workflow Monitor - Main Menu

Existing

Workflow

Processes

-- --

-- --

-- -- -- -- -- -- -- -- -- -

360

PTC Windchill® Basic Administration Guide

>> 1. Simplest, key = 3347 (Running)

Audit events

-- -- -- -- -- --

No event retrieved

1.Select process.

2.Show selected process.

3.Delete selected process.

4.Refresh processes.

5.Change event configuration for selected process.

6.Show selected events for selected process.

7.Show all events for selected process.

8.Show selected events for all processes.

9.Show all events for all processes.

10.Select event.

11.Show event.

12.Show event source.

13.Refresh events.

14.Delete events for selected process.

15.Delete events for all processes.

16.Exit

>>> Choose an option:

This menu includes a list of all existing processes and a list of all retrieved events. The list of retrieved events is initially empty.

In addition to these lists, the main menu provides 16 options. A description of each follows:

Select Process

Select this option to select a process, so associated events can be queried. The selected process is preceded by the characters >>.

Show Selected Process

Select this option to display the following information about the selected process, as well as all of its activities and subprocesses that have been started:

The process status (for example, running).

The process creator.

The team with which the process is associated.

An indication of whether or not the process or activity is overdue (that is, whether it has exceeded its specified duration).

The time at which the process or activity started.

Understanding Workflow

361

The time at which the process or activity ended (not shown if the process or activity has not been closed).

The deadline for the process or activity, if one exists.

The event configuration for the process.

Suspend and alert times, in milliseconds.

The following shows a sample process display:

Simplest - Running

Creator: Administrator

Team: Default

Times: is overdue = false

start time = 1998-11-20 14:08:53.0 suspend time = 0, alert time = 0

Event configuration:

Process (RECORD/EMIT): Creation: R, State change: RE

Activity (RECORD/EMIT): Data change: E

Exception (RECORD/EMIT): Exception: R

Activities:

*** act_simplest (wt.workflow.engine.WfTestActivity) - Running Times: is overdue = false

start time = 1998-11-20 14:08:56.0 suspend time = 0, alert time = 0

Delete Selected Process

Select this option to delete the selected process.

Refresh Processes

Select this option to refresh all processes. The Workflow History Viewer does not automatically edit the status of a displayed process. You must explicitly refresh it in order to see new processes and changes of state since the last refresh.

Change Event Configuration

Select this option to open an event configuration editor. With the editor you can select the events that should be emitted, recorded, or ignored, for the selected process.

Edit event configuration

Current configuration

Process (RECORD/EMIT): Creation: R, State change: RE

Activity (RECORD/EMIT): Data change: E

Exception (RECORD/EMIT): Exception: R

1. Create process - record: true

362

PTC Windchill® Basic Administration Guide

2.Create process - emit: false

3.Change process state - record: true

4.Change process state - emit: true

5.Change process data - record: false

6.Change process data - emit: false

7.Change activity state - record: false

8.Change activity state - emit: false

9.Change activity data - record: false

10.Change activity data - emit: true

11.Change assignment - record: false

12.Change assignment - emit: false

13.Execution error - record: true

14.Execution error - emit: false

15.Save configuration

16.Save configuration and return

17.Return (looses changes since last save)

>>> Choose an option:

As previously described, all processes are governed by the event configuration specified in the wt.properties file, unless this submenu is used to change that configuration for the selected process. Selecting an option on this submenu toggles the current setting. For example, if you select option 1, you will change the setting of Create process from true to false. Consequently, process creation would no longer be a recorded event.

Show Selected Events for Selected Process

Select this option to open the submenu shown below. You can select an option from this submenu to specify the type of event in which you are interested. (In the example, option 8 is selected, indicating that the user is interested in all events associated with the selected process.)

Types of events to show

1.Process creation

2.Process state change

3.Process data change

4.Activity state change

5.Activity data change

6.Assignment change

Understanding Workflow

363

7.Execution error

8.All

9.None (return)

>>>Choose an option: 8

When you have select an option from this submenu, the requested events are retrieved, and the list of events is refreshed. For each event, the list identifies the event type and the execution object associated with it:

Audit events

——————

>> 1. PROCESS_STATE_CHANGED, process = Simplest

Show All Events for Selected Process

Select this option to represent a shortcut to selecting All, (option 8) from the submenu of event types described in the preceding section. If this main menu option is selected, all events associated with the selected process are shown.

Show Selected Events for All Processes

Select this option to display all events of the selected type for all processes.

Show All Events for All Processes

Select this option to display all stored events for all processes. This list can be very large.

Select Event

Select this option to select another event. When events are retrieved, the first event in the list is automatically selected.

Show Event

Select this option to display detailed event information for a selected event, as follows:

event type = PROCESS_STATE_CHANGED timestamp = 1998-11-20 14:08:53.0 activity key = 0 activity name = null process key = 3347

process name = Simplest

process template name = simplest old state = Not started

new state = Running

Show Event Source

Select this option to display the execution object (process or activity) that is the source of the selected event.

Refresh Events

Select this option to refresh all events corresponding to the selected process and event type. This is necessary to view events generated since the last refresh.

364

PTC Windchill® Basic Administration Guide

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]