Account Generator

Overview of the Account Generator

Applications need to construct Accounting Flexfield combinations automatically for various purposes. The Account Generator feature uses Oracle Workflow technology to provide applications with the ability to construct key flexfield combinations automatically using customized construction criteria. Each site can customize how they want to build key flexfield combinations.

For information on implementing and using Oracle Workflow, see the Oracle Workflow documentation.

Benefits of the Account Generator using Oracle Workflow

Automatic construction of key flexfield combinations speeds users' data entry.

Automatic construction of key flexfield combinations improves accuracy of data entry because users do not need to determine what key flexfield combination to enter.

Each site can customize rules for the construction of key flexfield combinations to match the existing way of doing business.

By using Oracle Workflow features, the Account Generator provides greater flexibility for creating customized rules to create account combinations.

Important: Before using or customizing the Account Generator, you should familiarize yourself with the basic concepts of Oracle Workflow. For more information, see the Oracle Workflow documentation.

Terms

The following are some of the Oracle Workflow terms for objects used in the Account Generator feature, along with descriptions of how they relate to the Account Generator. You should read about these terms in the Oracle Workflow documentation first.

Item Type

An item type represents a grouping of a particular set of processes and components. Within an item type there can be up to six types of components: Attributes, Processes, Notifications, Functions, Messages, and Lookup Types. In an Account Generator, the most relevant components are Attributes, Processes, and Functions.

Attribute

There are two kinds of attributes, item attributes and activity attributes. Item attributes are properties of the item type, and activity attributes are properties of a function or activity. An item attribute value can be assigned to an activity attribute, but not vice versa.

Function

A function is a PL/SQL stored procedure which accepts standard arguments and returns a completion result. For example, a function can retrieve a value for a particular segment for a code combination.

Process

A process is a set of activities in a specific relationship. In the Account Generator, the process specifies the sequence of activities that are performed to create a code combination. A process activity can be part of a larger process, in which case it is called a sub-process. For example, the Oracle Assets FA Account Generator item type could contain a Generate Default Account process, which in turn contains three sub-processes: Generate Book Level Accounts, Generate Category Level Accounts, and Generate Asset Level Accounts.

Lookup Type

A lookup type is a static list of values. This list can be referenced by activities and by item type, message or activity attributes. For example, an activity can reference a lookup type for its possible result values.

Account Generator Process Diagram

A basic Account Generator process contains the following function activities, in the order:

Oracle provides standard Account Generator process function activities that are described later in this chapter, in addition to standard Workflow activities described in the Oracle Workflow documentation. Each product's Account Generator process may also include additional product-specific functions. See the product-specific documentation for details on a particular process.

Note: A top-level runnable Account Generator process is represented by an icon called "flexproc.ico", which has the image of two gears on a yellow background with a representation of a flexfield combination at the bottom. A subprocess is shown by the "process.ico" icon, which has two gears in a yellow background. You can differentiate between the two types of processes using these icons.

Related Topics

Standard Flexfield Workflow

How the Account Generator Works

Below is a description of the Account Generator flow:

Where the Account Generator Derives Segment Values

The Account Generator can derive segment values from form fields, other Accounting Flexfield combinations, flexfield segments, application tables, and constants.

Sources for values for the Account Generator

the picture is described in the document text

Form Fields

These are usually predefined by the application.

Same Accounting Flexfield Structure

You can get values from individual segments of Accounting Flexfield combinations whose structure matches the one you are building. You can specify which segment supplies the value using either the segment name or its flexfield qualifier, if any. You can assign such segment values to your key flexfield structure directly.

For example, you can get a segment value from one combination of an Accounting Flexfield structure and use it to build another combination for the same Accounting Flexfield structure.

Other Accounting Flexfield Structures

You can get values from individual segments of Accounting Flexfield structures other than the one you are building. You need to specify the structure number, and you can specify which segment supplies the value using either the segment name or its flexfield qualifier, if any.

Application Tables

You can get values from an application table.

Constants

You can specify a constant value for a segment of the key flexfield structure you want to build.

The Account Generator in Oracle E-Business Suite Products

