Browser version scriptSkip Headers

Oracle® Fusion Applications CRM Extensibility Guide
11g Release 7 (11.1.7)
Part Number E20388-06
Go to Documentation Home
Home
Go to contents  page
Contents
Book<br />List
Book
List
Go to Feedback page
Contact
Us

Go to previous page
Previous
Go to previous page
Next
PDF

7 Application Composer: Creating Object Workflows

This chapter contains the following:

Creating Object Workflows : Overview

Object Workflows : Explained

Object Workflows and Application Composer : How They Work Together

Object Workflows : Examples

Object Workflows and Field Updates : How They Work Together

Object Workflows and E-Mail Notification : How They Work Together

Object Workflows and Task Creation : How They Work Together

Object Workflows and Outbound Message : How They Work Together

Creating Object-Specific Web Services : Explained

E-Mail Templates: Explained

Configuring Object Workflows : Example

Object Workflows and Business Processes : How They Work Together

Object Workflows and Business Processes : Critical Choices

Sales Lead Approval Flow : Worked Example

FAQs for Creating Object Workflows

Creating Object Workflows : Overview

Read this chapter to understand how you work with object workflows, which are automated workflows that you trigger based on your specified conditions.

In this chapter, you will learn about:

Object Workflows : Explained

The object workflows represent orchestrated business processes that are triggered based on the conditions that you set while defining the workflows. You must have administrative privileges to configure object workflows.

You configure object workflows using the main page of the Application Composer.

This figure illustrates how you configure and trigger object workflow.

Configuring and triggering object workflows

This figure illustrates the create object workflow page.

Create Object Workflow

Some of the aspects or common terminology used for object workflows is as follows:

Application Composer

You can use the Application Composer to customize standard business objects delivered as is or create custom business objects based on business needs. You can use both standard objects and custom objects to define object workflows. How you create and configure these objects determines and enforces that only the data relevant to the object in context is available for selection when defining a workflow. For example, when you define a trigger condition, an expression editor lists only those fields that are relevant to the object that you have selected.

Expression Editor

An expression editor supports building logical and math operations, including field lookups that you can optionally use to define trigger condition. Fields in the expression editor are populated based on the object for which you are defining a workflow. The expression editor displays a warning if your expression contains an invalid attribute name. However, you must confirm whether the attribute name is actually invalid. If an attribute exists which was created at run time, then you can safely ignore the warning.

This figure illustrates the expression editor using which you can define groovy conditions for object workflows.

Expression Editor

Use the expression editor to write Groovy-based application logic that determines when an object workflow is triggered.

Note

Object workflows are not triggered when records are created via file-based import. File-based import bypasses any Groovy validation and trigger logic on an object.

Some examples of the raise conditions you can use include the following:

Example 1:

Status=='IN_PROGRESS' && BudgetAvailableDate==Today() + 30

Example 2:

if (isAttributeChanged('PrimaryContactPartyName') && 
PrimaryContactPartyName =='Business World')  return true;  else  return false; 

Example 3:

WinProb>10 || WinProb<50 

In addition, keep these points in mind when using the expression editor to build raise conditions:

For more information on groovy scripting, see Oracle Fusion CRM Application Composer Scripting Guide (ID 1354807.1) on My Oracle Support at https://support.oracle.com.

Execution Schedule

While defining an event action, you can optionally set an execution schedule that governs when an event action should happen. Else, the event actions are run immediately. When multiple event actions are configured, the Field Updates happen first before any other event action is triggered. For event actions other than Field Updates, there is no particular sequence and the event actions are triggered based on whether or how you configure the execution schedule. You can set a time rule for an event action based on whether that event action must occur after or before the triggering of a workflow or the occurrence of a date, and also specify the time duration in Hours, Days, or Weeks. If you schedule an event action for a time in the past, the event action is executed immediately after it is triggered.

This figure illustrates the execution schedule region.

Execution Schedule

Object Workflows and Application Composer : How They Work Together

Oracle Fusion CRM Application Composer is a browser-based configuration tool. It is part of the CRM extensibility framework that provides a mechanism to extend applications. You must have administrative privileges to work with and configure object workflows using the application composer.
Application Composer - Overview

This figure illustrates what you can do using Application Composer within the extensibility framework.

Application Composer

Application Composer

You can use the Application Composer to customize standard business objects delivered as is or create custom business objects based on business needs. You can use both standard objects and custom objects to define object workflows. How you create and configure these objects determines and enforces that only the data relevant to the object in context is available for selection when defining a workflow. For example, when you define a trigger condition, an expression editor lists only those fields that are relevant to the object that you have selected.

For more information on customizing Oracle Fusion CRM Applications using Application Composer, see Oracle Fusion Applications CRM Extensibility Guide on Oracle Technology Network at http://www.oracle.com/technetwork/indexes/documentation.

Object Workflows : Examples

Illustrated here are a few business scenarios where you employ object workflows to automate business processes.

Scenario

In a sales division, the management plans to set an automated business process where an opportunity must have an initial close date set automatically to 90 days from its date of creation. Being an administrator, you must create an object workflow based on management directions.

This figure illustrates the triggering of the event action for the business scenario.

Object Workflow Example with One Event
Action

To create field updates event action:

  1. From the Application Composer main page, select Object Workflows.

  2. Click Create.

  3. Select the Opportunity object and provide a meaningful Name and Description.

  4. Define the trigger condition using When a record is created event point. Use the expression editor to set the event condition as Close Date is Null.

  5. Under Actions, select Field Updates event action.

    This opens the Create Action: Field Updates page where you configure the event action.

    Configuring Field Updates Event Action

  6. Provide the Name and Description for the field updates action and optionally set the Execution Schedule.

  7. Under Field Update Details, select Close Date and set its value to Creation Date plus 90 days.

  8. Save the event action.

When a user creates an opportunity, the workflow is triggered which sets the close date to 90 days from the date of creation.

Scenario

In a sales division, the management plans to set a business process that when an opportunity is updated whose close date is current or past and the status is open, an e-mail notification is automatically sent to specified recipients and the close date is extended by 15 days. Being an administrator, you must create an object workflow based on management directions.

This figure illustrates how you configure multiple event-actions for the business scenario.

Object Workflow Example With Two Event
Actions

In this example, you must create a workflow with two event actions, namely, Field Updates and E-Mail Notifications.

  1. From the Application Composer main page, select Object Workflows.

  2. Click Create.

  3. Select the Opportunity object and provide a meaningful Name and Description.

  4. Specify the event point as When a record is updated. Use the expression editor to set an event condition as Close Dateis less than or equal to Current Date and Status is Open.

You are now creating Field Updates event action.

  1. On the Create Object Workflow page, select Field Updates event action.

    This opens the Create Action: Field Updates page.

  2. Provide the Name and Description for the field updates action and optionally set the Execution Schedule for triggering the action.

  3. Under the Field Update Details, select Close Date and set its value to Current Date plus 15 days.

  4. Save the event action.

You are now creating the E-Mail Notification event action.

  1. On the Create Object Workflow page, select E-Mail Notification event action.

    This opens the Create Action: E-Mail Notification page.

    Configuring E-Mail Notification Event
Action

  2. Provide the Name and Description for the e-mail notification action and optionally set the Execution Schedule for triggering such notifications.

  3. Search and select an existing E-Mail Template or create one with a related e-mail subject and body.

    When you create a template, you specify action-related text and field tokens that are populated at run time. See: E-Mail Templates: Explained topic.

  4. Locate and specify Specific users under Recipient Types. See: recipient types in E-Mail Templates: Explained topic.

  5. Click Save.

When a user updates an opportunity record which satisfies the trigger condition, an e-mail is sent to the specified recipients and the Close Date is extended by 15 days.

Object Workflows and Field Updates : How They Work Together

Using object workflows, you can configure automatic field updates by specifying what fields you want to update and the value to apply to those fields.

