Difference Between ALERT and WORKFLOW

Difference Between ALERT and WORKFLOW, www.askhareesh.com


Alert
Workflow
Oracle Alert is a database event detection tool designed to detect database events.
Oracle workflow is designed to manage the execution complex of business processes that result from database events.
Oracle Alert does contain some workflow type features such as response processing, that allow a sequence of actions to be taken depending on a users response to a message. (Example : Approval sequence)
Oracle Workflows response processing capabilities are more advanced than Oracle Alert.



Workflow Override email address

It is very common requirement to stop workflow notifications going out of the system, particularly from Development instances and Test instances. Oracle have given a functionality “workflow override email address” to achieve this requirement.
In Many companies this task is done by Database Administrators (DBA) but incase you need to do it yourself you follow the below steps.
Login to Oracle Apps preferably with a user who is “Workflow System Administrator”.
Navigate to “Workflow Administrator Web Applications” Responsibility
Expand “Oracle Applications Manager”
Oracle Applications Manager
Click “Workflow Manager”
Oracle workflow service components
Click “Service Components”
Workflow notification mailer
Click “Workflow Notification Mailer”
Oracle set workflow override email address
Click “Set Override Address”
Oracle set workflow override email address
Source : http://erpschools.com

Workflow Topic wise

How to Launch Workflow from PL/SQL

How to Launch Workflow from PL/SQL

declare
v_itemtype VARCHAR2(50);
v_itemkey VARCHAR2(50);
v_process VARCHAR2(50);
v_userkey VARCHAR2(50);
begin
v_itemtype := 'DEMOWF';
v_itemkey := '1233';
v_userkey := '1233';
v_process := 'DEMOPROCESS';
WF_ENGINE.Threshold := -1;
WF_ENGINE.CREATEPROCESS(v_itemtype, v_itemkey, v_process);
wf_engine.setitemuserkey(v_itemtype, v_itemkey, v_userkey );
wf_engine.setitemowner (v_itemtype, v_itemkey,'SYSADMIN');
WF_ENGINE.STARTPROCESS(v_itemtype, v_itemkey);
commit;
exception when others
then
dbms_output.put_line(SQLERRM);
end;



Oracle Order Management workflow background process setup

Oracle Order Management workflow background process setup

The Workflow background engine processes deferred activities, notifications, wait activities and time out activities. We need to setup the Workflow background engine when setting up Workflow in our environment. Also we need to schedule the Workflow Background Process concurrent program to re-submit periodically.

When scheduling the concurrent program, specify the Order Management work item types as the parameter so that it will only pick up the activities or notifications for Order Management work items.

Schedule the Workflow Background Process concurrent program to resubmit periodically:
  • Define the Process Deferred parameter as Yes. Set all other parameters to No. Schedule this request to run most frequently.
  • Define Process Time-out as Yes, and all other parameters as No. This can run less frequently.
  • Define Process Stuck set to Yes and all other parameters as No. This can run less often.

Run the Workflow Background process from the system administrator responsibility
Use the Tools Menu and select the Workflow Status to view the current status of the workflow.
Submit the OEOH & OEOL (Header & line workflow) from database:
BEGIN
wf_engine.Background (itemtype=>'OEOH', -- ‘OEOL’
minthreshold => NULL,
maxthreshold => NULL,
process_deferred => TRUE,
process_timeout=> FALSE,
process_stuck => NULL);
END;

When an order header workflow is error out, how to retry the workflow for the order?
Go to workflow administrator, provide the item key (header_id) and submit to retry the WF for the corresponding order.

Oracle Workflows in Order Management

Oracle Workflows in Order Management

  • Oracle Order Management uses Oracle Workflow to control the sequence of events that occur in the processing of orders, quotes, sales agreements, returns, order lines, and return lines.
  • Oracle Workflow manages activities, executes functions, sends notifications, maintains completed activity history, detect errors, and initiates error processes.
  • Oracle Order Management seeded workflows and their associated activities are contained in oexwford.wft file.

The most commonly used Order header flows for outbound lines are:
  • Order Flow – Generic
  • Order Flow – Generic with Header Level Invoice Interface

The Order header flows for inbound lines are:
  • Order Flow – return with Approval
  • Order Flow – Return with Submission and Approval
  • Order Flow – Return with Approval and Header Invoicing

