You are on page 1of 24

WORKFLOWS veerendras

Workflows:
Documentation Process: 1) Use Case/ Functional Design Document Requirement will be coming through Functional Design Document or Use Case document 2) LLD (Low Level Design Document) In LLD, we need to provide the touch points (In which objects we need to do the changes and Approach for the requirement) about the requirement. 3) HLD (High Level design document) In HLD, we need to add more technical flavour about the requirement (What are the steps or business services or properties we need to provide for achieveing the requirement) 4) TDD (Technical Design Document) Original code should be available in TDD Note: Once TDD is approved from the Client, then we need to start our work 5) Test Cases Need to provide steps for testing process about the requirement 6) Tracability Matrix document Use Case / Functional document requirement sequence To Test Case sequnece

For business automation process Note: when ever the condition satisfies, the related action should perform Req: if Account Status = Active, new activity should be create for that account Req: If user clicks on Submit button in Quote List Applet, then an email should be forward to the related Primary Sales Rep
Veeru FACTORY veerendras

WORKFLOWS veerendras

Component Group: Workflow Management Workflow Process Manager Workflow Process Batch Manager Workflow Process Manager (Server Request) Generate Triggers Workflow Monitor Agent Workflow Action Agent Workflows are not related srf changes Workflows are based on Business Object

Workflow Modes: 7.0 Flowfor upgradation Long Running Flowif we use wait step in the design process Interactive Flowif we use User Interact step in the WF Note: takes the user from one view to another view using WF
Veeru FACTORY veerendras

WORKFLOWS veerendras

Service FlowGeneral WFs (Default Mode) Process Properties: Error Codesiebel generated error code will be displayed Error MessageCode related error text message Object IdCondition satisfied primary BC Record row id will be passed as input to the workflow through this process property Process Instance IdUnique Workflow Id Siebel Operation Object IdRow Id of the newly created record using Siebel Operation step will be stored in this process property Workflow Process Steps: Design Components: Start, Stop, End, Connectors, Exceptions Stop will throw the custom defined message in UI layer Exceptions will be used for error handling Decision Point: for checking the conditions Siebel Operation: will be used for query/update/insert operations in BC level
Veeru FACTORY veerendras

WORKFLOWS veerendras

Wait: For long running workflow User Interact: takes the user from one view to another view

Sub Process: Workflow with in a workflow If condition is checking in BC1 and if we are executing the action in BC2 which is not related to parent BO, then we need create a workflow based on BO2 and that workflow will be used as sub process in main workflow. Business Service: It executes its own functionality Ex: Outbound Communications Manager (For sending an email) Workflow Process Manager (For triggering the workflow) EAI Siebel Adapter (for converting property set to Siebel message/Siebel message to property set) Veeru FACTORY veerendras

WORKFLOWS veerendras Methods Arguments Note: Every business service will have its own methods and every method will have its own input and output arguments Validate Checking the connectivity between the components Simulate Testing/debugging the workflow by passing the row id as input to the workflow in Object Id process property Deploy Workflow definitions that have been created on Siebel tools side will be moved to client side (Administration level) WF object definitions will be inserted into S_WFR_PROC WF will become read only Status will change to Completed

Activate: WF definitions will be inserted into S_WFA_DPLOY_DEF Workflow Process Manager will identify the WF definitions from this table while invoking the workflow

Invoke: Invoking techniques:


Veeru FACTORY veerendras

WORKFLOWS veerendras

Runtime Events (if we want to trigger the workflow using Siebel provided events which triggers at runtime) Ex: SetFieldValue, WriteRecord Type: Synchronous Component: Workflow Process Manager Application should be open and user should do some action from UI layer Triggers from UI layer and Business Logic layer UPDATE S_ORG_EXT SET CUST_STAT_CD = Active WHERE ROW_ID=1-1 Note: Condition will be checking with in the workflow If we set the condition from back end, then runtime event will not be triggered

Policies Conditions and Actions (WF name that needs to be triggered) Triggers from data layer Application may not be open Type: Asynchronous Component: Workflow Process Manager
Veeru FACTORY veerendras

WORKFLOWS veerendras

Based on the condition, the related action will perform Note: Once the condition satisfies, then only WF will be triggered Scripting: Button Click Type: Synchronous Component: Workflow Process Manager For triggering the WF using button click in Asynchronous Mode Component: Workflow Process Manager (Server Request)

RCR (Repeating Component Request) For triggering the workflow based on time interval Type: Asynchronous
Veeru FACTORY veerendras

WORKFLOWS veerendras