This figure illustrates how the field updates are configured and triggered.

Field Updates Event Action

To create field updates event action:

  1. From the Application Composer main page, select Object Workflows.

  2. Click Create.

  3. Select an Object and provide a meaningful Name and Description.

  4. Define the trigger condition using When a record is created or When a record is updated event point.

    Note

    If you have created a field in a sandbox and want to set a condition on that field or apply a new value, you must first publish the sandbox to make that field available to the mainline application.

  5. Select Field Updates as the event action.

    This opens the Create Action: Field Updates page.

  6. Provide the Name and Description for the field updates action and optionally set the Execution Schedule.

  7. Specify the fields you want to update when the workflow is triggered. See: Specifying Field Update Details in this topic.

  8. Save the event action.

Note

If you have a record open and a workflow is triggered on a field in that record, you must exit from the record and reopen it to see the updates.

Specifying Field Update Details

In the Field Update Details region, select the fields and specify the values to which these fields must be set when the workflow is triggered. When you select a field to update, the options on the page dynamically change depending on the field type. For example, if you select a field of type Date, a date picker appears.

If you are updating a currency field, you must specify the value to which this field will be set when the field updates action is invoked.

In case of static choice list, the list of field values can either be in an alphabetical order or in the display sequence such as High, Medium, or Low. For updating static fields that have a display sequence, specify whether you want to populate the field with the next value in list or with the previous value in list.

For example, for a display sequence of High, Medium, and Low, you can change from High to Medium (populate with next value) or from Low to Medium (populate with previous value) during field updates; however, if the current value is Low and you configure using populate with next value in list, the field is not updated because Low is already the last value in the sequence.

Use Update More Fields option to select additional fields to update.

Primary and Child Object Support

You can configure field updates using either a parent or a child object. When you select a child object for defining an object workflow, you can update fields only in the records of that child object; however, you cannot update fields in the records of that child object's parent.

For example, if you are defining a workflow for Opportunity Team, which is a child object of Opportunity, you can configure field updates when a new team member (child record) is added to the Opportunity Team, but you cannot configure field updates for records in the parent Opportunity object.

Additionally, when inserting field tokens while configuring field updates, only those tokens belonging to the selected child object in context is available for selection.

Same-Object Field Updates

The field-updates event action acts on the same object that raises the event. For example, when you create an Opportunity object and do not specify the Close Date, you can define a field update action that sets the Close Date automatically to 90 days after the creation date.

Execution Schedule

While defining an event action, you can optionally set an execution schedule that governs when an event action should happen. Else, the event actions are run immediately. When multiple event actions are configured, the Field Updates happen first before any other event action is triggered. For event actions other than Field Updates, there is no particular sequence and the event actions are triggered based on whether or how you configure the execution schedule. You can set a time rule for an event action based on whether that event action must occur after or before the triggering of a workflow or the occurrence of a date, and also specify the time duration in Hours, Days, or Weeks. If you schedule an event action for a time in the past, the event action is executed immediately after it is triggered.

Object Workflows and E-Mail Notification : How They Work Together

You can configure object workflows to send e-mail communications to the intended recipients as an automated process.

For example, you can define a workflow that when the win probability of an opportunity is set to 30 percent or more, the workflow automatically sends out e-mail alerts to the resources who are assigned that opportunity along with the required information.

This figure illustrates how e-mail notifications are configured and triggered.

E-Mail Notification Event Action

You can configure e-mail notifications using either a parent or a child object.

To define an e-mail notification:

  1. From the Application Composer main page, select Object Workflows.

  2. Click Create.

  3. Select an Object and provide a meaningful Name and Description.

  4. Define the trigger condition using When a record is created or When a record is updated event point.

  5. Select E-Mail Notification as the event action.

    This opens the Create Action: E-Mail Notification page.

  6. Provide the Name and Description for the e-mail notification action and optionally set the Execution Schedule for triggering such notifications.

  7. Search and select an existing e-mail template or create one with a related e-mail subject and body.

    When you create a template, you specify action-related text and field tokens that are populated at run time. See: E-Mail Templates: Explained topic.

  8. Specify the Recipient Types. See: Recipient Types in this topic.

  9. Click Save.

Execution Schedule

While defining an event action, you can optionally set an execution schedule that governs when an event action should happen. Else, the event actions are run immediately. When multiple event actions are configured, the Field Updates happen first before any other event action is triggered. For event actions other than Field Updates, there is no particular sequence and the event actions are triggered based on whether or how you configure the execution schedule. You can set a time rule for an event action based on whether that event action must occur after or before the triggering of a workflow or the occurrence of a date, and also specify the time duration in Hours, Days, or Weeks. If you schedule an event action for a time in the past, the event action is executed immediately after it is triggered.

Recipient Types

The recipients available for sending e-mail notifications are contextual. If you are defining a workflow using a parent object, then the recipients belong to the parent and its related child objects. If you are defining a workflow using a child object, then the recipients belong only to that child object.

Additionally, when inserting field tokens while configuring e-mail notifications, only those tokens belonging to the selected primary or child object are available for selection.

Select the recipients from the following options available under Recipient Type:

Object Workflows and Task Creation : How They Work Together

Oracle Fusion tasks integrate with BPEL human tasks and are available in the BPEL worklist application.

You can configure object workflows to trigger auto-creation and assignment of tasks. You can define tasks action for only those objects that support the creation of tasks. For other objects, the tasks option is disabled.

When you configure an object workflow using a child object, the selectable fields for Tasks Creation event action contain fields specific only to that child object.

When a child-object-based task is triggered, the task is assigned to the parent object of that child. You cannot configure a task for a child object of another child object.

This figure illustrates how tasks are configured.

Tasks Event Action

To define a tasks creation action:

  1. From the Application Composer main page, select Object Workflows.

  2. Click Create.

  3. Select an Object and provide a meaningful Name and Description.

  4. Define the trigger condition using When a record is created or When a record is updated event point.

  5. Select Tasks Creation event action.

    This opens the Create Action: Tasks Creation page.

  6. Provide the Name and Description for the event action and optionally set the Execution Schedule.

  7. Use the Task Details region to configure a task based on your requirements. Here are the things you can do using tasks details region:

  8. Save the event action.

Note

If an object for which you are defining this event action contains a customer, that customer is automatically included in the created task.

Execution Schedule

While defining an event action, you can optionally set an execution schedule that governs when an event action should happen. Else, the event actions are run immediately. When multiple event actions are configured, the Field Updates happen first before any other event action is triggered. For event actions other than Field Updates, there is no particular sequence and the event actions are triggered based on whether or how you configure the execution schedule. You can set a time rule for an event action based on whether that event action must occur after or before the triggering of a workflow or the occurrence of a date, and also specify the time duration in Hours, Days, or Weeks. If you schedule an event action for a time in the past, the event action is executed immediately after it is triggered.

Object Workflows and Outbound Message : How They Work Together

You can configure an object workflow to send an outbound message to a Web service at a specified endpoint URL. The endpoint URL is an external Web service that shares data with Oracle Fusion CRM, and must conform to the service WSDL of Oracle Fusion CRM.

For example, you can define an object workflow that automatically sends, based on a trigger, an outbound message containing an object like opportunity, lead, or account details from one system to another.

This figure illustrates how outbound messages are configured as part of object workflows.

Outbound Messages Event Action

You can configure outbound-messages event for a parent or a child object. When you define a workflow using a parent object, the outbound message is sent using service data objects (SDO) of that parent object as well as its child objects. When you define a workflow using a child object, the outbound message is sent using the SDO of only the child object.