Several Oracle E-Business Suite products use the Account Generator to create combinations for the Accounting Flexfield.

Each of these applications provides a default Account Generator process. You can view and customize the Account Generator processes through the Oracle Workflow Builder. Some products' default processes may require customization before they can be used to create flexfield combinations. The product-specific documentation contains detailed information on implementing the Account Generator for a particular product. It also contains information on the product's default Account Generator process as well as information on how you may want to customize the default process.

Overview of Implementing the Account Generator

Implementing an Account Generator process involves several steps:

Related Topics

Customizing the Account Generator

Test Your Account Generator Setup

Customizing the Account Generator

If you need to customize your application's default Account Generator, you should complete the following steps:

  1. Define your Accounting Flexfield structure(s) completely.

  2. Determine the characteristics of the Accounting Flexfield combination you want the Account Generator to construct (determine how the resulting flexfield combination should be populated).

  3. Work backwards from your resulting Accounting Flexfield combination to determine what values you need and how to obtain them.

  4. Specify additional attributes or functions you need, if any, and their properties, within the Oracle Workflow Navigator window.

  5. If necessary, modify the default Account Generator process(es) in the Oracle Workflow Process window. Alternatively, you could create a new process entirely. Which approach you take depends on the extent of your modifications. In either case, you should save a copy of your workflow process definition as a flat file (a .wft file) and check that file into a source control system.

    Important: If you have modified the default Account Generator process directly, you should ensure that your customizations are not overwritten when you upgrade to a future release. For more information, see the Oracle Workflow documentation.

  6. Test your Account Generator process, as outlined in the product-specific documentation. Determine if you get the expected resulting Accounting Flexfield combination.

  7. Assign the appropriate process to your Accounting Flexfield structure in the Account Generator Process window.

Determine Characteristics of Combination

Start by determining the characteristics of the Accounting Flexfield combination you want to obtain as your result. Then work backwards from your resulting Accounting Flexfield combination to determine what values you need and how to obtain them.

What is the purpose of this combination? For example:

What are the properties of this combination? For example:

Decide From Where Each Segment Derives Its Value

Did a segment value come from a form field, another combination of the same Accounting Flexfield structure, a segment of another key flexfield, an application table, a constant, or somewhere else?

Modify Your Account Generator Process

In customizing your Account Generator setup, you make modifications to the default process or create a new process using the Oracle Workflow Builder. For details on working within the Oracle Workflow Builder, see the Oracle Workflow documentation.

See the product-specific documentation for limitations on what you can and cannot customize. For example, you may not be allowed to customize a top level process, but only the subprocesses within it. Also, see if your product's Account Generator item type already includes attributes or functions you can use. Using pre-defined attributes and functions will save you time in your customization.

Save a copy of the original item type in a source control area as a flat file (.wft file) before beginning customizations. By saving the original as a flat file you can limit access to it, thus ensuring that you will always have a copy of the original file.

Important: If you have modified the default Account Generator process directly, you should ensure that your customizations are not overwritten when you upgrade to a future release. For more information, see the Oracle Workflow documentation.

Warning: You should never create a new item type as your Account Generator. Instead, start from the default Account Generator item type or a copy of it.

Important: You cannot modify the attributes or functions given to you in your default Account Generator item type. That is, you cannot select an attribute or function within the Navigator window and modify it. You can, however, modify the attributes of a function activity that is part of a process.

Warning: Do not change the threshold level of the Oracle Workflow Engine. All of your Account Generator functions should have low costs, so you should never need to change the threshold level.

Create a New Attribute

You can create a new attribute for your Account Generator item type, which you can then use in your custom process. Note that custom attributes cannot be "input" attributes, that is, their values cannot be set by the calling form or program. After you create a new attribute, you need to set its value by adding a function activity to your process. For example, if the value comes from another code combination you could use the Get Value from Code Combination function activity from the Standard Flexfield Workflow.

Modify Attributes of a Function Activity

You can modify the values passed to a function activity.

