38 Workflow Policies

download 38 Workflow Policies

of 24

Transcript of 38 Workflow Policies

  • 7/31/2019 38 Workflow Policies

    1/24

    38Copyright 2007, Oracle. All rights reserved.

    Module 38: Using Workflow Policies

    Siebel 8.0 Essentials

  • 7/31/2019 38 Workflow Policies

    2/24

    2 of 24Copyright 2007, Oracle. All rights reserved.

    Module Objectives

    After completing this module you should be able to:

    Create a workflow policy that invokes a workflow process in theWorkflow Process Manager server component

    Enable the workflow policy using workflow server components

    Why you need to know:

    Some workflow processes are best executed asynchronously onthe Siebel server

  • 7/31/2019 38 Workflow Policies

    3/24

    3 of 24Copyright 2007, Oracle. All rights reserved.

    Asynchronous Workflow Processing

    Some workflows need to be executed asynchronously

    They might run for a long time and should not execute in the usersobject manager

    They might need to wait for the invoking condition to be satisfiedfor some period of time

    Example: If a critical service request remains unassigned for more

    than two hours, notify the service manager and set the priority to High Workflow policies are a mechanism for asynchronous execution

    of workflow processes

  • 7/31/2019 38 Workflow Policies

    4/24

    4 of 24Copyright 2007, Oracle. All rights reserved.

    Workflow Policies

    A workflow policy is a rule consisting of:

    One of more policy conditions

    A policy action

    Action is invoked when all conditions are true

    Example: When a service request priority = Critical ANDsubstatus = Unassigned:

    Send urgent message to service manager

    Conditions:Substatus = UnassignedService Request Priority = Critical

    Actions:Update priority to HighSend message to service manager

    IF True then execute

    WorkflowPolicy

  • 7/31/2019 38 Workflow Policies

    5/24

    5 of 24Copyright 2007, Oracle. All rights reserved.

    Workflow Policy Conditions

    Policy condition specifies a logical relationship between a

    workflow policy column and a value All policy conditions must be satisfied for a condition to apply

    Policy may have a duration specified

    Conditions must apply for the duration before the action isexecuted

    Conditions:Status = OpenService Request Priority = High

    Actions:Update priority to Very HighSend message to owner

    IF True for at least two hours then execute

    WorkflowPolicy

    Duration = 2hours

  • 7/31/2019 38 Workflow Policies

    6/24

    6 of 24Copyright 2007, Oracle. All rights reserved.

    Workflow Policy Actions

    A workflow policy action is the response to be executed

    Consists of: Type of program to be executed

    Examples: Run workflow process, send email, send messagebroadcast

    One or more program-specific arguments

    Multiple types of programs are supported Not restricted to running workflow processes

    Actions are defined separately

    Can be used in multiple workflow policies

  • 7/31/2019 38 Workflow Policies

    7/247 of 24Copyright 2007, Oracle. All rights reserved.

    Workflow Policies

    Leverage:

    A separate server component known as the Workflow ProcessManager component

    Is a server component optimized for executing workflows

    Behaves like an object manager

    Can access the business and data layers

    Does not have a user interface for direct user interaction

    Database triggers:

    A trigger is a process or a stored procedure attached to a databasetable that fires when a specified data modification event occurs

    Are created by the Generate Triggers server component

  • 7/31/2019 38 Workflow Policies

    8/248 of 24Copyright 2007, Oracle. All rights reserved.

    Executing Workflow Policies

    Generate Triggers creates the database triggers required tomonitor conditions in policies

    Workflow Monitor Agent checks for fired triggers

    Identifies policy conditions that are satisfied

    Invokes the desired workflow process

    Workflow Process Manager executes the workflow process

    Execution is asynchronous

    Workflow

    Monitor Agent

    Server

    Request Broker

    Workflow

    Process Mgr

    SiebelDatabase

    Generate Triggers

    S_ESCL_REQEnd-user activity or server process

    EIM

    Create triggers correspondingto policy conditions Triggers fire when

    conditions satisfiedand inserts record

    Retrieves records andexecutes the action

    Executes the workflowprocess specified in action

  • 7/31/2019 38 Workflow Policies

    9/249 of 24Copyright 2007, Oracle. All rights reserved.

    Workflow Policy Groups

    A workflow policy group is a collection of workflow policies thatare monitored as a group by a workflow monitor agent process

    Typically workflow policies that can be monitored at the samefrequency are assigned to the same policy group

  • 7/31/2019 38 Workflow Policies

    10/2410 of 24Copyright 2007, Oracle. All rights reserved.

    Prerequisite for Executing Workflow Policies

    Enable the Workflow Management component group on theenterprise

    Assign and enable the component group on a server

    Navigate to Administration - Server Configuration > Enterprises >Component Groups

  • 7/31/2019 38 Workflow Policies

    11/2411 of 24Copyright 2007, Oracle. All rights reserved.

    Workflow Component Definitions

    Workflow Component Group consists of six server componentdefinitions

    0/5

  • 7/31/2019 38 Workflow Policies

    12/2412 of 24Copyright 2007, Oracle. All rights reserved.

    Implementing a Workflow Policy

    0/5

    1. Create a Workflow Group

    2. Create a Workflow Policy Action

    3. Create a Workflow Policy

    4. Generate Database Triggers

    5. Start Workflow Monitor Agent

    1/5

  • 7/31/2019 38 Workflow Policies

    13/2413 of 24Copyright 2007, Oracle. All rights reserved.

    1. Create a Workflow Group

    Navigate to Administration - Business Process > Policy Groups

    Create a new policy group

    1/5

    2/5

  • 7/31/2019 38 Workflow Policies

    14/2414 of 24Copyright 2007, Oracle. All rights reserved.

    2. Create a Workflow Policy Action

    Navigate to Administration - Business Process > Actions

    Create a new action Specify Run Workflow Process

    Provide workflow process as an argument

    Specify the Run WorkflowProcess program

    Specify the workflowprocess to invoke

    2/5

    3/5

  • 7/31/2019 38 Workflow Policies

    15/2415 of 24Copyright 2007, Oracle. All rights reserved.

    3. Create a Workflow Policy

    Navigate to Administration - Business Process > Policies

    Create a new policy Specify conditions

    Add one or more actions

    Associate an action to invokethe workflow process

    Create a policy

    Create a condition

    3/5

    3/5

  • 7/31/2019 38 Workflow Policies

    16/2416 of 24Copyright 2007, Oracle. All rights reserved.

    3. Set Duration

    Set duration for the workflow policy

    All conditions must be metand

    the policy duration must besatisfied to trigger the workflow policy actions

    Defaults to 0

    The workflow policy actions are triggered as soon as the policyconditions are met

    3/5

    4/5

  • 7/31/2019 38 Workflow Policies

    17/2417 of 24Copyright 2007, Oracle. All rights reserved.

    4. Generate Database Triggers

    Run a Generate Triggers batch job to create database triggerscorresponding to the policy conditions

    When a trigger fires against a Policy Condition, a record is insertedin the Escalation Request Table (S_ESCL_REQ)

    S_ESCL_REQ contains all the rows in the database that couldtrigger a policy to take action

    Generate DatabaseTriggers

    Record is inserted,updated, or deleted

    S_ESCL_REQTable updated

    4/5

    4/5

  • 7/31/2019 38 Workflow Policies

    18/2418 of 24Copyright 2007, Oracle. All rights reserved.

    4. Generate Database Triggers Continued

    Navigate to Administration - Server Management > Jobs

    Create a new job Select Generate Triggers

    Specify parameters

    Submit job

    Create new Job andselect Generate Triggers

    Specifyparameters

    Click Submit Job tostart Component Job

    4/5

    5/5

  • 7/31/2019 38 Workflow Policies

    19/2419 of 24Copyright 2007, Oracle. All rights reserved.

    5. Start Workflow Monitor Agent

    Create a custom Workflow Monitor Agent component definitionto specify a Workflow group

    Monitors all policies within a single Workflow group

    Activate the new component definition to make it available

    5/5

  • 7/31/2019 38 Workflow Policies

    20/24

    20 of 24Copyright 2007, Oracle. All rights reserved.

    Verify the Workflow Policy

    Create a test record (or modify an existing record) that violatesthe policy condition

    Wait for at least the policy duration

    Verify that the desired workflow actions are executed

  • 7/31/2019 38 Workflow Policies

    21/24

    21 of 24Copyright 2007, Oracle. All rights reserved.

    GenerateTriggers

    Required Not Required Not Required

    WF MonitorAgent

    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 onMobile Client

    No(runs on Siebel Server)

    Yes Yes

    Comparing Different Methods

    WorkflowPolicies

    RuntimeEvents

    CustomControl

    Use different methods for different needs

  • 7/31/2019 38 Workflow Policies

    22/24

    22 of 24Copyright 2007, Oracle. All rights reserved.

    Module Highlights

    A workflow policy is a rule consisting of one or more conditionsand a policy action to be executed when the conditions aresatisfied

    Workflow policies implement asynchronous execution ofworkflow processes

    Workflow policies require the use of:

    Generate Triggers to create the database triggers

    Workflow Monitor Agent to check for fired triggers

    Workflow Process Manager to execute the associated workflowpolicy

  • 7/31/2019 38 Workflow Policies

    23/24

    23 of 24Copyright 2007, Oracle. All rights reserved.

    Lab

    In the lab you will:

    Create a workflow policy

    Enable the workflow management group components

    Test the workflow policy

  • 7/31/2019 38 Workflow Policies

    24/24

    24 f 24