Component: Workflow Process Batch Manager Ex: for every 1 hr workflow should be triggered for sending all the Submitted quotes information to external system for approval process Named Method (BC User Property) Type: Synchronous Component: Workflow Process Manager Note: without writing the code, we can call a workflow using button click from this user property

Requirement: -----------------If 'Account Status' is 'Active', then 'Type' should become 'Federal' -->Check Out 'Account' project 1) Select Workflow Process-->New Record Process Name Project UpdateAccountType Account Account

Business Object

Select Workflow-->Right Click-->Edit Workflow Process-->Connect the following steps

Veeru FACTORY veerendras

WORKFLOWS veerendras Check Status Step: Select the arrow between Decision Point and Siebel Operation-->Double Click on It and give the properties Compare To: Business Component Operation: All Must Match (Ignore Case) Object: Account Field: Account Status Values: Active -->Click on 'Add' button-->Click on 'OK' button Update Type Step: Select 'Siebel Operation'-->In 'Workflow Steps List Applet Business Component: Account Operation: Update -->Select 'Siebel Operation'-->Right Click-->Show Fields-->New Record Field Type Value Type Literal Federal Validation: Right Click on the designer window-->Validate-->Click on 'Start' button for validation Simulation: Select the Condition satisfied Row Id and add that row id for Object Id Process property.

-->Right Click the Workflow-->Simulate Deployment: Select the Workflow-->Click on 'Deploy' button Note: Status of the workflow changes to Completed and workflow becomes read only Veeru FACTORY veerendras

WORKFLOWS veerendras -->'Check In the Workflow Activation: Open Server Application-->Sitemap-->Administration - Business Process->Workflow Deployment-->Select 'UpdateAccountType' Workflow and Click on 'Activate' button Note: Once the Activation is done, Workflow will be available in Active Workflow Process List Applet. Invoking using Runtime events: 1) Check Out Account project 2) Select AccountUpdateType workflowClick on Revise button. 3) Select AccountUpdateType which is having version 1Right ClickEdit Workflow Process 4) Select the arrow between Start and Decision Point In Workflow Step Branch List Applet Event Object Type Event Object Event BusComp Account SetFieldValue 5) Select the WorkflowClick on Deploy button 6) Check In Account Project 7) Activate the workflow Reloading Runtime Events: SitemapAdministration Runtime EventsEvents Query for Event Object Type Event Object Event BusComp Account SetFieldValue Select the Eventfrom the Applet MenuClick on Reload Runtime Events Check the Results

Veeru FACTORY veerendras

WORKFLOWS veerendras

Requirement: When Account Status = Active, then Account Type should become Federal and New Activity should be create for that account with Type as Analyst, Status as In Progress and Description as Testing through Workflow

Design Process: Check Status Step: same as above Update Type Step: same as above Create Activity Step: Select 'Siebel Operation'-->In 'Workflow Steps List Applet Business Component: Action Operation: Insert -->Select 'Siebel Operation'-->Right Click-->Show Fields-->New Record Field Type Value Type Literal Analyst Status Literal In Progress Description Literal Testing Through Workflow Add the Event in workflow, Deploy, Check In the project Activate the Workflow and Re Load Runtime events Workflow Debugging Process/Error Handling: Veeru FACTORY veerendras

WORKFLOWS veerendras 1) Using Exceptions in Workflow 2) Increasing Monitoring Level from the Client Side 3) Writing Error Message into log file by writing custom business service 4) Checking the WfProcMgr log file C:\Sea77\siebsrvr\log Increasing Monitoring Level from the Client Side SitemapAdministration Business ProcessWorkflow DeploymentActive Workflow Process Select the workflow Monitoring Level: 4 - Debug Trigger the workflow Go to Administration Business ProcessWorkflow Instance MonitorSelect the WorkflowIn Step Instances view tab,we can able to see the result of each step used in the Workflow Requirement: When Service Request Status = Cancelled, the associated Activities should change to Cancelled Invoking using Policies: 1) Create Policy Group UpdateSRActivityPolicyGroup Sitemap-->Administration - Business Process-->Policy Group-->New Record Name: UpdateSRActivityPolicyGroup 2) Create Action -->we need to add workflow name -->Go to 'Actions'-->New Record Name Program Workflow Object UpdateSRActivityPolicyAction Run Workflow Process Service Request Arguments: Create new record Veeru FACTORY veerendras

WORKFLOWS veerendras Argument Value ProcessName UpdateSRActivity ---------------------------------------------------------------------3)Create Policy (Add the policy to the related Policy Group) Add Condition and Action -->Go to 'Policies'-->New Record Name Workflow Object Policy Group UpdateSRActivityPolicy Service request UpdateSRActivityPolicyGroup Conditions: New Record Condition Field Service Request Status

Operation =

Value Cancelled