The most commonly used Order Line flows are:
  • Line Flow – Generic
  • Line Flow – Generic with Header Level Invoice Interface

The Order Line flows for inbound lines are:
  • Line Flow – Return for Credit Only
  • Line Flow – Return for Credit Only with Approval
  • Line Flow – Return for Credit with Receipt
  • Line Flow – Return for Credit with Receipt and Approval

  • The Transaction Type determines the header level process used at the header level on an order.
  • The Transaction Type window is used to assign the order flow to the order header Transaction type.
  • Use the Assign Line Flows button to assign line flows to the order header

  • The combination of order type/line type/item type determines the line workflow.
  • If you leave Item Type blank, the workflow applies to all item types for the line type (unless they have a specific assignment in this form).
  • In Process Name, select the workflow that Oracle Order Management should use for the order type/line type/item type combination.
  • If you do not assign a workflow to a configured item type, the configured item does not use a workflow.
  • You can perform all standard processing including orders, returns, drop-ship orders, Orders for configured items, and orders for assemble-to-order items using seeded workflows.

Check Order line Workflow Activity Status
SELECT COUNT (1)
INTO ln_completed_lines
FROM wf_item_activity_statuses a,
wf_process_activities b,
oe_order_lines_all c
WHERE a.process_activity = b.instance_id
AND b.process_item_type = 'OEOL'
AND b.activity_name = <‘Activity_Name’>
AND activity_status = 'COMPLETE'
AND item_key = TO_CHAR (c.line_id)
AND c.header_id = pin_order_header_id


Oracle Workflows interview Questions

Oracle Workflows interview Questions

· Workflow processes represent business process flows and information routing.
· Each workflow process consists of a set of activities and transitions.
· Activities can be process activities, notification activities, and function activities.
· The business process flow in Oracle Workflow can have decision points (branches), parallel flows, and loops.
· The Workflow Builder is a graphical interface for diagramming the workflow process.
· The Workflow Engine enforces and executes the workflow process and drives items through the workflow processes.
· The Workflow Monitor displays any instances/items and their status within a workflow process.
· The Workflow Definitions Loader loads the workflow definition from a flat file or from another database.
· Workflow Directory Services obtains the email addresses for roles from the directory repository.
· The Notification System sends out messages and solicits responses.
· The Workflow Engine is a PL/SQL program that resides on the server and drives items through workflow processes defined in Oracle Workflow.
· Each item has a set of attributed values that contains information about the
specific item. Each one of these items, with its own set of attribute values in the middle of the workflow process, is referred to as one instance of the
workflow process.
· Valid states of an activity are Active, Complete, Deferred, Error, Notified, Suspended, and Waiting.
· If the state is Error, the changes will roll back to the last savepoint and the error-handling process will be initiated.
· Active activities are deferred to the background Workflow Engine if the operating cost is higher than the threshold specified in the Workflow Engine.
· If an activity is completed, the Workflow Engine will issue a savepoint and the activities that depend on the completed activity will be set to Active, if appropriate.
· If Loop Reset is on and the Workflow Engine comes to an activity that has been executed, then all of the activities will be reversed; otherwise, the transition will be ignored.
· Workflow Engine APIs are found in the WF_ENGINE package.
· The CreateProcess API creates a new runtime process for an item of an instance.
· The StartProcess API begins execution of the workflow process.
· The CompleteActivity API notifies the Workflow Engine that an activity has been completed for an item.
· GetItemAttrInfo obtains type information about an item attribute.
· Oracle Workflow obtains information about a role from three views: WF_USERS, WF_ROLES, and WF_USER_ROLES.
· Groups of users, as well as individual users, are assigned to roles.
· The Email field in WF_ROLES is used if Expand Role is not checked; otherwise, the Email field of the users in the role will be used.
· To add more roles and users, you can use the three local tables:
WF_LOCAL_USERS, WF_LOCAL_ROLES, and WF_LOCAL_USER_ROLES.
· An item type consists of six components/objects: attributes, processes, notifications, functions, messages, and lookup types.
· The internal name of Workflow Builder components must be unique, typed in uppercase, and should not contain spaces.
· If there is more than one process attached to an item type, a selector is needed to select the correct process.
· Each notification activity must have an attached message.
· A message can have its own attributes, and a respond attribute will solicit users to select a valid respond value.
· You can attach a time-out to the notification activity. If time passes and a response is not received within the specified time, a <Timeout> transition will be executed.
· Lookup types are used to define lists of lookup codes. Result types must be lookup types.
· To monitor workflow and to view its progress, you can use either the Workflow Status form in Oracle Applications or the Java-based Workflow Monitor tool.
· There are two modes for both forms: ADMIN and USER.
· To diagram a workflow process, drag and drop activities into the Process window and draw lines between them by holding down the right mouse button.
· Fill in the performer for a notification activity.
· The Continue Flow function and Wait for Flow function work together to coordinate the master/detail process flow.
· The Oracle Applications Implementation Wizard—wizard for short—is a module in Oracle Applications that guides you through the setup steps of Oracle Applications.
· The Oracle Applications Implementation Method (AIM) is a methodology that guides you through every phase of the implementation process and is complemented by the Implementation Wizard.
· The process hierarchy ensures that the common setups are finished before the specific setups.
· Primary processes are common processes that span the entire application, requiring setup steps that cross multiple modules across the financial, distribution, and manufacturing product families.
· Secondary processes are common processes that cross modules within the product family.
· Final processes are processes that are specific to an individual module and have no cross-module dependencies. Enter the context for setup steps that are dependent on organization context. Organization contexts are Business Group, Set of Books, Operating Unit, and Inventory Organization. Start the implementation process by launching it through the Implementation Wizard form.
· If you are assigned a setup step through the wizard, you will receive notification through Workflow, and you can see the notification in the Notifications Summary form.
· You can complete the setup and respond with a Done result.
· You can respond with a Skipped result and ask the wizard to skip the setup steps.
· You can reassign the setup steps to another role.
· You can run the wizard installation process to ensure that the wizard is installed correctly.