To define an outbound message action:

  1. From the Application Composer main page, select Object Workflows.

  2. Click Create.

  3. Select an Object and provide a meaningful Name and Description for the workflow you are creating.

  4. Define the trigger condition using When a record is created or When a record is updated event point.

  5. Select the Outbound Message event action.

    This opens the Create Action: Outbound Message page.

  6. Specify the Name and Description for the outbound message action and set the Execution Schedule for triggering the action. See: Execution Schedule in this topic.

  7. Provide the endpoint URL of the external Web service, for example, an endpoint URL can be http://GlobalFusion:7011/OMTestOpportunity/OutboundMessageServiceSoapHttpPort. At run time, a service data object containing details of the object on which the object workflow is defined is sent to the specified endpoint URL.

  8. Save the event action.

Execution Schedule

While defining an event action, you can optionally set an execution schedule that governs when an event action should happen. Else, the event actions are run immediately. When multiple event actions are configured, the Field Updates happen first before any other event action is triggered. For event actions other than Field Updates, there is no particular sequence and the event actions are triggered based on whether or how you configure the execution schedule. You can set a time rule for an event action based on whether that event action must occur after or before the triggering of a workflow or the occurrence of a date, and also specify the time duration in Hours, Days, or Weeks. If you schedule an event action for a time in the past, the event action is executed immediately after it is triggered.

If a field update event action is also scheduled along with outbound messages event action, the field updates event action is triggered first, so that the outbound messages contain the updated data.

Security Considerations

The outbound messages can use either an authentication-only client-side security policy or a transport-level security policy that protects the message during transfer. The default authentication-only policy used by object workflow outbound message is oracle/wss10_saml_token_client_policy. This policy includes Security Assertion Markup Language (SAML) tokens in outbound Simple Object Access Protocol (SOAP) request messages. This policy should only be used when the target web service is located within a secure network segment.

The corresponding service can use any compatible service policy, such as oracle/wss10_saml_token_service_policy or oracle/wss_saml_or_username_token_service.

When the service is outside your firewall, you must protect the message by selecting the Protect Message option on the Create Action: Outbound Message page. When protected, the outbound message uses oracle/wss_username_token_over_ssl_client_policy with one-way secure socket layer (SSL) enabled by default. The corresponding service must use a compatible service policy, such as oracle/wss_username_token_over_ssl_service_policy.

For more information on basic administration involving deployment, configuration, and management of Web services, refer part II of the Oracle Fusion Middleware Security and Administrator's Guide for Web Services.

Outbound Messages Protection

You must perform the following setup activities when you are using the Protect Message option:

  1. Oracle Fusion Application requires credentials to access the remote system to which the outbound message is being sent. Log a service request (SR) to provide these credentials to Oracle Fusion Applications to access the remote system.

  2. If the remote system is using a self-signed SSL certificate, log an SR for the Oracle administrator to import the SSL certificate into the Oracle Fusion Applications.

Creating Object-Specific Web Services : Explained

You can configure an object workflow to send an outbound message to a third-party Web service at a specified endpoint URL. An endpoint URL is an external Web service that receives data with Oracle Fusion Customer Relationship Management (CRM) applications. The third-party Web service must conform to the service WSDL defined by Oracle Fusion CRM.

This topic provides the following:

Configuring a Web Service

To configure a Web service, you must replace the parameters in the OutboundMessageService.xsd file using the Oracle Fusion Web service instructions.

Navigate to Oracle Enterprise Repository (OER):

  1. For a standard object, search for ADF Service in OER by object name.

    For custom objects, search for the generic Web service for all custom objects in the corresponding application, for example, Sales Custom Business Object.

  2. Extract the .xsd files from the live environment URL using the information provided under the service.

  3. Replace the parameters in OutboundMessageService.xsd with the names for the object of your interest.

    The parameters are marked in the .xsd file as parameters, $OBJECT_TARGET_NAMESPACE$ and $OBJECT_NAME$.

For more information about Oracle Enterprise Repository, see Oracle Fusion Middleware Configuration Guide for Oracle Enterprise Repository.

Examples of OutboundMessageService.wsdl and OutboundMessageService.xsd are provided here for reference.

WSDL File Example

This section includes an example of the OutboundMessageService.wsdl, for your reference.


//Sample OutboundMessageService.wsdl 
<wsdl:definitions
     name="OutboundMessageService"
     targetNamespace="http://xmlns.oracle.com/apps/crmCommon/content/outboundMessage/"
     xmlns:errors="http://xmlns.oracle.com/adf/svc/errors/"
     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
     xmlns:tns="http://xmlns.oracle.com/apps/crmCommon/content/outboundMessage/"
     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
     xmlns:types="http://xmlns.oracle.com/apps/crmCommon/content/outboundMessage/types/"
    >
    <wsdl:import namespace="http://xmlns.oracle.com/adf/svc/errors/" location="ServiceException.wsdl"/>
    <wsdl:types>
        <schema xmlns="http://www.w3.org/2001/XMLSchema">
            <import namespace="http://xmlns.oracle.com/apps/crmCommon/content/outboundMessage/types/"
                 schemaLocation="OutboundMessageService.xsd"/>
        </schema>
    </wsdl:types>
    <wsdl:message name="OutboundMessageService_processOutboundMessage">
        <wsdl:part name="parameters" element="types:processOutboundMessage"/>
    </wsdl:message>
    <wsdl:message name="OutboundMessageService_processOutboundMessageResponse">
        <wsdl:part name="parameters" element="types:processOutboundMessageResponse"/>
    </wsdl:message>
    <wsdl:portType name="OutboundMessageService">
        <wsdl:documentation/>
        <wsdl:operation name="processOutboundMessage">
            <wsdl:input message="tns:OutboundMessageService_processOutboundMessage"/>
            <wsdl:output message="tns:OutboundMessageService_processOutboundMessageResponse"/>
            <wsdl:fault name="ServiceException" message="errors:ServiceException"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="OutboundMessageServiceSoapHttp" type="tns:OutboundMessageService">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="processOutboundMessage">
            <soap:operation soapAction="http://xmlns.oracle.com/apps/crmCommon/content/outboundMessage/processOutboundMessage"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
            <wsdl:fault name="ServiceException">
                <soap:fault name="ServiceException" use="literal" encodingStyle=""/>
            </wsdl:fault>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="OutboundMessageService">
        <wsdl:port name="OutboundMessageServiceSoapHttpPort" binding="tns:OutboundMessageServiceSoapHttp">
            <soap:address location="http://adc2111013:7101/OMInterface/OutboundMessageService"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

XSD File Example

This section provides an example of the OutboundMessageService.xsd, for your reference. The parameters are marked in the .xsd file as parameters, $OBJECT_TARGET_NAMESPACE$ and $OBJECT_NAME$.


//Sample: OutboundMessageService.xsd

<schema elementFormDefault="qualified" targetNamespace="http://xmlns.oracle.com/apps/crmCommon/content/outboundMessage/types/"
     xmlns:ns0="http://xmlns.oracle.com/adf/svc/errors/" xmlns:ns1="$OBJECT_TARGET_NAMESPACE$"
     xmlns:ns2="http://xmlns.oracle.com/adf/svc/types/" xmlns:tns="http://xmlns.oracle.com/apps/crmCommon/content/outboundMessage/types/"
     xmlns="http://www.w3.org/2001/XMLSchema">
    <import namespace="http://xmlns.oracle.com/adf/svc/types/" schemaLocation="BC4JService.xsd"/>
    <import namespace="$OBJECT_TARGET_NAMESPACE$" schemaLocation="$OBJECT_NAME$.xsd"/>
    <import namespace="http://xmlns.oracle.com/adf/svc/errors/" schemaLocation="ServiceException.xsd"/>
    <element name="processOutboundMessage">
        <complexType>
            <sequence>
                <element name="object" type="ns1:$OBJECT_NAME$"/>
            </sequence>
        </complexType>
    </element>
    <element name="processOutboundMessageResponse">
        <complexType>
            <sequence/>
        </complexType>
    </element>
</schema>

Security Policy

