37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel...

50
37 opyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials

Transcript of 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel...

Page 1: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

37Copyright © 2007, Oracle. All rights reserved.

Module 37: Executing Workflow Processes

Siebel 8.0 Essentials

Page 2: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

2 of 50Copyright © 2007, Oracle. All rights reserved.

Module Objectives

After completing this module you should be able to: Describe the workflow execution architecture List several ways to invoke workflow Invoke a workflow process using a run-time event Invoke a workflow process using a custom control

Why you need to know: There are multiple ways to invoke a workflow process and you

need to understand the choices available

Page 3: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

3 of 50Copyright © 2007, Oracle. All rights reserved.

Executing Workflow Processes

Workflow processes are executed either in The user’s application object manager

Supports synchronous processing

A separate server component known as the Workflow Process Manager component Supports asynchronous processing

In both cases workflow processes are executed using the Workflow Process Manager business service Is often referred to as the Workflow Engine

Page 4: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

4 of 50Copyright © 2007, Oracle. All rights reserved.

Synchronous Workflow Processing

Is typically executed in the user’s application object manager User is forced to wait until the workflow completes (or pauses)

Hourglass icon appears

Can be triggered by an action on the part of the user: Directly by clicking a button or menu item Indirectly by performing a record or applet operation

Is used to execute specific business logic that: Is triggered by the user’s activity Should be completed before the user continues activity

Page 5: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

5 of 50Copyright © 2007, Oracle. All rights reserved.

Asynchronous Workflow Processing

Is executed in the Workflow Process Manager server component User (if any) is not prevented from continuing activity

Is typically triggered by a change in the value of some column in a database table Can respond to changes not associated with user activity

For example: updates resulting from Enterprise Integration Manager imports

Can respond to conditions that exist for some threshold period of time

Is used to execute specific business logic when a specified condition is satisfied

Will be discussed in the following module

Page 6: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

6 of 50Copyright © 2007, Oracle. All rights reserved.

Invoking Workflow Processes

A workflow process can be invoked by a variety of mechanisms Run-time events Custom buttons and menu items Workflow policies Programmatically (that is as part of script)

This module

Next module

Beyond scope

WorkflowPolicies

WorkflowPolicies

RuntimeEvents

RuntimeEvents

Custom Control

Custom Control

Page 7: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

7 of 50Copyright © 2007, Oracle. All rights reserved.

Invoking via Workflow Policies

A workflow policy is a defined set of conditions and actions Actions are executed when conditions are met

Example: When a service request priority = Critical: Send urgent message to service request owner Update service request priority to Very High

ConditionsConditions ActionsActions

IF <all conditions> = True THEN <execute these actions>

WorkflowPolicies

WorkflowPolicies

RuntimeEvents

RuntimeEvents

Custom Control

Custom Control

Page 8: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

8 of 50Copyright © 2007, Oracle. All rights reserved.

Requirements for Workflow Policies

Enable the Workflow Management component group Select Administration > Server Configuration > Enterprises >

Component Groups

Workflow Component Definitions

Page 9: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

9 of 50Copyright © 2007, Oracle. All rights reserved.

Workflow Component Definitions

Workflow Component Group consists of six server component definitions

Page 10: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

10 of 50Copyright © 2007, Oracle. All rights reserved.

Steps for Defining a Workflow Policy

2. Create a Workflow Policy Action

3. Create a Workflow Policy

1. Create a Workflow Group

4. Generate Database Triggers

5. Start Workflow Monitor Agent

0/5

Page 11: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

11 of 50Copyright © 2007, Oracle. All rights reserved.

Invoking via Runtime Events

A runtime event responds to an action or occurrence from a single user within a single user session

WorkflowPolicies

WorkflowPolicies

RuntimeEvents

RuntimeEvents

Custom Control

Custom Control

Page 12: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

12 of 50Copyright © 2007, Oracle. All rights reserved.

Run-Time Events

Are a mechanism that allows customer-configured processing to be triggered by user activity

Consist of: A specification of some user activity such as:

Record being updated Navigating to/from an applet

The resultant processing Workflow One or more calls to business services

Known as an action set

Page 13: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

13 of 50Copyright © 2007, Oracle. All rights reserved.

Examples of Runtime Events

Event Object Type: Buscomp