Actions: New Record Action: UpdateSRActivityPolicyAction 4) Generate Triggers -->Which will add the policy condition to database Sitemap-->Administartion - Server Management-->Jobs-->New Record Component/Job Requested Server Generate Triggers RAM(Siebel Server Name) Job Parameters: Create following records Name Privileged User Privileged User Password EXEC

Value SIEBEL SIEBEL True

-->Click on 'Start' button to start the job. Wait until the status changes to 'Success' -----------------------------------------------------

5) Enable Workflow Monitor Agent Component


Veeru FACTORY veerendras

WORKFLOWS veerendras

Group Name: Policy Group Name Use Action Agent: True/false Sitemap-->Administartion - Server Configuration-->Enterprises->Component Definitions Query for 'Workflow Monitor Agent' -->Copy Record Component Alias Component Group UpdateSR UpdateSR Workflow Management Component Parameters: Parameter Value Sleep Time 1 Default Tasks 1 Group Name UpdateSRActivityPolicyGroup Select 'UpdateSR' Component-->Click on 'Enable' button and then 'Synchronize' button Note: when we synchronize, the component registration will be available for gateway server and enterprise sevrver. --> For effecting the policy changes, we should bounce siebel server( need to re- start the siebel services)

6) Enable Workflow Action Agent Component --------------------------------------------------------------IF 'SR STATUS = ' Cancelled' THEN RULE_ID '1-ABC' = TRUE INSERT INTO S_ESCL_REQ (BT_ROW_ID, RULE_ID, GROUP_ID...) Workflow` Policy Tables: S_ESCL_REQ S_ESCL_STATE S_ESCL_ACTN_REQ
Veeru FACTORY veerendras

WORKFLOWS veerendras

S_ESCL_LOG -----------------With Policy Duration and Use Action Agent = true When workflow triggers, a new record inserts into S_ESCL_REQ Table. Workflow Monitor Agent picks that record and inserts into S_ESCL_STATE. Once the end time is reached , WorkMon picks that record from S_ESCL_STATE table and inserts into S_ESCL_ACTN_REQ. When a new record inserts into S_ESCL_ACTN_REQ table, Workflow Action Agent picks that record and inserts into S_ESCL_LOG table. Note: Once the record is reached to S_ESCL_LOG table, then workflow triggering process completed successfully. With Policy Duration and Use Action Agent = false WorkMon picks the record from S_ESCL_REQ table and inserts into S_ESCL_STATE table.Once the end time is reached , WorkMon picks the same record from S_ESCL_STATE table and inserts into S_ESCL_LOG Without Policy Duration and Use Action Agent = true WorkMon picks the record from S_ESCL_REQ table and inserts into S_ESCL_ACTN_REQ table. When a new record inserts into S_ESCL_ACTN_REQ table, Workflow Action Agent picks that record and inserts into S_ESCL_LOG table. Without Policy Duration and Use Action Agent = false WorkMon picks the record from S_ESCL_REQ table and inserts into S_ESCL_LOG table.
Veeru FACTORY veerendras

WORKFLOWS veerendras

Note: Record count of S_ESCL_REQ or S_ESCL_ACTN_REQ tables should be 0. If not, the related component may be down or not enabled.
Requirement: When Service Request Status = Cancelled, the associated Activities should change to Cancelled

1) Check Out Service project Workflow Name BO Project UpdateSRActivity Service Request Service Check SR Status Step: Compare To: Business Component Object: Service Request Field: Status Value: Cancelled Query Activities Step: Select Query ActivitiesIn Workflow Steps window Business Service Name Business Service Method PRM ANI Utility Service QueryBusComp Select Query ActivitiesRight ClickShowInput Arguments Input Argument Type Value Business Component Literal Action Keep Context Literal Y Veeru FACTORY veerendras

WORKFLOWS veerendras Search Spec [&Object Id] + "'" Expression "[Activity SR Id] = '" +

Note: Copy the Search Specification syntax from Opportunity Assigned Notification Process workflow if requires Select Query ActivitiesRight ClickShowOutput Arguments Property Name Type Output Argument ActivityRecCount Output Argument Record Count Note: Need to create ActivityRecCount process property for storing Output of PRM ANI Utility Service Check Rec Count Step: Compare To: Process Property Object: ActivityRecCount Operation: Greater Than Value: 0 Update Step: Select Update siebel operation Business Component Action Show Fields: Field Name Status Type Literal

Operation Update Value Cancelled

Simulate the workflow


UpdateAccountActivity.xml

Invoking using RCR: Requirement: For every 2 hrs, workflow should be triggered and it should changes the Activity status to On Hold if the Service Request Status is Pending Design, Validate, Simulate, Deploy and Activate the workflow Veeru FACTORY veerendras