The outbound messages can use either an authentication-only client-side security policy or a transport-level security policy that protects the message during transfer. The default authentication-only policy used by object workflow outbound message is oracle/wss10_saml_token_client_policy. This policy includes Security Assertion Markup Language (SAML) tokens in outbound Simple Object Access Protocol (SOAP) request messages. This policy should only be used when the target web service is located within a secure network segment.

The corresponding service can use any compatible service policy, such as oracle/wss10_saml_token_service_policy or oracle/wss_saml_or_username_token_service.

When the service is outside your firewall, you must protect the message by selecting the Protect Message option on the Create Action: Outbound Message page. When protected, the outbound message uses oracle/wss_username_token_over_ssl_client_policy with one-way secure socket layer (SSL) enabled by default. The corresponding service must use a compatible service policy, such as oracle/wss_username_token_over_ssl_service_policy.

For more information on basic administration involving deployment, configuration, and management of Web services, refer part II of the Oracle Fusion Middleware Security and Administrator's Guide for Web Services.

E-Mail Templates: Explained

You can create, manage, and use e-mail templates for configuring e-mail notifications as part of object workflows. E-mail templates define the layout of the e-mails, which ensures that e-mail notifications triggered by the same type of business event for a specific object have a consistent look and feel. You must have administrative privileges to define e-mail templates.

Note

If you are working in a sandbox, exit from the sandbox and create the e-mail template in the mainline application.

A template is created for a particular type of object and can be used only with that object when defining e-mail notifications. You can compose e-mail templates using Oracle Fusion CRM Application Composer. You can also create using any e-mail editor and then upload the template using application composer. You can use e-mail templates, for example, for including your company letterhead in outbound e-mail communications.

You can Search an e-mail template using either or all of the search parameters such as full or partial Name of the template, the Object to which the template is associated, and whether the template is Active.

Managing E-Mail Templates

Managing e-mail templates include tasks that enable you to Search, View, Duplicate, Create, Edit, or Delete a template.

Options available for managing e-mail templates include:

Configuring E-Mail Templates

You can define a template using the formatting features as available in any HTML based e-mail client. Templates are automatically converted to plain text for users who cannot view HTML e-mails. Advanced HTML users can edit the templates using the Source Code Editing Mode where the tags are set to visible. These advanced users can copy and edit the source code in any HTML editor, and then paste the edited code back to Oracle Fusion. While defining an e-mail template, the fields you select and embed in a template are specific to the selected object. The fields are populated with values at run time.

Options available for configuring e-mail templates include:

Configuring Object Workflows : Example

This example demonstrates how to create an object workflow and set a trigger condition for invoking (or launching) the workflow. The trigger condition that will launch the workflow will be when the budget availability date for an opportunity is updated. As part of the example, you will also configure these three event actions:

Configuring Object Workflow

  1. Click the Navigator menu.
  2. Click the more... >> link.
  3. Click the Application Composer link.

    You are on the Overview page of the Application Composer. This page shows the various tasks available to customize and extend your CRM application. In the left pane, the default Application shown is Common, which hosts common objects such as Contact, Resource, Organization, Note, Interaction, and so on. In this activity, you are configuring a workflow for the Opportunity object; therefore, you will select Sales from the Application list.

  4. In the left pane, click the Application list.
  5. Click the Sales list item.
  6. In the Overview region, click the Object Workflows link.

    You are on the Object Workflows page. You can use this page to search for an existing workflow or create a workflow. In this activity, you will create a workflow.

  7. Click the Actions menu below the Search region.
  8. Click the Create menu item.
  9. You are on the Create Object Workflow page. You must first select an object for which you are creating a workflow. Click the Object list.
  10. Click the Opportunity list item.
  11. Enter the desired information into the Name field. Enter "Budget Date Revised".
  12. In the Event Point and Condition region, click the When a record is updated option.
  13. You will set the trigger condition using Groovy script. Launch the expression builder to create the condition. In the Event Point and Condition region, click the Groovy Builder button to open the expression builder.
  14. You are on the Expression Builder popup. Before you proceed, ensure that the Fields tab is selected.
  15. Identify the correct application programming interface (API) name for the field you want to use for defining your trigger condition. Under the Display Label column in the Opportunity: Fields table, locate and click the Date Budget Available cell.
  16. Insert Date Budget Available into the expression editor. Click the Insert button.
  17. Enter your script in the Expression area using the BudgetDateAvailable field you just inserted. Write a script that meets all of these conditions: 1) Only the BudgetAvailableDate is updated. 2) The BudgetAvailableDate is not null. 3) The opportunity record that you will create is updated. For your activity, the following script has been written for you using the BudgetDateAvailable field: if(isAttributeChanged('BudgetAvailableDate') && 'BudgetAvailableDate' != null && contains(Name, ' 50 Solar Green Servers')) { return true; } else { return false; }
  18. Validate your script. Click the Validate button.
  19. Click the OK button.
  20. You have set the event point and trigger condition for your object workflow. You will now create a Field Updates event action. In this event action, you will specify the values with which the Close Date, Level of Risk, and Strategic Value values will be replaced when the field updates action is triggered.
  21. In the Actions region, click the Create button on the right of the Field Updates action.
  22. You are on the Create Action: Field Updates page. Enter the desired information into the Name field. Enter "Update Close Date".
  23. In the Execution Schedule region, keep the default setting, which is to update fields right away when the workflow is triggered.
  24. In the Field Update Details region, click the Field to Update list.
  25. Click the Close Date list item.
  26. Click the Value list.
  27. Click the Date Budget Available list item.
  28. Make sure the '+' operator is selected, and enter the desired information in the Days field. Enter "7".
  29. Click the Update More Fields link.
  30. Click the Field to Update list.
  31. Click the Level of Risk list item.

    In this section, you will lower the Level of Risk for an opportunity when the workflow is triggered. The values in the Level of Risk field are in a descending order of High, Low, and None; therefore, when you select the Populate with next value in list option for Level of Risk, the risk level will be lowered by one step. For example, if the initial value is High, it will change to Low when the workflow is invoked, because Low is the next value in the list.

  32. Click the Populate with next value in list option.
  33. Click the Update More Fields link.
  34. Click the Field to Update list.
  35. Click the Strategic Value list item. .

    Note: If there are multiple Strategic Value fields in the list, click the first one

  36. Click the list on the right of the Value group of options.
  37. Click the Medium list item.
  38. Save the Field Update event action. In the upper-right region of the page, click the Save button.
  39. You are back to the Create Object Workflow page. You will now create a Task Creation event action for the sales team to follow up with the customer.
  40. In the Actions region, click the Create button on the right of the Task Creation event action.
  41. Enter the desired information into the Name field. Enter "Follow Up Call".
  42. In the Task Details region, enter the desired information into the Subject field. Enter "Follow up with customer on budget available date".

    Note: Expand the Task Details region if not already expanded.

  43. You will now insert a field token in the Subject field. Place your cursor where you want the token to appear. In the Subject field, click after "customer".
  44. Click the field-token list on the right of the Subject field.
  45. Click the Customer list item.

    Note: If there are multiple entries for Customer, select the first one.

  46. Click the << Insert button.
  47. Notice that the [$TargetPartyName$] token is inserted in the Subject where you placed your cursor. You will need to adjust trailing or leading text-spaces as required.
  48. Enter the desired information into the Description field. Enter "Opportunity Budget Available Date is changed. Follow up with within three days of the new available date. Primary Contact Email ID: ".
  49. Use the field-token list on the right of the Description field to insert the following tokens one-by-one into the description text: - Opportunity Name ([$Name$]) - Primary Contact ([$PrimaryContactPartyName$]) - Primary Contact E-Mail ([$PrimaryContactEmailAddress$])
  50. Click after "Opportunity" in the Description text.
  51. Click the field-token list on the right of the Description field.
  52. Click the Opportunity Name list item
  53. Click the <<Insert button
  54. Click after "Follow up with" in the Description text.
  55. Click the field-token list on the right of the Description field.
  56. Click the Primary Contact list item.
  57. Click the <<Insert button
  58. Click after "Email ID:" in the Description text.
  59. Click the Primary Contact E-Mail list item.
  60. Click the <<Insert button
  61. You will now set the task's Due Date to be 3 days after the new Budget Available Date. Click the Due Date list.
  62. Click the Date Budget Available list item.
  63. Make sure the '+' operator is selected, and use the increment button (up arrow) to set the value in the Days field to 3.
  64. Click the Start Date list.
  65. Click the Date Budget Available list item. Accept the default 0 (zero) in the Days field.
  66. Click the Owner list.
  67. Click the OwnerResourcePartyid list item.
  68. Click the Assignees list
  69. Click the OpportunityResource Team list item.
  70. Click the Category list.
  71. Click the Call, outbound list item.
  72. Click the Priority list.
  73. Click the 1 - Very high list item.
  74. Save the Task Creation event action. In the upper-right region of the page, click the Save button.
  75. You are back to the Create Object Workflow page. In the upper-right region of the page, click the Save button. This saves the object workflow.
  76. You are on the Object Workflows page. You will now create the E-Mail Notification event action. Before you create this event action, you must first create an E-Mail Template that you will use for sending e-mail notifications.
  77. In the Common Setup pane on the left, click the E-Mail Templates link.
  78. You are on the E-Mail Templates page. You can use this page either to search and edit an existing template or to create a fresh template. In this activity, you will create a template.
  79. In the Search Results region, click the Actions menu.
  80. Click the Create menu item.
  81. You are on the Create E-Mail Template page. Click the Object list.
  82. Click the Opportunity list item.
  83. Enter the desired information into the Name field. Enter "Budget Available Date Update".
  84. Enter the desired information into the E-Mail Subject field. Enter "Opportunity customer budget available date has changed".
  85. You will now insert a field token in the E-Mail Subject field. Place your cursor where you want the token to appear. Click after "Opportunity" in the E-Mail Subject field.
  86. Click the field-token list on the right of the E-Mail Subject field.
  87. Click the Opportunity Name list item.
  88. Click the <<Insert button
  89. In the E-Mail Body region, enter the desired information into the E-Mail Body field. Enter "- budget available date regarding opportunity has moved to . The new opportunity close date is .".
  90. In the E-Mail Body region, use the Fields list-item of the Select list to insert the following field tokens: - Customer ([$PartyUniqueName$]) - Opportunity Name ([$Name$]), - Date Budget Available ([$BudgetAvailableDate$]) - Close Date ([$EffectiveDate$])

    Note: Rich text formatting is available only if your e-mail account supports HTML format e-mail.

  91. Click after "- " in the e-mail body.
  92. In the E-Mail Body region, click the field-token list on the left of the Insert button.
  93. Click the Customer list item.
  94. Click the Insert button.
  95. Click after "regarding opportunity" in the e-mail body.
  96. Click the field-token list.
  97. Click the Opportunity Name list item.
  98. Click the Insert button.
  99. Click after "has moved to" in the e-mail body.
  100. Click the field-token list.
  101. Click the Date Budget Available list item.
  102. Click the Insert button.
  103. Click after "close date is" in the e-mail body.
  104. Click the field-token list.
  105. Click the Close Date list item.
  106. Click the Insert button.
  107. Save the E-Mail Template. In the upper-right region of the page, click the Save button.
  108. You are back to the E-Mail Templates page. In the Common Setup pane on the left, click the Object Workflows link.
  109. You are on the Object Workflows page. Search for the object workflow that you were creating before you moved to configuring e-mail templates. Click the Object list.
  110. Click the Opportunity list item.
  111. Click the Search button.
  112. The Name column in the search results lists the object workflows created for the opportunity object. From this list, identify and select the object workflow that you are creating. Click the Budget_Date_Revised cell.
  113. Click the Edit button.
  114. You are on the Edit Object Workflow page. You are editing an existing object workflow to configure and add an E-Mail Notification event action
  115. In the Actions region, click the Create button on the right of the E-Mail Notification event action.
  116. You are on the Create Action: E-Mail Notification page. Enter the desired information into the Name field. Enter "Notify sales team about budget available date change".
  117. Select the e-mail template that you created. In the E-Mail Details region, click the E-Mail Template list.
  118. From the list of e-mail templates, identify and select the template that you created. Click the Budget Available Date Update template.
  119. Click the Recipient Type list.
  120. Click the Specific e-mail addresses list item.
  121. Enter the desired information into the E-Mail Addresses field.
  122. Save the E-Mail Notification event action. In the upper-right region of the page, click the Save button.
  123. You are back to the Edit Object Workflow page. Save the object workflow. In the upper-right region of the page, click the Save button.
  124. You have now configured an object workflow with three event actions. This object workflow is invoked (launched) when you update the budget available date for the opportunity that you will create in Activity 2.