Sample Interview Questions

1. When will an activity be deferred?
A. Activity cost = 0
B. Activity cost < Workflow Engine threshold
C. Activity cost > Workflow Engine threshold

2. What is the primary purpose of a workflow?
A. Routes information
B. Sends notifications
C. Creates audit trails
D Defines process rules

3. What job does the SetItemUserKey API perform?
A. Sets the unique identifier for an item
B. Sets the role to be notified
C. Sets the user-friendly identifier for an item
D. Sets the activity ID for an item

4. How will you define the possible results of an activity in order to drive different
transitions?
A. As item attributes for an item
B. As lookup codes for a lookup type
C. Separate the activity into two
D. Use a process activity

5. Time-out parameters apply to which activity?
A. Function
B. Process
C. Notification
D. All of the above

6. What will solicit responses from a notification activity?
A. Having a time-out parameter
B. Having a performer
C. Having a Send message attribute
D. Having a Respond message attribute

7. Which Work Engine API should you use to begin execution of an activity?
A. CreateProcess
B. StartProcess
C. ResumeProcess
D. BeginActivity

8. Which implementation process group comes before the product family
processes?
A. Common application processes
B. Product family processes
C. Product-specific processes
D Common financial

9. What is the proper format for an internal name in the Workflow Builder
component?
A. Uppercase
B. No spaces
C. Unique within item type
D. All of the above

10. Which of the following statements is true?
A. Role can be created in Workflow Builder.
B. A user is a role if it has at least one active responsibility.
C. A role can only have one user.
D. A user must be a role.

11. Which component in Oracle Workflow is the graphical interface for workflow
processes?
A. Workflow Builder
B. Workflow Engine
C. Workflow Monitor
D. Workflow Definitions Loader

12. When do you need a selector for an item type?
A. When you must perform role resolution
B. When performing a voting activity
C. When more than one process is associated with an item type
D. When multiple result codes are possible

13. What does the Workflow Engine do when a function activity has finished?
A. Issue a savepoint
B. Issue a commit
C. Generate a log file
D. Notify the user

Answer to the above Questions

1. C. Activity cost > Workflow Engine threshold
Explanation
An activity is deferred when the activity cost is greater than the Workflow Engine threshold. If the activity cost = 0 or if the activity cost is less than the Workflow Engine threshold, the activity will become Active.

2. A., B., D. Routes information, Sends notifications, Defines process rules
Explanation
The primary purposes of a workflow are to route information, send
notification, and define process rule. Although some history is maintained automatically by Oracle Workflow, it will not be considered as creating audit trails.