WORKFLOWS veerendras Invoking: SitemapAdministartion Sever ManagementJobsCreate new record Component/Job: Workflow Process Batch Manager Requested Server: RAM (Siebel Server Name) Repeating: True Job Details: Repeat Unit: Hours Repeat Interval: 2 Repeat From: Actual Start Job Parameters: Name Workflow Process Name Search Specification Value UpdateSRActivity-RCR [Status] = Pending

Click on Start button to start the RCR component Check the results For avoiding multiple times triggering process for a single record: 1) Add Flag field in Service Request BC Pre Default Value for this field should be N 2) Update Flag field value to Y in the Workflow. 3) Add the condition for RCR as [Status] = Pending AND [Flag] = N 4) Trigger the workflow
WORK FLOW USING INTERACTIVE STEP

When Account Status = Customer, then user should navigate to Account Details Activity View for checking the newly created activity.

Veeru FACTORY veerendras

WORKFLOWS veerendras

Workflow Mode: Interactive Flow GoToActivities Step: User Interact View: Account Detail - Activities View Note: Select the Arrow between User Interact and End step and change the connect type to Condition Simulate the workflow
Sending Email: When Quote Status is submitted, then email should be forward to Sales Rep and Sales Manager Workflow Name: SendQuoteEmail

Quote Step: BC Name Quote Show Search Spec: Operation Query

Veeru FACTORY veerendras

WORKFLOWS veerendras

Output Arguments:

Position Step: BC Name Position Operation Query

GetManagerEmail Step: Subprocess Name: GetQuoteManagerEmail Workflow Name: GetQuoteManagerEmail BO Name: Position

Veeru FACTORY veerendras

WORKFLOWS veerendras
Position Step: BC Position Operation Query

Note: Deploy GetQuoteManagerEmail (we need to deploy Sub process related workflow)

Sub Process Inputs:

SendMail Step:

Veeru FACTORY veerendras

WORKFLOWS veerendras
BS Name BS Method SendMessage Outbound Communications Manager Input Arguments:

Deploy, activate and invoke the workflow

Note: For identifying Communication Profile SitemapAdministration CommunicationsCommunication Drivers and Profiles Questions: 1) What are the workflow modes? 2) What are the Workflow Tables? 3) What are the pre defined process properties we need to provide for the workflow? 4) How to invoke Synchronous workflows and Asynchronous workflows Ans: Synchronous: Runtime Evetnts, Button Click, Named Method User Property Asynchronous: Policies, RCR 5) Do we need to compile the workflow if we create new process property? Ans: No (But, in Web Services we need to compile) 6) What is the default mode for the workflow? 7) How to invoke the workflow using button click in Asynchronous mode? Ans: Using Workflow Process Manager (Server Request) Component Veeru FACTORY veerendras

WORKFLOWS veerendras 8) What is the difference between Policies and Runtime Events 9) What are the components should be enabled and running when we invoke a workflow using policies? Ans: Workflow Process Manager, Workflow Monitor Agent, Workflow Action Agent 10) What are the policy tables? 11) Can we able to invoke a workflow without giving condition using policies? Ans: No 12) How to do error handling in workflows? Ans: a. Using Exceptions b. Using Custom Defined Business Service (which will write the Error Message into a log file) c. Setting the Monitorng level to 4-debug in Active Workflow Process (Need to check the results in Workflow Instance Monitor) d. From WfProcMgr log file (Path: C:\Sea77\siebsrvr\log) e. From WfProcBatchMgr (For RCR) 13) Can we able to raise custom defined error message in workflows? Ans: using Stop step 14) When we need to go for Sub Process? Ans: If we wanted to execute the Action in a BC which is binded to different BO. 15) Do we need to invoke the Sub Process related workflow? Ans: No. But we need to deploy the Sub Process Related Workflow 16) How to get the record count for a business component in workflows? Ans: Using PRM ANI Utility Service with Query BusComp Method 17) What is Generate Triggers? 18) While running Generate Triggers job, if we provide EXEC = Flase, what will happned? Ans: 19) If Workflow Monitor Agent is not enabled, what will be the impact on the workflow? Ans: The Record will be strucked in S_ESCL_REQ table. Workflow Veeru FACTORY veerendras

WORKFLOWS veerendras will not be triggered 20) Can we able to invoke the workflow using policies in Batch Process? Ans: Yes, if we provide the duration for the Policy 21) What is the Server Component for RCR? Ans: Workflow Process Batch Manager 22) Can we use Workflow Process Manager Server component for RCR invoking technique? Ans: No

Veeru FACTORY veerendras

You might also like