Event: WriteRecord

Event Object: <Buscomp_Name>

Event Object Type: Buscomp

Event: PreDeleteRecord

Event Object: <Buscomp_Name>

Event Object Type: Buscomp

Event: CopyRecord

Event Object: <Buscomp_Name>

Page 14: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

14 of 50Copyright © 2007, Oracle. All rights reserved.

Run-Time Events Continued

Can be defined for three types of objects: Application

Examples: logging in, logging out

Applet Examples: displaying an applet, displaying a record

Business component Examples: Querying, deleting a record, setting a field value

Are fired when a user performs the corresponding activity

Page 15: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

15 of 50Copyright © 2007, Oracle. All rights reserved.

Business Component Events

Business component events often come in pairs such as: PreDelete/Delete PreSetField/SetField PreWriteRecord/WriteRecord

The Pre- event is fired immediately prior to object manager executing the operation Example: PreWriteRecord executes customer processing before

the record is saved Allows for possible verification of field values

The other event is fired immediately after the object manager executes the action Example: WriteRecord executes customer processing after the

record is written Allows for follow-on processing after a record is saved

Page 16: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

16 of 50Copyright © 2007, Oracle. All rights reserved.

Adding a Run-Time Event to a Workflow Process

A run-time event can be added to a workflow process as a condition on the connector out of a: Start step

Used to invoke the workflow

Wait step Used to resume the workflow

User interact step Used to resume the workflow

Add run-time event here

Add run-time event here

Page 17: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

17 of 50Copyright © 2007, Oracle. All rights reserved.

Example: This workflow process changes the SR priority to High when Area = Network

The process is invoked when a service request is created or updated and then saved

Example of a Runtime Event in Workflow

Runtime event defined here

Page 18: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

18 of 50Copyright © 2007, Oracle. All rights reserved.

Using Run-Time Events in Workflow Continued

Specify the triggering event in the detail applet for the workflow step branch following the Start step

Business Component Events are most common for invoking Workflow processes Example: Specify an action that occurs to a field in the BC which

will invoke the process

Select type of event

Specify BusComp to monitor for the event

Specify event to monitor

Page 19: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

19 of 50Copyright © 2007, Oracle. All rights reserved.

Invoking a Workflow Using a Run-Time Event

0/3

1. Add the Run-Time Event

2. Deploy and Activate the Workflow

3. Reload the Run-Time Events

Page 20: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

20 of 50Copyright © 2007, Oracle. All rights reserved.

1. Add the Run-Time Event

Create the workflow process as usual Select the connector to attach a run-time event

Must be a start, wait, or user interact step In the properties window, specify the triggering event Caution: A workflow with a run-time event on the start step

cannot be tested with the workflow simulator

Select connector

Specify the event type, business component, and event to monitor

1/3

Page 21: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

21 of 50Copyright © 2007, Oracle. All rights reserved.

2. Deploy and Activate the Workflow

In Siebel Tools, deploy the event In the Siebel client, activate the event

2/3

Page 22: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

22 of 50Copyright © 2007, Oracle. All rights reserved.

2. Deploy and Activate the Workflow Continued

Activating the event automatically registers the run-time event and associated workflow with the Siebel run-time event engine Creates an action set that invokes the Workflow Process Manager

2/3

Row ID of activated workflow Business Service,

method to invoke

Arguments to pass in

Page 23: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

23 of 50Copyright © 2007, Oracle. All rights reserved.

3. Reload the Run-Time Events

Navigate to Administration - Runtime Events > Events Select Menu > Reload Runtime Events

Updates the run-time event engine with the new run-time event Not necessary to query for the specific run-time event

Run-time event created by activating the workflow process

3/3

Page 24: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

24 of 50Copyright © 2007, Oracle. All rights reserved.

Invoking Workflow Processes via Custom Control

Use Control User Properties to customize application behavior User clicks a button on an applet that launches a Workflow

process

WorkflowPolicies

WorkflowPolicies

RuntimeEvents

RuntimeEvents

Custom Control

Custom Control

Page 25: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

25 of 50Copyright © 2007, Oracle. All rights reserved.

Example of Invoking from Custom Control

If Currency is USD, set price list to Americas Price List Specify Workflow process to invoke in the Control User Properties

for the control

Page 26: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