For example, suppose your default Account Generator process uses the standard function Copy Segment Value from Code Combination to copy a segment value from the default code combination. This function thus has "Default CCID" as the value for the attribute "Code Combination ID". However, suppose you want to use "Distribution CCID" instead of the "Default CCID". Assuming the Distribution CCID is available to the workflow, you would change function activity's attributes to use the Distribution CCID.

Add a Function Activity to a Process

You can change the logic of the process by adding functions to the process diagram. Predefined standard Account Generator functions are described later in this chapter. Your product may have additional predefined functions that you can use. For information on these, see the product-specific documentation.

For example, suppose that you are working within the Oracle Assets Account Generator item type. In your process, you want to check to see if any account is a Category Account. You would then add the Check Category Account function activity in the appropriate place in the process diagram. If a function requires values to be passed in as arguments, you need to ensure the proper values are set for the attributes of the function. Also, make sure that if you expect a result from the function, the result type is set properly, and any transitions from the function branch appropriately.

Warning: Oracle Workflow provides activities that in general, you should not add to your Account Generator, namely, Notification and Block activities, since these halt the process.

Warning: In general, avoid using parallel branches in your Account Generator process diagram. The Oracle Workflow Engine processes activities sequentially. If your process includes parallel branches that converge on a single function, you should ensure that that function is an AND function, so that all required activities are completed before the Engine continues to the next activity in the process.

Create a New Function Activity

You can create a new function activity and add it to your Account Generator item type. The Oracle Workflow documentation contains information on how to create new function activities and any associated PL/SQL stored procedures.

Create a New Process

You can create an entirely new Account Generator process in the Workflow Builder.

Select the item type that you want to create the process for. For example, for Oracle Assets you would choose the FA Account Generator item type. From the Edit Menu choose New Process. Within the property sheet that appears, specify an internal name, display name and description. The display name will appear in the Navigator window for the process, and it would be the name used in the Account Generator Process window. If your process itself will create a code combination specify "Flexfield Result". If this is the top-level process that you will actually run, specify "Runnable".

Tip: Examine your product's default Account Generator process diagram first to see how a process works.

Your start activity for the top-level process must be the Start Generating Code Combination function activity, which you can copy from the Standard Flexfield Workflow item type. Designate this as a Start activity in the process Properties page, under "Start/End."

You can then add activities to the process. See the Oracle Workflow documentation for details on how to add activities to a process, as well as details on standard Workflow activities.

See the section on the Standard Flexfield Workflow for generic Account Generator function activities you might want to add. For example, the activity Is Code Combination Complete? checks to see if all segments have values. The Validate Code Combination activity is useful for validating your combination after it has been generated. You can add the Abort Generation of Code Combination activity to terminate the process in the case of a fatal error. You should pass in an error message to this activity if you use it. This activity should be marked in the properties page as an "End" activity with the Result of "Failure".

In addition, your product's Account Generator may also contain function activities particular to your product that you may want to use. See your Oracle [Product] User's Guide for more information on these activities.

Once the combination has been generated and validated, your process should end with the End Generation of Code Combination standard flexfield workflow activity. This activity should be marked in the Properties page as an "End" activity with the Result of "Success".

If your custom process has a result type of "Flexfield Result," make sure your "End" activity(ies) give a result of "Success" or "Failure," since these are the possible values for "Flexfield Result."

Related Topics

Standard Flexfield Workflow

Test Your Account Generator Setup

To test your setup, make sure that the correct process is assigned to your structure in the Account Generator Process form. See: Choosing the Process for a Flexfield Structure.

Test your Account Generator setup as described in the product-specific documentation for the particular Account Generator process. In some products, you can test your setup within Oracle E-Business Suite; in others, you can test using a PL/SQL statement. Always test your setup on a test database before using it on a production database.

Set the profile option Account Generator:Debug Mode to "Yes" if you are using the Oracle Workflow Monitor to view your results during testing. This profile option will ensure that the runtime data is saved for debugging.

After you are finished testing, you can set Account Generator:Debug Mode to "No" to improve the performance of the Account Generator.

Standard Flexfield Workflow