3. C. Set the user-friendly identifier for an item
 Explanation
 The SetItemUserKey API is used for setting a user-friendly identifier for an item.

4. B. As lookup codes for a lookup type
Explanation
 You define the possible results of an activity to drive different transitions using lookup codes for a lookup type. You cannot use item attributes. Separating the
activity into two does not make sense since you want to drive two transactions with the
same activity, but with two result codes. A process activity will not help in this scenario.

5. C. Notification
Explanation
 A time-out parameter only applies to a notification activity since the timeout
parameters are used to measure when a notification expires. It does not apply to a function activity or a process activity.

6. D. Having a Respond message attribute
Explanation
 Having a Respond message attribute will solicit responses from a notification
activity. The display name will become the prompt and the description will be the instruction. Nothing else, such as a time-out parameter, a performer, or a Send message attribute, will have an affect in soliciting responses.

7. B. StartProcess
Explanation
 The StartProcess API begins the execution of an activity. The CreateProcess API creates a new runtime process for an item. The ResumeProcess API resumes a suspended item. The BeginActivity determines if the specified activity may currently be performed on the item.

8. A. Common application processes
Explanation
Common application processes come before the product family processes,
which come before product-specific processes. Common financial is one of the product
family processes. It does not come before product family processes.

9. D. All of the above
Explanation
An internal name for a Workflow Builder component must be in uppercase,
have no spaces, and be unique within item type.

10. D. A user must be a role.
Explanation
 A user must be a role. A role cannot be created in the Workflow Builder. Having one active responsibility is not a requirement for a user to be a role. A role can
have more than one user.

11. A. Workflow Builder
Explanation
The Workflow Builder in Oracle Workflow is the graphical interface for workflow processes. The Workflow Engine drives items through workflow processes. The Workflow Monitor allows you to view and monitor workflow process instances and the Workflow Definitions Loader loads workflow definitions from a text file or database.

12. C. More than one process associated with an item type
Explanation
When you have more than one process associated with an item type, you need a selector to select a process. You use the Role Resolution standard activity to perform role resolution. Voting is another standard activity. Multiple result codes drive different transitions, but this is not related to the selector.

13. A. Issue a savepoint
Explanation

The Workflow Engine issues a savepoint when a function activity is completed. The Workflow Engine never issues a commit; the calling application issues a commit. The Workflow Engine does not generate a log file or notify users.


1   2   3   4   5   6   7   8   9   10   11   12   13   14   15   16   17

How to Incorporate Standard Activities in a Workflow Process

How to Incorporate Standard Activities in a Workflow Process,AskHareesh Blog for OracleApps

How to Incorporate Standard Activities in a Workflow Process

Oracle Workflow comes seeded with commonly used standard activities that you can use in any workflow process. The standard activities are:
  • And
  • Assign
  • Block
  • Compare Date
  • Compare Number
  • Compare Text
  • Continue Flow
  • End
  • Get Monitor URL
  • Loop Counter
  • NoOp
  • Or
  • Role Resolution
  • Start
  • Default Voting Message Yes/No
  • Wait
  • Wait For Flow

And
When multiple transitions flow into the And function activity, the And function activity is considered complete when all of the transitions are completed.

Assign
The Assign function activity has four attributes: Item Attribute, Date Value, Numeric Value, and Text Value. Use the Assign function activity to assign an item attribute specified in the Item Attribute value with the Date Value, Numeric Value, or Text Value. Determine whether to use the Date Value, Numeric Value, or Text Value based on the date type of the item attribute.

Block
The Block function activity blocks the activity until a complete activity API call is made.

Compare Date
The Compare Date function activity has two attributes: Test Value and Reference Value. Reference Value contains an item attribute. The Test Value is a constant. The Compare Date function activity compares the value of the item attribute in Reference Value to the constant in Test Value and produces results labeled Equal, Greater Than, Less Than, or Null (if the reference value is null). The Compare Date attributes are both of datatype Date.

Compare Number
The Compare Number function activity has two attributes: Test Value and Reference Value. The Reference Value contains an item attribute. The Test Value is a constant. The Compare Number function activity compares the value of the item attribute in Reference Value to the constant in Test Value and produces results labeled Equal, Greater Than, Less Than, or Null (if the reference value is null). The Compare Number attributes are both of datatype Number.