26 of 50Copyright © 2007, Oracle. All rights reserved.

Invoking Workflows Using a Custom Control

User explicitly clicks a custom button or menu item to invoke the workflow

Configuration involves applet user properties

Custom menu item that invokes a workflow

Page 27: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

27 of 50Copyright © 2007, Oracle. All rights reserved.

Invoking a Workflow Using a Custom Menu Item

Create a command object Specify a value for the Method property

Add an applet method menu item to reference the command

Page 28: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

28 of 50Copyright © 2007, Oracle. All rights reserved.

Invoking a Workflow Using a Custom Menu Item Continued

Add a new Applet User property that associates the workflow to be invoked with the new named method

Invoke this business service and method and …

… pass in these pairs of argument names and values

Page 29: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

29 of 50Copyright © 2007, Oracle. All rights reserved.

Invoking a Workflow Using a Custom Button

Create a custom control for the button Specify a value for the Method Invoked property

Add a new Applet User property that associates the workflow to be invoked with the new named method

Create an applet user property specifying the workflow to execute when the named method is invoked

Specify a user-defined name for a Method to invoke

on the control

Page 30: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

30 of 50Copyright © 2007, Oracle. All rights reserved.

Invoking a Workflow Process Explicitly

The Workflow Process Manager business service can be referenced explicitly: In a script As parameters in declarative configuration

Developers must specify: The name of the business service and method The name of the workflow process and other parameters as input

arguments Often the RowId parameter must be passed in

Page 31: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

31 of 50Copyright © 2007, Oracle. All rights reserved.

Invoking a Workflow Process Explicitly Continued

A workflow process can also be executed using the business service simulator Is an alternative way of testing new workflows

Business service that executes workflow processes

Provide name of workflow process as input argument

Page 32: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

32 of 50Copyright © 2007, Oracle. All rights reserved.

Generate Triggers

Required Not Required Not Required

WF Monitor Agent

Required Not Required Not Required

Runtime Event Not Used Invokes process Not Used

Synchronous Asynchronous (runs in background)

Synchronous (runs in user session)

Synchronous (runs in user session)

Runs on Mobile Client

No (runs on Siebel Server)

Yes Yes

Comparing Different Methods

WorkflowPolicies

WorkflowPolicies

RuntimeEvents

RuntimeEvents

Custom Control

Custom Control

Use different methods for different needs

Page 33: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

33 of 50Copyright © 2007, Oracle. All rights reserved.

Which method is best for each scenario?

1. Send out a welcome letter each time a new account is created

2. Send out welcome letters at the end of the day to all new accounts that were created that day

3. Send an email alert to the manager when SR Status = Critical

4. Send an email alert to the manager when SR Status = Critical for more than 1 hour

5. Click Send Info (a new button) on the Account screen to send an account summary to the Team Lead

Workflow Scenarios

WorkflowPolicies

WorkflowPolicies

RuntimeEvents

RuntimeEvents

Custom Control

Custom Control

Page 34: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

34 of 50Copyright © 2007, Oracle. All rights reserved.

Administration, Monitoring, and Diagnostics

Detailed information allows better tracking and managing of workflow instances

Policy and Frequency Analysis View

Workflow Instance Monitoring View

Workflow Instance Deployment View

0/4

Workflow Instance Admin View

Page 35: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

35 of 50Copyright © 2007, Oracle. All rights reserved.

Workflow Instance Deployment View

Used to set Monitoring Level for Workflow processes Parameter changed at runtime—no need of server restart

1/4

Monitoring Level

Page 36: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

36 of 50Copyright © 2007, Oracle. All rights reserved.

Understanding Monitoring Level

Performance impact Monitoring level introduces performance overhead Recommended production setting is 1-Status

* In Debug mode, data is written to disk after every step

* In Detail, data is written at the end

Levels Record Process Instance

Record Step Instance

Record Process Properties

Performance Impact

0-None N None None None

1-Status Y None None 5%

2-Progress Y All Steps None 25%

3-Detail* Y All Steps All steps 60%

4-Debug* Y All Steps All Steps 75%

1/4

Page 37: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

37 of 50Copyright © 2007, Oracle. All rights reserved.

Policy and Frequency Analysis View

Used to display a log of all the policies executed in a single group monitored by Workflow Monitor Agent

