Workflow Usage Best Practices 1226349559334573 8

  • View
    214

  • Download
    0

Embed Size (px)

Text of Workflow Usage Best Practices 1226349559334573 8

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    1/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Workflow best practices

    Author: Roman Agaev

    Date: Monday, May 14, 2007

    - -1

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    2/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Contents

    1 Abstract ............................................................................................................................4

    2 Workflow process ............................................................................................................6

    2.1 Workflow process diagram window ....................................................................6

    2.2 Workflow process properties ...............................................................................9

    2.3 Workflow process instance properties ...............................................................10

    2.4 Triggers for invocation .......................................................................................10

    2.4.1 Run Time Events .....................................................................................12

    2.4.2 Database triggers .....................................................................................12

    2.4.3 Scripting ..................................................................................................13

    2.5 Using workflow ..................................................................................................14

    2.5.1 Workflow work modes ...........................................................................14

    2.5.2 Useful Business Services ........................................................................16

    2.5.3 Design example .......................................................................................17

    2.5.4 Workflow simulation ..............................................................................242.5.5 Workflow deployment ............................................................................28

    2.6 Asynchronous invocation ...................................................................................31

    2.6.1 Logging paradigm ...................................................................................31

    3 Workflow policy ............................................................................................................32

    4 Workflow action ............................................................................................................33

    5 Workflow program ........................................................................................................33

    6 Workflow Process Manager Component ......................................................................34

    7 Conclusion .....................................................................................................................35

    7.1 Discussion ..........................................................................................................35

    8 Appendixes ....................................................................................................................35

    9 Indexes ...........................................................................................................................36

    - -2

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    3/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Tables

    Table 1-1: Functional implementation decision points.....................................................5

    Table 2-2: Useful Business Services................................................................................16

    Table 2-3: Design of new Workflow Process (example).................................................17

    Table 2-4: Workflow steps names (example)..................................................................19Table 2-5: Workflow's Siebel operation step's properties values (example)..................20

    Table 2-6: Workflow's Siebel operation step's values fro new entry (example).............22

    Table 2-7: Workflow's interactive step properties values (example)..............................23

    Table 2-8: Workflow connector's condition definition....................................................23

    Table 2-9: Simulation of new Workflow Process (example)..........................................24

    Table 2-10: Workflow deployment (example)................................................................28

    Figures

    Figure 1-1: The workflow diagram example (Verify Order/Quote).................................4Figure 1-2: Workflow development and deployment lifecycle.........................................6

    Figure 2-3: The Workflow process diagrma window with predefined steps capability...7

    Figure 2-4: Workflow decision point's condition criteria definition.................................8

    Figure 2-5: The example of Workflow's Stop step............................................................9

    Figure 2-6: Standard Workflow Process properties example..........................................10

    Figure 2-7: Expression Workflow Process property example.........................................10

    Figure 2-8: Workflow by script execution (server side)..................................................11

    Figure 2-9: Workflow policy concept architecture..........................................................13

    Figure 2-10: Workflow building blocks...........................................................................14

    Figure 2-11: New Workflow creation (example)............................................................18

    Figure 2-12: Workflow steps creation (example)............................................................19

    Figure 2-13: Workflow steps and its descriptive names (example)................................20

    Figure 2-14: Workflow's Siebel operation step definiton (example)..............................21

    Figure 2-15: Workflow's Siebel operation definition cont. (example)............................22

    Figure 2-16: Workflow's Siebel operation definition cont. (example)............................23

    Figure 2-17: Workflow's connector definition (example)...............................................24

    Figure 2-18: Prior simulation activity debugging options definition (example).............25

    Figure 2-19: Workflow's prior simulation properties population (example)..................26

    Figure 2-20: Workflow "Wait for simulation in progress" dialog box (example)..........26

    Figure 2-21: Workflow's simulation view (example)......................................................27

    Figure 2-22: Workflow's simulation completion (example)............................................28Figure 2-23: Workflow's deployment (example).............................................................29

    Figure 2-24: Workflow's deployment view (example)....................................................30

    Figure 2-25: Deployed workflow activation (example)..................................................30

    Figure 2-26: Workflow's Run Time Events reload (example)........................................31

    Figure 3-27: Workflow Policy architecture.....................................................................33

    Figure 5-28: Workflow Policy Program supported types................................................33

    Figure 5-29: Workflow Policy Program definition..........................................................34

    - -3

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    4/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    1 Abstract

    The main aim of the document is best workflow practices description and trying to

    route future implementation via the best way of such a capability usage.Generally workflow is declarative way of system programming when it includes all

    possibilities for common Siebel features invocation like Business service methods,

    Siebel internal operations, Inline expressions. The workflow framework provides a

    powerful way of process design and implementation handling when in fact manages

    common memory and instruction area for the process evaluation, the memory area

    allows usage of common parameters across the workflow process instance. The

    parameters handled as properties within the inbound propertyset of workflow wrapping

    business service invocator like Workflow Process Manager or EAI Business Integration

    Manager.

    The powerful side of workflow in some circumstances may become a disadvantage

    because of conceptual problem that assembles in terms of process finite property and as

    consequence potential discontiguity to a cross system processes.

    The workflow must be considered as capability of sophisticated processes orchestration

    rather than used as simple cases like field update handler.

    Figure 1-1: The workflow diagram example (Verify Order/Quote)

    The following table provides common decision point for evaluation of further

    implementation step implementation. In fact Siebel allows several approaches when

    dominant ones are common scripting (browser/server side) within several Siebel's

    architecture elements: Application, Applet, Business component, Business service and

    Workflow processing (interactive, service, long-running, 7.0 compatible).

    - -4

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    5/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Table 1-1: Functional implementation decision points

    Type Description When Useful Limitations

    Workflow

    Decision Step

    Kind of step in a

    Workflow that

    arbitrates between

    one or more

    alternative branches

    in a flow

    Each branch out of

    decision step has

    one or more

    conditions if all

    evaluate to TRUE

    for the branch the

    flow will continue

    down the branch

    Need a simple

    articulation of

    whether one or more

    alternative actions in

    flow should be taken

    Conditional

    expressions lack

    support for some key

    operators including:

    o AND

    o OR

    o Order of

    precedence control

    (such as parentheses)

    Scripted

    Business

    Services

    Script within a

    business service

    Action step that

    evaluates a

    potentially complex

    set of inputs and

    returns a simplified

    output that can be

    evaluated by a

    workflow decision

    step

    Workflow decision

    step semantics not

    sufficiently

    expressive to

    encapsulate decision

    criteria

    Undermine

    readability and

    simplicity of

    workflow by hiding

    logic within a

    service

    Other

    Specialized

    Rule

    Frameworks

    Other rule

    frameworks that

    may be leveraged

    directly or indirectly

    by a workflow

    o Personalization

    Rules

    o Assignment Rules

    - -5

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    6/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    The following figure shows common Workflow Process lifecycle:

    Figure 1-2: Workflow development and deployment lifecycle

    2 Workflow process

    The workflow process consists of several parts: Workflow process diagram window,

    Workflow process properties, and Workflow process instance properties.

    2.1 Workflow process diagram window

    The Workflow process diagram window in fact enables to create a workflow using

    predefined and bounded step definitions. The following figure shows the Workflow

    process diagram window with every predefined capability.

    - -6

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    7/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Figure 2-3: The Workflow process diagrma window with predefined steps capability

    Start the step indicated the workflow start/entry point. At this point all of the

    process instance properties are populated.

    Business Service the step allows execution of every possible method within

    every predefined Business Service. The attention needs to be paid in case of

    usage cacheable services thanks to disability of service reload during theworkflow session. The issue leads to possible non adequate call to desired

    Business Service method within the workflow instance1.

    Decision Point the step allows standard decision capability when evaluates

    expressions of outbound Connectors connected to it. The following figure

    shows the simple decision point definition.

    1 The situation may take a place in case of trying to execute several methods of the same cacheable

    Business Service during the same Workflow Process session

    - -7

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    8/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Figure 2-4: Workflow decision point's condition criteria definition

    Sub-process the step encapsulates the sub process invocation. Every sub

    process like its originator allows predefined and bounded list of potential

    workflow steps. Potentially every workflow may be an origin of hierarchical

    invocation. The possible problem may be encountered when this ability will be

    abused and over stack error will be raised up thanks to disability of system to

    handle a numerous number of started workflow instances within the same leaf

    of processing.The sub process invocation supports inbound and outbound

    properties thanks it's wrapping mechanism that provides an ability of usage non

    predefined data structure of potential inbound and outbound information.

    Siebel Operation the step allows an update, insert, and query operation over

    the Business Component from the context defined by Business Object chosen

    within the Workflow Process properties. The update operation may handle

    single update as well as multiple one.

    User Interact the step provides an ability of user server side redirection to the

    predefined view based on Business Component from within context defined by

    Business Object property of workflow definition. Such Business Component

    may be searched by any internal Siebel operation step of by provision Object Id

    property at the beginning of process instaciation2.

    2 The option is possible only within the interactive mode workflow

    - -8

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    9/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Wait the step allows suspending process execution by predefined period of

    time.

    Stop the step allows termination of process and in some circumstances may

    raise an error that led to this behavior.

    Figure 2-5: The example of Workflow's Stop step

    End the step indicates the last step within the workflow process instance. The

    step may not be executed in some circumstances when the Workflow Process

    instance was terminated or got an error and has proceeded via exception route to

    a Stop step within the workflow definition.

    Connector the branch enables connectivity between the steps within the

    process. The connector can be raised up according some condition like

    predefined custom or existed method over the business component firing. This

    operation supported by Run Time Events mechanism3.

    Exception the branch enables handling of errors that can occur within

    executed steps. The attention needs to be paid for cases when within the custom

    methods of Business Service try, catch paradigm has been used. The exception

    can help with handling different edge cases within the process execution.

    2.2 Workflow process properties

    Workflow process properties are set of predefined values that cannot be changed during

    Workflow Process lifetime. The key properties are:

    Auto Persist allows saving of workflow state credentials regarding the values

    of Persistence Frequency and Persistence Level properties. Mostly usable

    during development stage and allowed over any workflow mode except the

    Service mode.

    Workflow Mode the number of supported modes bounded by following list:

    Service, Interactive, Long Running, and 7.0 Compatible.4

    3 The mechanism allows usage of application triggers using simple concept of event participation.4

    In workflows with long running mode the "Auto Persist" property became to be very important thanksto fact, that this functionality allows resuming from its suspension. For further information please refer

    to appendixes section of the document.

    - -9

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    10/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Business Object allows using Siebel operation steps when creates a

    background context according the definition of the Business Object.5

    Persistence Frequency allows persistence mechanism of workflow processes

    Persistence Leveldetermines the level of persistence: Current Step, All Steps.

    2.3 Workflow process instance properties

    Workflow process instance properties exist during all its session. The properties in fact

    can be of the following data types: String, Binary, Date, Number, Hierarchy, and

    Integration Object when those types supported by workflow's invocator (Business

    Service). The properties can be propagated towards the workflow instance using Inputs

    argument (Propertyset) of Workflow Process Manager Business service's method

    (InvokeMethod). The attention needs to be paid in case of Hierarchy or Integration

    Object data types, when in those cases the information stored not in inline properties of

    Inputs object, but as its chain connected children6.

    The following figure shows the way of properties definition:

    Figure 2-6: Standard Workflow Process properties example

    Figure 2-7: Expression Workflow Process property example

    2.4 Triggers for invocation

    There are several ways of Workflow execution7:

    Script the execution using Workflow Process Manager or EAI Business

    Integration Business services8.

    5 The most useful and needed property within the workflow definition and design, because its usage

    allows effective work on Siebel business layer within the workflow without actual scripting.6 The propertyset within the Siebel system is the most sophisticated data type. This data type supports

    its serialization/deseriazation using internal Siebel's XML parser - XML Converter Business service.7 Not every possible ways of execution enumerated here, but the most usable.8

    The execution may be three different kinds: synchronous within the application object managerinstance main thread, synchronous within the workflow process manager instance separated thread,

    asynchronous within the workflow process manager instance separated thread.

    - -10

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    11/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Figure 2-8: Workflow by script execution (server side)

    Run Time Event the execution using run time events definition. This kind of

    execution uses workflow's connector branch as source of run time event 9.

    Workflow Action the execution using predefined Workflow Policy program -

    Run Workflow Process

    Signal the execution using the wrapping mechanism used within the Order

    Management for orchestration of several Workflow processes together.10

    Component job the execution directly by appropriate component. This kind

    of execution may be used for background processes.

    URL the execution by Siebel's application URL plus appropriate parameters.

    User Properties the silent execution by underlied Business Component's

    class. For example: Modify of installed Assets.

    The most typical ways of workflow execution are: Scripting, Run Time Events,

    Workflow Policy program.

    9 The meaning is that definition of connector's condition populated by process method name coming

    from within the applet definition and propagated by its Business Component.10 Fir further information please refer to Order Management Administration guide within Siebel

    bookshelf

    - -11

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    12/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    2.4.1 Run Time Events

    The concept says that there are events within several Siebel system elements and there

    is an ability of participation on those events. The following Siebel system elements

    publish events:Application, Applet, and Business Component.

    Run-time events allow the Siebel application to respond in real time to user actions.

    Run-time events can be specified in the branches for Start, Wait, or User Interact steps

    to start or resume a workflow process. The fields in the WF Step Branch applet that are

    used to define a run-time event are the following:

    Event Object Type

    Event Object

    Event

    Sub Event

    Event Cancel Flag

    When defining run-time events within a workflow process, a run-time event should not

    be repeated. You cannot use the same event more than once within a workflow process.

    Run-time events can be used for workflows that run within a user session. For

    workflows that span across multiple userslong-running workflowsuse user events

    instead.

    Run-time events should not be used to trigger long-running workflows because a run-

    time event is specifically attached to a single user and a single session. A run-time

    event is only for that single user, as it stems from Personalization functionality. Instead

    use an interactive workflow or a service workflow to handle the run-time event, then

    after processing it and validating it, generate a user event to notify a long-running

    workflow11.

    2.4.2 Database triggersThe concept says that instead of using direct participation for an application event the

    mechanism of database triggers and their results monitoring may be proposed as

    alternative solution for the same functionality like application triggers do but using

    indirect way of invocation.

    11 User events can be generated anywhere in the Siebel enterprise (wherever a Siebel business service is

    used) by calling the Workflow User Event business service. The Workflow User Event business serviceis used for one-way communication from the run-time client to the Workflow Process Manager server

    component.

    - -12

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    13/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    The whole concept consists of: Workflow Policy, Workflow Action, Workflow

    Program definitions and Workflow Agent, Workflow Monitor, Workflow Process

    Manager (or EAI Business Integration Manager) server components.

    The following figure shows high level of concept architecture:

    Figure 2-9: Workflow policy concept architecture

    The supported database triggers are: after insert, after update.

    The script of those triggers creates entries within S_ESCL_REQ table which is

    monitored by Workflow Monitor or Workflow Action agents. In case of policy

    definition satisfaction against the current system state the entry in S_ESCL_ACTION

    created and appropriate Workflow Program executed. In case of workflow being

    created with duration the S_ESCL_LOG table used as information holder before the

    actual execution time.

    2.4.3 Scripting

    The workflow can be executed from within the script. The script can be written within

    the Siebel system in the following places:

    Server Side:

    Application

    Applet

    Business Component

    Business Service

    - -13

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    14/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Browser Side:

    Application

    Applet

    Business Component

    Business Service (the usage of browser script within the business service

    in some circumstances difficult for maintenance)

    The execution may be done by the following Business services:

    Workflow Process Manager

    Workflow Process Manager (Server Request)

    EAI Business Integration Manager

    EAI Business Integration Manager (Server Request)

    Asynchronous Server Requests12

    2.5 Using workflow

    The sight over the workflow building blocks:

    Figure 2-10: Workflow building blocks

    2.5.1 Workflow work modes

    The Workflow Process defines several modes of its work: Interactive, Service, Long

    Running, and 7.0 Compatible.

    Interactive An interactive workflow is used for controlling user navigation

    between screens and across views. An interactive workflow is comprised

    12 The attention needs to be paid for a right dot notation within the argument population definition

    - -14

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    15/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    primarily of a set of user interact steps, and usually includes a runtime event.

    NOTE: An interactive workflow can run only in the context of a user session; it

    cannot run in the Workflow Process Manager server component. Interactive

    workflow processes can be controlled through the use of a synthetic event

    attached to explicit user interface buttons. A synthetic event is a specialized run-

    time event that is dedicated to controlling workflow navigation. Examples of

    synthetic events include Suspend, Resume, Next, and Back. Associated with

    buttons on the user interface, these synthetic events are interpreted by the

    Workflow engine to control workflow navigation by moving the user back or

    forward, and by suspending or resuming a workflow process.

    Service A service workflow process is a transient workflow. That is, it runs to

    completion in a short period of time, all at once without stopping or pausing for

    any other event or activity. A service workflow process cannot wait, not for run-

    time events, and not by pausing for time. A service workflow process cannot

    have user interact steps. A service workflow process can be part of any other

    type of workflow process as a subprocess. A service workflow process executes

    a set of operations upon invocation of an event. One example of a service

    workflow is a workflow for sending an email.

    Long Running A long-running workflow process is a persistent workflow

    that can last for hours, days, or months. An example of a long-running

    workflow process is an approval process that sends an order to an external

    system such as SAP, and then waits for a response. When building long-running

    workflow processes, use user events and not run-time events to trigger

    processes and resume instances13.

    7.0 Compatible - The 7.0 Flow workflow process mode provides backward

    compatibility for existing Siebel 7 (pre-7.7) workflows. If you have existing

    workflows and you upgrade to Siebel 7.7, these existing workflows become 7.0

    workflows by default. You should categorize all new workflows as service,

    interactive, or long-running. If no mode is specified for a workflow process, the

    mode is assumed to be 7.0 Flow. It is strongly recommended that you not use

    the 7.0 Flow mode for new workflow processes you create. As you create new

    workflow processes, make sure to specify a workflow process mode (other than

    7.0 Flow) so that 7.0 Flow is not assumed as the default mode.13 User Events created using Workflow User Event Business service.

    - -15

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    16/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    2.5.2 Useful Business Services

    The following table shows useful Business Services within the Siebel system:

    Table 2-2: Useful Business Services

    Business Service Description MethodsFINS Data Transfer

    Utilities

    Allows you to transfer data from

    source BC to a destination BC

    without script.

    DataTransfer

    GetActiveViewProp

    QueueMethod

    TryMockMethod.

    FINS Validator Validate data based on predefined

    rules. It is developed through

    Application Administration and

    not script. Also, supports custom

    messages.

    Validate

    FINS Dynamic UI

    Service

    Allows creating and rendering of

    read-only views with a single

    read-only applet based on user

    input. Administered through

    admin views and not script.

    AddRow

    DeleteRow

    SetViewName

    Outbound

    Communications

    Manager

    Automates sending notifications

    via fax and emails to contacts and

    employees.

    CreateRequest

    SendMessage

    SendSmtpMessage

    SubmitRequest

    Synchronous

    Assignment

    Manager Requests

    Automates assigning objects by

    using Assignment Manager rules.

    Assign

    Server Requests Allows sending of generic

    requests to the request broker. It

    can send it in three different

    modes: asynchronous,

    synchronous, or schedule mode.

    (Example, call a workflow but

    need to be asynchronous request)

    SubmitRequest

    CancelRequest

    Report Business

    Service

    Automates sending, scheduling,

    printing, saving, emailing reports.

    Also, automates administrativetasks such as synching new users.

    ExecuteReport

    DelOne

    DownloadReportGrantRoleAccess2Report

    - -16

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    17/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Business Service Description Methods

    GrantUserAccess2Report

    PrintReport

    RunAndEmailReport

    ScheduleReport

    SyncOne

    Asynchronous

    Server Requests

    Allows asynchronous requests for

    every server multi threaded

    component. The parameters of

    those requests passed using Siebel

    dot notation and stored in

    S_SRM_DATA table (in case of

    usage this kind of component

    execution the Workflow policy

    usage must be considered)

    SubmitRequest

    CancelRequest

    EAI XSLT Service AllowsXSLTinterpretation.

    Supports parameters injection.

    Doesn't support custom functions

    withinXSLT.

    Transform

    EAI Java Business

    Service

    Allows external Java package

    wrapping and usage of the Java

    code instead of Siebel native code

    for handling methods within the

    Business service

    2.5.3 Design example

    In this section you will create a new workflow process that creates an activity plan on

    an opportunity record and then navigates the end-user to a view to display the new plan.

    Table 2-3: Design of new Workflow Process (example)

    Step Summary

    1 Lock the Oppty (SSE) project

    2 Create a new workflow process

    3 Add steps to the workflow process

    4 Configure the Siebel Operation step

    5 Configure the User Interact step

    6 Complete the End step Open Siebel Tools and lock the project, Oppty (SSE).

    - -17

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    18/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Using the Siebel Tools Object Explorer, locate the Workflow Process objects

    and create a new record with the following properties: Name = Create Plan,

    Business Object = Opportunity, Workflow Mode = Interactive Flow, Project =

    Oppty (SSE)

    Figure 2-11: New Workflow creation (example)

    Open the workflow process designer by right-clicking on the new row and

    choosing Edit Workflow Process. Drag the following objects from the Palette to

    the Designer:

    Start

    Siebel Operation

    User Interact

    End

    - -18

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    19/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Figure 2-12: Workflow steps creation (example)

    Now you will give each step a meaningful name. Select each step and change its name

    as follows:

    Table 2-4: Workflow steps names (example)

    Step Name

    Start: Start

    Siebel Operation: Add Activity Plan to Oppty

    User Interact: Display Activity Plan

    End: End

    - -19

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    20/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Figure 2-13: Workflow steps and its descriptive names (example)

    Select the Siebel Operation (Add Activity Plan to Oppty) step in the Designer.

    You need to instruct the workflow about what operation you want to perform

    (for example, query, insert, or update) and which business component to use for

    the operation. Using the Properties Windows or WF Steps applet, set the

    following attributes for the step:

    Table 2-5: Workflow's Siebel operation step's properties values (example)

    Property Value

    Business Component Activity Plan

    Operation Insert

    - -20

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    21/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Figure 2-14: Workflow's Siebel operation step definiton (example)

    When you perform an Insert operation on a business component, you must supply a

    value for any required field in the business component. In particular, to insert a new

    Activity Plan, you must provide the name of the Activity Plan template. Select the

    Siebel Operation Step (Add Activity Plan to Oppty) step and right-click to display the

    menu. Note there are three choices at the bottom of the menu for configuring a Siebel

    Operation step. Choose the Show Fields option from the menu.

    - -21

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    22/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Figure 2-15: Workflow's Siebel operation definition cont. (example)

    Notice that the WF Steps applet was replaced by the Input Arguments applet. Add a

    new record to the Inputs Argument applet.

    Table 2-6: Workflow's Siebel operation step's values fro new entry (example)

    Field Name Type Value

    Template Literal Any valid activity template

    name. For HOR 7.7,

    Introductory Sales Call.

    For SIA 7.7, Consumer

    Account Approval.

    - -22

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    23/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Figure 2-16: Workflow's Siebel operation definition cont. (example)

    Now you can configure the User Interact step to display a view. Select the User

    Interact (Display Activity Plan) step. Using the Properties Window or the WF

    Steps applet, set the following:

    Table 2-7: Workflow's interactive step properties values (example)

    Property Value

    User Interact View Opportunity Activity Plan

    Now you must tell the workflow what event will denote the end of the User

    Interact step. For example, you might want to wait for the user to enter

    additional data before continuing in the workflow. For this example, you want

    to wait for the user to make and save a change to the Activity Plan record.

    Select the Connector between the User Interact and End steps. Use the WF Step

    Branch applet to set the following properties for the branch:

    Table 2-8: Workflow connector's condition definition

    Property Value

    Type Condition

    Event Object Type BusComp

    Event Object Activity Plan

    Event WriteRecordUpdated

    - -23

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    24/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Figure 2-17: Workflow's connector definition (example)

    Now that you have finished configuring the workflow, you will validate it for

    correctness. Right-click inside Designer and choose Validate from the menu. When

    the Validation dialog opens, press Start. If any error is reported, follow the instructions

    to fix it and repeat the validation until no errors are reported.

    2.5.4 Workflow simulation

    In this section you will test the new workflow process using the Simulator.

    Table 2-9: Simulation of new Workflow Process (example)

    Step Summary

    1 Verify Debug Options for launching the Simulation Client2 Set a process property for the Opportunity Id

    3 Launch the Simulator

    4 Step through the workflow using the Watch Window to monitor status

    - -24

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    25/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Figure 2-18: Prior simulation activity debugging options definition (example)

    Confirm that the Debug Options are correct by launching a test client using the F5 key.

    Navigate to the Opportunities List view in the session and get the row-id of one

    record.

    Return to Siebel Tools and right-click the Workflow Designer and choose Show

    Process Properties from the menu. Note that the bottom applet now displays the WF

    Process Props. Because this workflow is based on the Opportunity Business Object and

    attempts to add an Activity Plan to an existing opportunity, you need to specify an

    opportunity row-id for the simulation. Find the Object Id process property in the list

    applet and set its default value to the Opportunity row-id found in the prior step.

    - -25

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    26/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Figure 2-19: Workflow's prior simulation properties population (example)

    Close any running Mobile Client sessions now. You will not be able to use the

    Simulator if there are running sessions. Confirm there are no Siebel Client icons

    in the Task Bar before continuing.

    Right-click the Workflow Designer and choose Simulate from the menu.

    Click the Start button at the top of the Simulation applet. This will launch the Mobile

    Client executable. Wait for the Simulation In Progress dialog box to appear.

    Figure 2-20: Workflow "Wait for simulation in progress" dialog box (example)

    - -26

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    27/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Alt-tab to return to the Tools session. To make the session easier to use, you

    may wish to hide the Object Explorer and Properties Window. You may also

    wish to resize the Tools window so it not does cover the full display

    Figure 2-21: Workflow's simulation view (example)

    If the Watch Window is blank, right-click the Simulation applet and choose Watch

    Window from the menu. This will refresh the display. Click the Next Step button to

    move between the steps.

    After the Opportunity Activity Plan View is displayed in the Mobile Client, note that

    you cannot reach the End step by pressing the Next button. Since you specified a

    condition on the branch you must satisfy the condition before reaching the End step.

    Therefore, using the Mobile Client session make and save a change to the Activity Plan

    BusComp (for example, change the Planned Start Date or Description).

    Press Alt-Tab to return to Siebel Tools and click Next to complete the End step.

    When the last step is reached, the mobile client will display a dialog box reporting

    "Simulation terminated! Please check the watch window for details. Acknowledge the

    message and Alt-tab to return to Siebel Tools. Review the status field in the Watch

    Window

    - -27

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    28/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Figure 2-22: Workflow's simulation completion (example)

    2.5.5 Workflow deployment

    Now you are ready to deploy and activate the workflow. These steps are required beforethe new workflow can be called in the Runtime client.

    Table 2-10: Workflow deployment (example)

    Step Summary

    1 Deploy the workflow from Tools

    2 Activate the Deployed Workflow in the Runtime Admin Client

    3 Enable Monitoring in the Runtime Admin Client

    4 Reload Runtime Events in the Runtime Admin Client

    - -28

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    29/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Figure 2-23: Workflow's deployment (example)

    Launch the Runtime Administration Client using a short-cut or the F5 key.

    Connect using SADMIN or an equivalent admin account. Using Site Map,

    navigate to Administration-Business Process > Workflow Deployment. This

    will display the following view:

    - -29

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    30/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Figure 2-24: Workflow's deployment view (example)

    Query for the Create Plan process in the top applet named Repository Workflow

    Process. One row should be returned. Click the Activate button in the top applet.

    Now query for Create Plan in the lower applet. One row will be returned for every

    version that was activated for the process.

    Figure 2-25: Deployed workflow activation (example)

    In the lower applet named Active Workflow Process, set the Monitoring-Levelto 4-Debug. Now you can verify that a runtime event was created for this

    - -30

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    31/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    workflow. Using Site Map, navigate to Administration Runtime Events >

    Events.

    From the applet menu, choose Reload Runtime Events. Query for the method

    you are using to invoke the workflow (Subevent =EventMethodCreateActivityPlan). It should return one row.

    Figure 2-26: Workflow's Run Time Events reload (example)

    2.6 Asynchronous invocation

    One of the strongest capabilities of Siebel Workflow Processing is an ability of

    asynchronous invocation. An invocation triggered by appending a new entry within

    S_SRM_REQUESTtable using Asynchronous Server Requests business service.

    The invocation became to be much sophisticated when allows propagation different

    types of parameters for a workflow (or business service). The parameters propagation

    handled using S_SRM_DATA table, when Siebel system manages this table and opens

    as much as needed new entries in order to handle all of propagated information

    2.6.1 Logging paradigm14

    The monitoring of asynchronous processes not easy, but here we have a paradigm that

    uses database table as storage for potential component jobs thereby the monitoringbecame to be possible using database triggers.

    Siebel system provides powerful mechanism of database triggers administration using

    Workflow Policy, Workflow Action, and Workflow Program definitions in addition to

    Generate Triggers, Workflow Monitors, and Workflow Action server components.

    Generally the way logging can be described by following emphasizes:

    Create an appropriate Workflow Policy Object

    14 Paradigm - an abstract basic structure, of some tenure, in which knowledge is related within a given

    realm.

    - -31

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    32/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Create an appropriate Workflow Policy Column

    Attach those columns to a previously created Workflow Policy Object

    Create an appropriate Workflow Policy Program

    Check in your created objects to a server

    Create an appropriate Workflow Policy

    Create an appropriate Workflow Policy Action

    Associate previously defined Workflow Policy Program to a Workflow Policy

    Action

    Associate that Action to a previously defined Policy

    Run Generate Triggers server component's task with option of existed triggers

    deletion

    Run Generate Triggers server component's task with option of new triggers

    creation according their definition within Workflow Policy administration.

    3 Workflow policy

    Workflow Process and Runtime events ensure most events are captured at the business

    layer logic level. However there are business scenarios where the Workflow Policy

    Manager would be the best alternative. Workflow Policy Manager ensures business

    logic is captured at the data layer of Siebel architecture. Some examples of such

    scenarios would be when bulk data uploads happen via EIM or Data Quality cleaning

    happens in the data layer.

    The Workflow Policy mechanism based on usage of several elements within the Siebel

    system environment:

    DatabaseS_ESCL_REQ, S_ESCL_ACTION, S_ESCL_LOG plus triggers

    based on definition from Workflow Policy administration views within the

    Siebel application.

    Administration Workflow Policy Group, Workflow Policy, Workflow

    Action, Workflow Program, Workflow Policy Object, Workflow Policy

    Column.

    - -32

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    33/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Server components Workflow Monitor Agent (working simultaneously only

    on one Workflow Policy Group)15, Workflow Action Agent (working

    simultaneously only on one Workflow Policy Group).

    Figure 3-27: Workflow Policy architecture

    4 Workflow action

    The Workflow Action represents definition of action which is coming as consequence

    of Workflow Policy (database trigger) conditions fulfillment, the action provides an

    ability of Workflow Program execution.16

    5 Workflow program

    The Workflow Program defines program of execution in order to fulfill exact

    requirement within the Workflow Policy definition. For those purposes Workflow

    Program provides several types:

    15 The approach supports the work without the Workflow Action Agent, but the solution that includesWorkflow Action Agent potentially more scalable, because those components may be resided in

    different places within the Siebel enterprise.16 The check of conditions may occur immediately or within the time mentioned by Duration property

    of Workflow Policy.

    - -33

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    34/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    Figure 5-28: Workflow Policy Program supported types

    The most significant in many cases DB Operation and Generic Request Server types,

    when DB Operation allows immediate operation over the running data source and

    Generic Request Server allows running server component task on the application

    server.

    The following figure shows the Workflow Policy Program that allows workflow

    execution:

    Figure 5-29: Workflow Policy Program definition

    6 Workflow Process Manager Component

    Workflow processes can be executed in the background using the Workflow ProcessManager Server component. The Workflow Process Manager Server component is

    - -34

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    35/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    configured and optimized to run the Workflow Process Manager Business service. The

    Workflow Process Manager Server component acts as the object manager to run

    workflow processes, including all application logic within the workflow process. The

    Workflow Process Manager Server components act as the application object manager to

    run workflows. The Workflow Process Manager Server components are specialized

    server components configured and tuned to run workflow processes. Like all server

    components, the Workflow Process Manager Server components provide a multi-

    threaded environment. The Workflow Process Manager uses the Siebel Object Manager

    framework and runs workflows as a business service. The Workflow Process Manager

    hosts the Business Object layer and the Data Object layer. It is a scalable architecture

    with the ability to run multiple object managers and multiple tasks for each object

    manager17.

    7 Conclusion

    The Workflow Processing provides a powerful framework for handling many different

    types of functionality starting from regular Siebel System operations and finishing by

    sophisticated EAI operations across the environment.

    The Workflow Processing framework supports SOA approach. This support helps

    within certain processes where the process defined and designed as custom service

    which experiences almost no environment influence and become to be a difficulty in

    another certain occurrences where the process cannot be separated totally from the

    same environment influences.

    This statement leads to understanding that workflow provides an ability to create a

    stand alone process that gets the input arguments by value perform its activity and

    return an output parameters also by value18. In any case the workflow generally will

    encapsulate entire process (or its sub process) within itself.

    7.1 Discussion

    Considering above point Workflow Processing very useful in EAI processes, cause it

    suits very well the concept underlies Web Services, HTTP Request, Instant Messaging

    by JMS, MQSeries19 etc.

    17 The name Workflow Process Manager refers to both the Workflow business service (referred to asthe Workflow engine) and the workflow server components18

    During process activities the changes within system data source may be done as well as changes ofdifferent global parameters19 The processes for example: Submit Order, Modify Asset, Ungroup Order Items etc.

    - -35

  • 8/2/2019 Workflow Usage Best Practices 1226349559334573 8

    36/36

    Roman Agaev, M.Sc, PMP

    Owner, Supra Information Technology ltd.

    On other hand its usage problematic when it executed as response on some Siebel

    system element's event, because in this case its execution may be influenced from

    previously executed functional points or on other hand influence other functional points

    by its results.

    8 Appendixes

    "Siebel Business Process Designer Administration Guide", book of Siebel

    Bookshelf

    "Integration Platform Technologies: Siebel Enterprise Application Integration",

    book of Siebel Bookshelf

    "Technical Note 581 : Siebel 7.7 Workflow", article of Siebel (

    F:\Work Issues\

    WIND\Infrastructure)

    "Workflow on the fly monitoring solution", essay of Roman Agaev ()

    9 Indexes

    7.0Compatible..........................9, 14, 15

    Applet..................................4, 12, 13, 14

    Application.............4, 12, 13, 14, 16, 35

    Business component.............................4Business Object............8, 10, 18, 25, 34

    Business service............4, 10, 15, 17, 34

    Business Service.7, 9, 10, 13, 14, 16, 17

    Database........................................12, 32

    DB Operation......................................33

    diagram..............................................4, 6

    EAI Business Integration Manager......4,

    13, 14

    EIM......................................................32

    Generate Triggers.........................31, 32

    Generic Request Server......................33

    Interactive.................................9, 14, 18

    Long Running...........................9, 14, 15

    orchestration....................................4, 11

    Persistence.......................................9, 10

    Rule.......................................................5

    Run Time Event..................................11

    Run Time Events................9, 11, 12, 31

    Script...............................................5, 11Service......................7, 9, 14, 15, 16, 17

    Siebel Operation.....8, 17, 18, 19, 20, 21

    Signal...................................................11

    workflow..4, 5, 6, 7, 8, 9, 10, 11, 12, 13,

    14, 15, 16, 17, 18, 20, 23, 24, 25, 28,

    30, 31, 34, 35

    Workflow...1, 4, 5, 6, 7, 8, 9, 10, 11, 12,

    13, 14, 15, 17, 18, 19, 20, 21, 22, 23,

    24, 25, 26, 27, 28, 29, 30, 31, 32, 33,

    34, 35, 36

    Workflow Action....................13, 31, 32

    Workflow Process Manager....4, 10, 11,

    12, 13, 14, 15, 34, 35

    Workflow processing............................4

    Workflow Program...........13, 31, 32, 33