Compare Text
The Compare Text function activity has two attributes: Test Value and Reference Value. The Reference Value contains an item attribute. The Test value is a constant. The
Compare Text function activity compares the value of the item attribute in Reference Value to the constant in Test Value and produces results labeled Equal, Greater Than, Less Than, or Null (if the reference value is null). The Compare Text attributes are both of datatype Text.

Continue Flow
Continue Flow is used for master and detail coordination. The master process can start detail processes, and you can use the Continue Flow and Wait for Flow function activities to coordinate a process flow between master and details. The Continue Flow function activity signals the flow of a waited process to continue. The Continue Flow function activity has two attributes: Waiting Activity Label and Waiting Flow. The Waiting Activity Label identifies the label of the activity that was waiting for the completion of this Continue Flow function activity. Waiting Flow identifies whether the waiting activity is master process or a detail process.

End
The End function activity marks the end of a process. You can use it to return result codes. The End function activity is not required; it is only for visual purposes. Get Monitor URL The Get Monitor URL function activity retrieves the Workflow Monitor and stores the URL in the item attribute specified. You can use the other attribute, administration Mode, to specify whether the Workflow Monitor should be run in admin mode.

Loop Counter
You can use the Loop Counter function activity to limit the number of times the Workflow
Engine can transition through any particular activity. Use the Loop Limit attribute to specify the limit. If the loop limit is not reached, the activity completes with a result code of Loop; otherwise, the activity will complete with a result code of Exit.

NoOp
The NoOp function activity has no functionality. Use it as a placeholder in the workflow process.

Or
When multiple transitions flow into the Or function activity, the Or function activity is considered complete when any one of the transitions is completed.

Role Resolution
The Role Resolution function activity selects one user from a role with multiple users. You can use its Method attribute to specify whether you want the user to be selected based on the number of open notifications or just sequentially assigned. The first method is Load Balance and the second method is Sequential.

Start
The Start function activity marks the beginning of a process. The Start function activity is not required; it is only for visual purposes.

Default Voting Message
The Voting Message is a message you can use to create a notification activity that tallies responses from users or roles, depending on whether Expand Roles is checked. The message subject and the body make up the message that will be sent to the users or roles. It has a Respond message attribute with the internal name of RESULT.

You can specify the list of possible responses for this Respond message attribute using a specific lookup type. In the notification activity that uses the voting message, you must create a Number Type attribute with each possible response value as the name. These attributes will capture the percentages necessary for the response values to become the result. If the value of the attribute is set to Null, then the value will be treated as the default value. In other words, if you have two response values, Yes and No, and you have the attribute Yes set with a value 50 and the attribute No set as Null, anything less than 50 percent Yes will be a No.

You can specify the voting option using the Voting Option attribute. You can select Require All Votes to have the Workflow Engine tally all responses only after all votes have been cast. If not all votes are received before the notification times out, then the timedout transition is used. Tally on Every Vote instructs the Workflow Engine to keep a running tally after each vote is cast. If the notification times out, the response percentage to date is used. Wait for All Votes instructs the Workflow Engine to wait until all votes come in before tallying response percentages.

The only difference between this option and the Require All Votes option is that, if the notification times out before all of the votes came back, the Wait for All Votes option will still tally the response percentages before the time-out occurred.

Wait
The Wait function activity defines the specified waiting period for a response. It has six attributes. The wait mode specifies whether the wait is calculated by absolute date, day of month, day of week, relative time, or time of day. If the Wait mode is set to absolute date, enter the final date into the Absolute Date attribute. If the Wait mode is set to day of month, enter the day into the Day of Month attribute. If the Wait mode is set to day of week, enter the day of the week into the Day of Week attribute. If the Wait mode is set to relative time, enter the number of days you want to wait in the Relative Time attribute. If the Wait mode is set to time of day, enter the time of day into the Time of Day attribute.

Wait for Flow
Wait for Flow is used for master and detail coordination. The master process can start detail processes, and you can use the Continue Flow and Wait for Flow function activities to coordinate the process flow between the master and details. The Wait for Flow function activity signals the process flow to wait. The Wait for Flow function activity has two attributes: Continuation Activity Label and Continuation Flow. The Continuation Activity Label identifies the activity label that must be completed before the Wait for Flow function activity continues. The Continuation Flow activity identifies whether the waiting activity is a master process or a detail process.