Provides information about the number of times a Workflow policy executes and execution trends Log: Lists Workflow policies Chart: Displays execution frequency of a selected policy in chart

form

2/4

Displays executed policies in top applet, frequency chart in

bottom applet

Page 38: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

38 of 50Copyright © 2007, Oracle. All rights reserved.

Workflow Instance Admin View

Lists all instances in Running, Waiting, or Error states Allows manual recovery

3/4

Workflow Instance Admin View

Lists all process properties data

Lists all persisted instances

Lists all related instances

Page 39: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

39 of 50Copyright © 2007, Oracle. All rights reserved.

Workflow Instance Monitor View

Lists all instances whose monitoring levels are set Integrated with chart server to display aggregate information

4/4

Process Instances applet shows detail

Workflow Instance Monitor view

Page 40: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

40 of 50Copyright © 2007, Oracle. All rights reserved.

Module Highlights

Workflow processes are executed in the Workflow Process manager in either the application object manager or in a server component Can be executed either synchronously or asynchronously

A workflow process can be invoked by a variety of mechanisms Run-time events Custom buttons and menu items Workflow policies

Run-time events are a mechanism that allows customer-configured processing to be triggered by user activity

Page 41: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

41 of 50Copyright © 2007, Oracle. All rights reserved.

Lab

In the lab you will: Invoke a workflow from a custom menu item Invoke a workflow using a run-time event

Page 42: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

42 of 50Copyright © 2007, Oracle. All rights reserved.

Appendix

Steps for Defining a Workflow Policy

Page 43: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

43 of 50Copyright © 2007, Oracle. All rights reserved.

Steps for Defining a Workflow Policy

2. Create a Workflow Policy Action

3. Create a Workflow Policy

1. Create a Workflow Group

4. Generate Database Triggers

5. Start Workflow Monitor Agent

0/5

Page 44: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

44 of 50Copyright © 2007, Oracle. All rights reserved.

1. Create a Workflow Group

A workflow group is a collection of workflow policies that are monitored concurrently

To create a workflow group, select Administration - Business Process > Policy Groups

Monitor high frequency policies

1/5

Page 45: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

45 of 50Copyright © 2007, Oracle. All rights reserved.

2. Create a Workflow Policy Action

Actions initiate a workflow process One policy can initiate several actions One action can be reused by several policies

To create an action, select Administration - Business Process > Actions

Specify Run Workflow Process program

Specify workflow process to invoke

2/5

Page 46: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

46 of 50Copyright © 2007, Oracle. All rights reserved.

3. Create a Workflow Policy

To create a workflow policy, select Administration - Business Process > Policies

3/5

Associate action to invoke workflow process

Workflow process to be invoked by policy

Create policy

Page 47: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

47 of 50Copyright © 2007, Oracle. All rights reserved.

Triggering Policy Actions

All conditions must be met and the policy duration must be satisfied to trigger the workflow policy actions

Duration set to zero means policy is triggered as soon as the conditions are met

Page 48: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

48 of 50Copyright © 2007, Oracle. All rights reserved.

4. Generate Database Triggers

Workflow policies use database triggers to identify which records satisfy policy conditions A trigger is a process or a stored procedure attached to a table

that fires when a specified data modification event occurs When a trigger fires against a Policy Condition, a record is

inserted in the Escalation Request Table (S_ESCL_REQ) S_ESCL_REQ contains all the rows in the database that could

trigger a policy to take action

4/5

Generate DatabaseTriggers

Record is inserted, updated, or deleted

S_ESCL_REQTable updated

Page 49: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

49 of 50Copyright © 2007, Oracle. All rights reserved.

4. Generate Database Triggers Continued

To generate triggers, select Administration - Server Management > Jobs

Create new Job and select Generate Triggers

Specify parameters

Click Start to start Component Job

4/5

Page 50: 37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.

50 of 50Copyright © 2007, Oracle. All rights reserved.

5. Start Workflow Monitor Agent

Monitors all policies within a single Workflow group Create a custom Workflow Monitor Agent component definition to

specify a Workflow group Alternatively, start Workflow Monitor Agent using the Server

Manager command-line interface

5/5

Select custom Workflow Monitor Agent component definition

Include parameter for the Group Name for this Workflow Monitor Agent