Triggering the Workflow and Invoking Event Actions

In this section, you will trigger (launch) the object workflow that you created in the previous activity by entering the budget availability date for an opportunity.

  1. Click the Navigator menu.
  2. Click the Opportunities link under Sales.
  3. You are on the Overview page of Opportunities. You will use this page to create an opportunity record. In the Opportunities region, click the Create button.
  4. You are on the Create Opportunity page. Verify that Close Date is the current date, Sales Stage is 01-Qualification, and Win Probability (%) is 0 (zero). In the Name field, enter "50 Solar Green Servers".
  5. In the Sales Account field, enter "Solar Inc (KIRKLAND, US)".
  6. Click the Sales Account search button adjacent to the Sales Account field.
  7. You are on the Search and Select: Sales Account popup. In the popup, the Solar Inc (Kirkland, US) search parameter appears in the Name field. Click the Search button.
  8. In the Search Results region, click the Solar Inc (Kirkland, US) cell.

    Ensure that the All Sales Accounts tab is selected.

  9. Click the OK button.
  10. In the Revenue Items region, click the Add Row button.
  11. Enter the desired information into the Name field. Enter "DG 150 Green Servers".
  12. Enter the desired information into the Quantity field. Enter "50".
  13. Enter the desired information into the Estimated Price field. Enter "2000".
  14. In the upper-right region of the page, click the Save and Edit button.
  15. You are on the Edit Opportunity page. Expand the following if not already expanded: - Show More area in the Summary region - Revenue Items region - Activity Center region
  16. Locate the following fields and note their current values: - Close Date (in the Summary region) - Strategic Value (under Show Less area in the Summary region) - Level of Risk (under Show Less area in the Summary region) - Date Budget Available (under Show Less area in the Summary region) When you update the Date Budget Available field to trigger the workflow, the values in the Close Date, Strategic Value, and Level of Risk fields should change.
  17. Under the Show Less area in the Summary region, click the Level of Risk list.
  18. Click the High list item.
  19. In the upper-right region of the page, click the Save button.
  20. You are still on the Edit Opportunity page. In the Activity Center region, click the Tasks tab.
  21. Currently there are no Tasks with your sign in initials.
  22. In the Additional Details region, click the Opportunity Team tab.
  23. In the Team Members table, locate your sign-in username. You will now add another team member: Mateo Lopez.
  24. In the Opportunity Team tab, click the Add Team Members button.
  25. You are on the Select and Add: Team Members popup.
  26. Find a team member and click the Done button.
  27. Search and add a contact to the opportunity. This will be the primary contact for the opportunity.
  28. In the Additional Details region, click the Contacts tab.
  29. In the Contacts tab, click the Add Row button.
  30. Enter the desired information into the Name field. As you type in the contact name, the contact name and e-mail ID appear.
  31. Click the desired contact.
  32. In the upper-right region of the page, click the Save and Close button.
  33. You are back to the Overview page of Opportunities. You will now edit the opportunity record you just created and update the budget availability date to trigger the event actions.
  34. From the table in the Opportunities region, identify and select the opportunity record that you created. Click the 50 Solar Green Servers link.
  35. You are on the Edit Opportunity page. Before you proceed, expand the Show More area in the Summary region if not already expanded.
  36. Under the Show Less area in the Summary region, click the Date Budget Available (calendar) button.
  37. Click 9 as the date, or click any future date.
  38. In the upper-right region of the page, click the Save and Close button.

    You have just changed the budget availability date and saved the record, committing the changes to the database. The object workflow will be evaluated and triggered at this time, and all the event actions will be executed. The Field Updates event action always happens first followed by other event actions in no particular order. It might take a few seconds for the updates to occur.

  39. In the table under the Opportunities region, identify and select the opportunity record that you created. Click the 50 Solar Green Servers link.

    You are on the Edit Opportunity page. The workflow is now triggered and the configured event actions have been invoked. You will now verify the invocation of Field Updates event action.

  40. In the Summary region, Close Date is now set to 7 days after the Date Budget Available value.
  41. Under the Show Less area in the Summary region, Strategic Value is now set to Medium.
  42. Under the Show Less area in the Summary region, Level of Risk has now been populated with the next value in the list, from High to Low.
  43. You have verified the invocation of the Field Updates event action.
  44. You will now verify the invocation of the Task Creation event action.

    In the Activity Center region, the Due Date filter under the Tasks tab may prevent your task from appearing in the invoked tasks list even after it is invoked. For example, a task having a due date after 10 days will not appear if the Due Date filter is set to Next 7 Days. In this activity, you will use the All Tasks filter option to search for your invoked task

  45. In the Activity Center region, click the Due Date list under the Tasks tab.
  46. Click the All Tasks list item.
  47. In the Tasks tab, click the arrow button adjacent to the Category list.
  48. In the Search results, locate the Subject that has your sign in initials. Click the Follow up with customer Solar Inc on budget available date link.

    You are on the Edit Task popup. Note these details in the popup:

    • The Owner of the opportunity is the owner of this task.

    • The task Assignees are persons in the opportunity sales team.

    • In the Description field, the field tokens that you had inserted when creating the Task Creation event action have been replaced with values at run time.

  49. Click the Done button.
  50. In the upper-right region of the page, click the Save and Close button.
  51. You have verified the invocation of the Task Creation event action. Next, verify the invocation of the E-Mail Notification event action.
  52. Locate the Subject of your e-mail. Click the Subject link.
  53. Notice that the field tokens that you inserted while configuring the e-mail notification event action have been replaced with values at run time. You have now verified the invocation of the E-Mail Notification event action.
  54. In the upper-right region of the page, click the Sign Out link.
  55. You have now verified the invocation of all three event actions.