The Standard Flexfield Workflow item type provides special function activities for generating and validating key flexfield code combinations. These functions are in addition to the predefined Workflow activities described in the Oracle Workflow documentation. Also, your product may provide you with product-specific Account Generator functions. See the product-specific documentation for details on these additional functions.

The Standard Flexfield Workflow only provides you with function activities you can use to customize your own Account Generator workflow. The Standard Flexfield Workflow does not contain any attributes or processes to run. The following is a description of each of the Standard Flexfield Workflow function activities.

Start Generating Code Combination

This function is used as the start activity of the top-level process that generates the code combination, and should be used only in the top-level process. It should not be used as a start activity of any subprocess the top level process may invoke. This function should be marked as a "Start" activity after copying it to the process window. This function does not have any attributes.

The Workflow Engine uses this function to get values from the calling form or program for attributes ("input attributes") that are used to build the combination.

Note: Do not use the Oracle Workflow Standard Start activity as the start activity of a top-level Account Generator process. The Account Generator may need to obtain attribute values that cannot be obtained using the Standard Start activity.

Assign Value to Segment

This function assigns a value to a specific segment of the combination. This function has the following attributes:

Copy Segment Value from Code Combination

This function copies a segment value from a given code combination to the combination that is being generated. This function has the following attributes:

Copy Segment Value from Other Structure Code Combination

This function copies a segment value from a given code combination of a different accounting flexfield structure to the combination that is being generated. This function has the following attributes:

Copy Values from Code Combination

This function copies all the values from a given code combination to the combination that is being generated. If you set the "Replace existing value" attribute to "False", you can use this function to copy values from a default code combination to segments without values. This function has the following attributes:

Get Value from Code Combination

This function retrieves a segment value from a given code combination and assigns it to an attribute of the current workflow item. This function has the following attributes:

Get Value from Other Structure Code Combination

This function retrieves a segment value from a given code combination of another accounting flexfield structure and assigns it to an attribute of the current workflow item. This function has the following attributes:

Is Code Combination Complete?

This function checks to see if values have been assigned to all segments in the code combination. This function returns "True" if all segments have values and "False" if one or more segments do not have values. This function has the following attribute:

Validate Code Combination

This function validates the code combination that has been generated. It has the following attributes:

Abort Generating Code Combination

This function is used to end the Account Generator process when a fatal error occurs. An error message in the encoded format is passed to the function and that message is displayed in the calling form or program. This function should be marked as an "End" activity and should return a value of "Failure".

End Generating Code Combination

This function ends the top level process of the account generation, after the combination has been generated and validated. This function should normally follow immediately after the Validate Code Combination activity. This function should be marked as an "End" activity and should return a value of "Success". It does not have any attributes.

For the functions listed above with the attributes Segment Identifier and Segment, "Qualifier" refers to the segment qualifier name that appears in the Qualifier window, for example, "GL_BALANCING". The segment "Name" refers to the Name specified in the Segments window. For information on segments, segment qualifiers, and validation see the following sections:

Related Topics

Defining Segments

Qualifiers

Flexfield Qualifiers

Choosing the Process for a Flexfield Structure

the picture is described in the document text

Use the Account Generator Processes window to assign Account Generator processes to Accounting Flexfield structures.

This window is under the navigation path Application > Flexfield > Accounts in the "System Administrator" responsibility.

To choose your Account Generator process:

  1. Select the structure to which you want to assign a process. You can choose the application, flexfield title, structure, and description using View > Find...

  2. Specify the Oracle Workflow Item Type containing the process.

  3. Specify the process you want to use to generate the accounts.

The default process, as specified in the product-specific documentation, will default in. If you want to use a different process, enter the name of the process you wish to use.

Application

The application which uses the Accounting Flexfield structure. A list of values is available for this field.

Flexfield Title

The title of the Accounting Flexfield. A list of values is available for this field.

Structure

The Accounting Flexfield structure for which the Account Generator will be creating combinations.

Item Type

The Oracle Workflow item type which contains the process which will generate the code combinations.

Process

The process within the above item type which will be used to create the code combinations. The default process, as specified in the product-specific documentation, will default in.