Object Workflows and Business Processes : How They Work Together

This topic uses an illustration to help you understand how object workflows and business processes work together to trigger approval flows.

Overview

You create and deploy an approval flow (also called a project) using Oracle Business Process Composer using the seeded template. You then configure an object workflow with a business process flow event action and configure this event action to call the deployed approval flow. When you trigger the object workflow, the approval process is also triggered.

The approval flow and the object workflow are associated by way of input parameters, which supply the required inputs from object workflows to the approval flow. When the object workflow is triggered, the approval flow is also triggered which starts the approval process that you configured using business process composer.

There are three applications involved in the approval flow process:

This figure illustrates how object workflows and business processes work together.

This figure illustrates how object workflows and
business processes work together

You can use these automated flows to send approval requests, for example, for the following business scenarios. You can use both standard and custom objects to trigger workflows.

These steps provide an overview of how approval flows are triggered using custom fields in a typical scenario. These steps have been described later in this topic using examples.

  1. Create and add custom fields to the desired pages of an object. This object can be a standard or a custom object. You use these custom fields to trigger approval flows and track the status of approvals.

  2. Create an approval flow in Oracle Business Process Composer using the seeded template, and save it as a project. You select this project when configuring the business process flow event action in object workflow.

  3. Create an object workflow using the object to which you added the custom fields:

    1. Set a trigger condition on one of those custom fields.

    2. Select the Business Process Flow event action.

    3. Select the project you created in business process composer and map the input fields that you want to supply to that project (or approval flow) in business process composer.

  4. Trigger the object workflow.

    This triggers the business process flow event action, which in turn triggers the approval flow.

Creating a Custom Object and Adding Fields to Submit and Track Approvals

This section provides an illustration to help you understand how you can submit and track approvals. The fields in this illustration have been used in examples later in this topic when configuring the object workflow.

  1. Create a custom object and its work area.

    For more information on creating custom objects and how you customize and extend your applications, refer Oracle Fusion Applications CRM Extensibility Guide on Oracle Technology Network, at http://www.oracle.com/technetwork/indexes/documentation/index.html.

  2. Create the following (custom) fields and add these to the desired pages of the custom object you just created.

    Note

    If you are creating these fields in a sandbox, you must publish the sandbox to make these fields available for use in the mainline application.

    1. Approvalstatus_c field: This is drop down, fixed-choice list field that holds the status of the approval. Use the lookup type ZCX_HOLD_STATUS to configure these status values as per your business requirement. The default values provided in this lookup type are: APPROVALPENDING, APPROVED, and REJECTED. To capture the approval status, you can use only fields of type text or fixed choice list.

      When you are using the lookup type ZCX_HOLD_STATUS, ensure that it contains the default values or the values that you have specified in this lookup type for tracking the approval status.

    2. Submitforapproval_c field: This is a check box field that you will use to submit approvals. You will use this field to set the trigger condition for object workflows.

Creating and Deploying a Project in Oracle Business Process Composer

This section covers how you create and deploy an approval flow (also called project) in Oracle Business Process Composer.

Note

You must have at least one business process flow deployed for use before defining an object workflow to trigger an approval process.

To access Oracle Business Process Composer:

  1. Navigate to the Application Composer using the main menu of the Oracle Fusion Applications.

  2. From the Overview page of the Application Composer:

    1. Select the Business Processes option.

    2. On the Business Processes page, click Create under the Actions menu.

    3. Enter a meaningful name in the popup.

    4. Click OK.

      If popup blocker is enabled on your browser, the business process composer may not open after you click OK, and your browser may get locked. As a workaround, use the browser back button to go back to the Business Processes option in the application composer, and click Edit for the business process that you were creating.

      This opens the Oracle Business Process Composer in a separate Window.

      Shows the seeded template ExtnBusinessProcess with
the basic CrmCommonSerialApprovalProcess flow.

    This process is based on seeded template ExtnBusinessProcess, which uses the basic CrmCommonSerialApprovalProcess flow.

  3. In the main menu, click Deploy Project.

    Main menu in business process composer

  4. In the Deploy Project popup enter the following information:


    Field

    Value

    Revision ID

    Provide an identifiable ID.

    Deployer Username

    Your sign in name for Oracle Fusion.

    Password

    Your password for Oracle Fusion.

    Mark composite revision as default

    Select this option.

    For more information about the options in this popup and deploying business processes, refer "Deploying a BPM Project" in Oracle Fusion Middleware Business Process Composer User's Guide for Oracle Business Process Management on Oracle Technology Network, at http://www.oracle.com/technetwork/indexes/documentation/index.html.

  5. Click Deploy.

    A confirmation message appears when your project has been deployed successfully.

  6. Close the Oracle Business Process Composer.

  7. Verify whether the project has been deployed successfully.

    1. On the overview page of the application composer, click the Business Processes option

    2. On the Business Processes page, verify that a green check-mark appears under the Deployed column for the project you created.

You can also open Oracle Business Process Composer from object workflows.

  1. Select the Object Workflows option in the application composer.

  2. Create an object workflow with a Business Process Flow event action.

  3. From the Create Action: Business Process Flow page, click the search icon for Projects.

  4. Search a project using a name or directly select the business process flow from the list.

  5. Click Edit.

    This opens the business process composer.

After you have successfully deployed your project, you can now configure the object workflow which triggers this deployed approval process flow.

Setting Conditions and Parameters in Object Workflow to Trigger the Deployed Process

This section covers how you set conditions and parameters in object workflow to trigger the approval flow. This section refers to the field names defined in "Creating a Custom Object and Adding Fields to Submit and Track Approvals" illustration in this topic.

For more information about object workflows, see related topic Object Workflows: Explained.

  1. From the overview page of the application composer, select Object Workflows.

  2. On the Create Object Workflows Page, select the object to which you added the custom fields.

  3. Enter a name for your object workflow.

  4. Define a trigger condition using When a record is updated event point.

    You set the trigger condition on the field that you created and have added to the required pages for submitting an approval. In the illustration, you added a Submitforapproval_c field of type check box, for which the trigger condition will be as follows: isAttributeChanged('Submitforapproval_c') && Submitforapproval=='Y'

  5. Select the Business Process Flow event action.

    1. On the Create Action: Business Process Flow page, provide a meaningful name and description for the business process workflow.

    2. Specify an execution schedule that governs when the event action should be triggered.

    3. Search and select the Project that you deployed.

      This figure shows how you search and select a deployed business process. You can also create or edit a business process using this popup.

      Search and Select Business Process Flow

    4. Specify the Input parameters that you want to pass to the deployed approval flow.

      To pass actual or static values, you must define the parameters as Literal. To do this, either select Literal to insert values when using the Select Default Value dialog , or type-in the parameters while enclosing them in single quotes, for example, 'user1'.

      You can also obtain approvals serially from multiple approvers. For example, to obtain approvals first from user1 and then from user2 for static values, enter 'user1,user2'. Notice that you use single quotes for the entire string without any space in between the values. Similarly, for runtime fields, enter user1,user2

      To pass runtime values, do not define the parameters as Literal. In this case, you do not select Literal in the Select Default Value dialog, or you type-in the parameters without quotes. For example, to pass a runtime field for approver, enter user1.

      This figure illustrates how you select the fields to map from object workflows.

      Select Default Value popup

      You can map only approvers and heldEntityStatusField values.

      In the illustration, you created a custom Approvalstatus_c field for capturing approval status; therefore, you must map the 'Approvalstatus_c' field with the reserved parameter heldEntityStatusField. Additionally, if the approvers are user1 and user2, specify these users as 'user1,user2'. Notice the use of quotes when supplying multiple values.

      This figure illustrates the mapped fields under the inputs region.

      This figure illustrates the mapped fields under
the inputs region

      You can also view these input parameters under Properties of the Start node in Oracle Business Process Composer. See related topic Object Workflows and Business Processes: Critical Choices.

  6. Save the object workflow.

    You have now created and deployed an approval flow, and configured the object workflow that triggers the approval flow.

  7. Trigger the workflow.

    1. Navigate to the page where you added the Submitforapproval_c check box field.

    2. Select the check box

    3. Save the page.

      This satisfies the condition you set for object workflow. The business process flow event action is run, and it triggers the approval flow in the deployed project.

Object Workflows and Business Processes : Critical Choices

This topic covers critical choices and key points to consider when you work with object workflows to trigger a business process, which is specifically an approval flow.

Overview

You create and deploy an approval flow (also called a project) using Oracle Business Process Composer using the seeded template. You then configure an object workflow with a business process flow event action and configure this event action to call the deployed approval flow. When you trigger the object workflow, the approval process is also triggered.

The approval flow and the object workflow are associated by way of input parameters, which supply the required inputs from object workflows to the approval flow. When the object workflow is triggered, the approval flow is also triggered which starts the approval process that you configured using business process composer.

There are three applications involved in the approval flow process:

Object Workflows with Approval Flows: Points to Consider

Following are some of the key considerations involved when working with approval flows and object workflows together:

  1. Deploy at least one project.

    Ensure that a project has been deployed using the seeded template in Oracle Business Process Composer. You deploy a project to make it available for use for configuring object workflows. For information on deployment, see related topic Object Workflows and Business Processes: How They Work Together

  2. Editing Projects.

    You can edit a project only if the type of project is DEV or DEPLOYED_DEV. You cannot edit a project that does not exist in the Development partition of the Oracle Metadata Services (MDS) Repository, or if the type of project is DEPLOYED.

    For more information about Oracle MDS, refer "Understanding a Metadata Repository" in Oracle Fusion Middleware Administrator's Guide on Oracle Technology Network, at http://www.oracle.com/technetwork/indexes/documentation/index.html.

  3. Specifying trigger conditions.

    Ensure that the trigger condition for the object workflow contains the field that you will be updating to trigger the workflow. For example, if you have defined a custom field Submit_c of type check box, the trigger condition would look like: isAttributeChanged('Submit_c') && Submit_c=='Y'.

    A trigger condition is a combination of event point and an expression that supports logical, math operations, or field-value lookups. Defining an expression prevents the triggering of the object workflow each time an update or create event point occurs. For more information on how to set trigger conditions, see Object Workflows: Explained topic.

  4. Specifying input parameters.

    Carefully specify the parameters that you want to map from object workflows to the approval flow in business process composer. The input parameters supply the fields or values to the business process flow when the object workflow is triggered.

    You can map only the following parameters for approval flows:


    Parameter

    Description

    approvers

    Specifies the owner or the one who should receive the approval request.

    heldEntityStatusField

    Specifies the field that displays the status of the approval request.

    To pass actual or static values, you must define the parameters as Literal. To do this, either select Literal to insert values when using the Select Default Value dialog , or type-in the parameters while enclosing them in single quotes, for example, 'user1'.

    This figure illustrates how you select and mark the input parameters as literal.

    Select Default Value popup

    To pass runtime values, do not define the parameters as Literal. In this case, you do not select Literal in the Select Default Value dialog, or you type-in the parameters without quotes. For example, to pass a runtime field for approver, enter user1.

    You can also obtain approvals serially from multiple approvers. For example, to obtain approvals first from user1 and then from user2 for static values, enter 'user1,user2'. Notice that you use single quotes for the entire string without any space in between the values. Similarly, for runtime fields, enter user1,user2

    To see where these input parameters reside in Oracle Business Process Composer, right click on the Start node and select Properties.

    This figure illustrates the input parameters in business process composer.

    Input Parameters In Oracle Business Process Composer

    Notice the heldEntityStatus and approvers parameters. These are the parameters you are mapping to from the object workflows.

  5. Using the seeded template.

    The seeded template ExtnBusinessProcess has the basic CrmCommonSerialApprovalProcess process flow. This template contains an approval process covering a typical CRM use case.

    Any project you create with the seeded template will have CrmCommonSerialApprovalProcess process.

    The seeded template contains services, business rules, and tasks which you can use for configuring approval flows. Select the Project Home tab to see the services, tasks, and rules available.

    This graphic shows the tab under which the services,
tasks, and rules are available in the seeded template

    You can change or add a node or business rules for human task implementation process. For example, you can change SerialGivenUserNameApproval with SerialApprovalGroupApproval; however, when creating or modifying a project, do not attempt the following unless you are sure:

For information on working with business rules, services, and tasks and how to model process flows, refer Oracle Fusion Middleware Modeling and Implementation Guide for Oracle Business Process Management at Oracle Technology Network, at http://www.oracle.com/technetwork/indexes/documentation/index.html.

Sales Lead Approval Flow : Worked Example

This worked example shows you how to use object workflows and business processes to create and trigger an approval process.

In this example, you are a sales administrator and your management has asked you to create a workflow to automate the approval process as follows:

  1. The approval process should be triggered when a sales representative creates a sales lead with a deal amount greater than $100000.

  2. When the approval process is triggered, the sales manager of that representative should automatically receive a request for approving the deal.

As a sales administrator, you will also test this approval process.

Step 1: Create a Field to Track the Approval Status

In this step, you will create a field to track the status of the approval and add this field to the desired pages.

  1. Sign in to Oracle Fusion Applications as an administrator.

  2. Create a sandbox and activate it.

    Sandboxes in Oracle Fusion Applications provide robust out-of-the-box functionality to help isolate and control customization efforts without impacting other users' configuration or production environment, or both. For more information on sandboxes, see Sandboxes: Explained topic.

  3. Navigate to Application Composer.

    The Sales Lead object belongs to marketing application; therefore, select Marketing from the Application drop down.

  4. In the left pane, open the Standard Objects tree.

  5. Select the Sales Lead object.

  6. Select the Fields node.

  7. In the Custom tab, click Create under the Action menu.

    A Select Field Type popup appears.

  8. Select Text in the popup.

  9. Click OK.

    This opens a Create Text Field page.

  10. In the Appearance region, enter the Display Label as Large Deal Approval.

  11. Click Save and Close.

  12. In the left pane, select the Pages node of the Sales Lead object.

  13. Under Enterprise Pages tab, click Create Lead.

  14. In the Create Lead page, move the Large Deal Approval field from the Available Fields box to the Selected Fields box.

  15. Click Save and Close.

    You have now added the custom approval field to the create lead page.

  16. Under Enterprise Pages tab, click Show Details.

  17. In the Show Details page, move the Large Deal Approval field from the Available Fields box to the Selected Fields box.

  18. Click Save and Close.

    You have now added the custom approval field to the show details page.

    At this point, you are working within your sandbox. You have created a custom field and have added that field to two pages.

    Note

    Configurations done within a sandbox for object workflows and business processes are not available to the mainline application unless published.

  19. Publish your sandbox to make these changes available for use in the mainline application.

Step 2: Publish the Sandbox and Verify the Added Field

In this step, you will publish your sandbox and verify that the Large Deal Approval field has been added to the Create Lead and Show Details pages.

When publishing a sandbox, the included application customizations overwrite the mainline application's existing configuration. For more information on creating and managing sandboxes, and the considerations involved when working with sandboxes, see Sandboxes: Explained topic and its related topics.

To publish the sandbox and verify the addition of the fields:

  1. Under the Administration menu, select Manage Sandboxes....

  2. Select your sandbox and click Publish.

  3. Click the Navigator menu at the top.

  4. Click Lead Qualification under Sales.

  5. Click Create Lead.

  6. Verify that Large Deal Approval field has been added to the Create Lead page.

  7. Click Cancel. You will be creating a deal later in this example.

Step 3: Create and Deploy a Business Process

In this step, you will create a business process (also called project) in Oracle Business Process Composer using the seeded template and deploy it.

To create and deploy a process using Oracle Business Process Composer:

  1. Navigate to the Application Composer using the main menu of Oracle Fusion Applications.

  2. From the Overview page of the Application Composer:

    1. Select the Business Processes option.

    2. On the Business Processes page, click Create under the Actions menu.

    3. Enter the Name as Sales Lead Approval in the popup.

    4. Click OK.

      If a popup blocker is enabled on your browser, the business process composer may not open after you click OK, and your browser may get locked. As a workaround, use the browser back button to go back to the Business Processes option in the application composer, and click Edit for the business process that you were creating.

      This opens the Oracle Business Process Composer in a separate Window.

      Shows the seeded template ExtnBusinessProcess with
the basic CrmCommonSerialApprovalProcess flow.

    This process is based on seeded template ExtnBusinessProcess, which uses the basic CrmCommonSerialApprovalProcess flow.

  3. Click Deploy Project using the main menu.

    Main menu in business process composer

  4. In the Deploy Project popup enter the following information:


    Field

    Value

    Revision ID

    Provide an identifiable ID.

    Deployer Username

    Your sign in name for Oracle Fusion Applications.

    Password

    Your password for Oracle Fusion Applications.

    Mark composite revision as default

    Select this option.

    For more information about the options in this popup and deploying business processes, refer "Deploying a BPM Project" in Oracle Fusion Middleware Business Process Composer User's Guide for Oracle Business Process Management on Oracle Technology Network, at http://www.oracle.com/technetwork/indexes/documentation/index.html.

  5. Click Deploy.

    A confirmation message appears when your project has been deployed successfully.

  6. Close the Oracle Business Process Composer.

  7. Verify whether the project has been deployed successfully.

    1. On the overview page of the application composer, select the Business Processes option.

    2. On the Business Processes page, verify that a green check-mark appears under the Deployed column for the project you created.

You have now deployed a project with the name Sales Lead Approval. You will now configure an object workflow to call this process.

Step 4: Configure Object Workflow to Trigger Approval Process

In this step, you will configure an object workflow with a desired trigger condition, and define the input parameters to pass to the Sales Lead Approval process when the object workflow is triggered.

To configure an object workflow:

  1. From the Overview page of the application composer, select Object Workflows.

  2. Select Create from the Actions menu.

  3. On the Create Object Workflows Page, select the Sales Lead object.

  4. In the Name field, enter Deal amount more than USD 10000..

  5. Select When a record is created event point.

    Click on the Groovy Builder icon.

    In the groovy builder, enter the following event condition:

    if(DealAmount>10000 && CurrencyCode=='USD') return true;

  6. Click OK.

  7. In the Actions region, select Business Process Flow and configure the event action as follows:

    1. On the Create Action: Business Process Flow page, enter Sales Lead Approval in the Name field.

    2. In the Project Name field, search and select Sales Lead Approval project that you deployed.

      This figure shows how you search and select a deployed business process. You can also create or edit a business process using this popup.

      Search and Select Business Process Flow

    3. Click OK.

    4. In the Inputs region, specify the input parameters that you want to pass to the deployed approval flow using the Select Default Value button. You can also type-in these parameters. .

      You must mark these values as Literal so as to pass the actual name.


      Name

      Default Value

      approvers

      'SALES_MANAGER'

      heldEntityStatusField

      'LargeDealApproval_c'

      Note

      You can map only approvers and heldEntityStatusField values.

  8. After inserting the input parameters, click Save to save the business process event action.

  9. Click Save to save the object workflow.

You have now configured the object workflow to trigger the approval flow.

Step 5: Trigger and Test the Approval Process

In this step, you will first trigger the workflow and test whether the approval process runs fine.
  1. Sign in to Oracle Fusion Applications using SALES_REPRESENTATIVE role.

  2. Click the Navigator menu at the top.

  3. Click Lead Qualification under Sales.

  4. Click Create Lead.

  5. Enter the Name as New Deal.

  6. Create a lead with a Deal Size of 120000 USD.

  7. Click Save.

    This action triggers the object workflow, because the deal size you have just entered is greater than 10000 USD.

    To verify whether the workflow has been triggered, you may check the status in the approval field.

  8. Edit New Deal lead.

    Note the status in the Large Deal Approval field, which has been set to APPROVALPENDING by default.

    You are currently signed in with a sales representative role. You must first sign out and then sign in as a sales manager to approve the request.

  9. Sign out of Oracle Fusion Applications.

  10. Sign in to Oracle Fusion Applications using SALES_MANAGER role.

    A new task or request appears on the Home page under the Worklist region.

  11. Approve the request.

    At this point, you are signed in as a sales manager. You must first sign out and then sign in as a sales representative to verify whether the status in the Large Deal Approval field has changed.

  12. Sign out of Oracle Fusion Applications.

  13. Sign in to Oracle Fusion Applications with a SALES_REPRESENTATIVE role.

  14. Navigate to Lead Qualification.

  15. Edit New Deal.

  16. Verify that the status in the Large Deal Approval has been set to APPROVED.

    You have now verified that the approval process was successfully triggered via object workflows.

FAQs for Creating Object Workflows

Why are some e-mail templates invalid?

E-mail templates can become invalid if the corresponding template file of the e-mail template cannot be found in the file repository. This can happen if the template file was migrated elsewhere, or deleted accidentally. Contact your application administrator to attempt to recover the template file by reviewing your file repository setup. If the file cannot be recovered, then you can delete the e-mail template and create a new one.