11 Configuring BPEL Process Service Components and Engines

This chapter describes how to configure BPEL process service components and service engines.

This chapter includes the following topics:

11.1 Configuring BPEL Process Service Engine Properties

You can configure BPEL process service engine properties, which are used by the BPEL process service engine during processing of BPEL service components.

To configure BPEL process service engine properties:

  1. Access this page through one of the following options:

    From the SOA Infrastructure Menu... From the SOA Folder in the Navigator...
    1. Select SOA Administration > BPEL Properties.
    1. Right-click soa-infra.
    2. Select SOA Administration > BPEL Properties.


    The BPEL Service Engine Properties page displays properties for setting audit trail and large document thresholds, setting dispatcher thread properties, validating payload schema, and setting the audit trail level.

    Description of soaadmin_bpel_props.gif follows
    Description of the illustration soaadmin_bpel_props.gif

  2. Make changes to the service engine properties that are appropriate to your environment.

    Property Description
    Audit Level Select one of the following options:
    • Off: Composite instance tracking and payload tracking information is not collected.

    • Inherit: Logging equals the SOA Infrastructure audit level. This setting enables the BPEL audit level to automatically change when the global setting is changed. Setting a different audit level tracking in this page overrides the tracking set at the SOA Infrastructure level.

    • Minimal: The BPEL service engine does not capture any audit details. Therefore, they are not available in the flow audit trails. All other events are logged.

    • Production: The BPEL service engine does not capture the payload. The payload details are not available in the flow audit trails. Payload details for other BPEL activities are collected, except for assign activities. This level is optimal for most standard operations and testing.

    • Development: Allows both composite instance tracking and payload tracking. All events are logged. However, it may have an impact on performance. This level is useful mostly for debugging purposes.

    Audit Trail Threshold Enter the maximum size in bytes of an instance audit trail before it is chunked and saved in a dehydration store table separate from the audit trail. If the threshold is exceeded, the View XML link is shown in the audit trail instead of the payload.
    Large Document Threshold Enter the maximum size of a generated document within a BPEL process component instance before it is stored in a separate table in the dehydration store.
    Dispatcher System Threads Specify the total number of threads allocated to process system dispatcher messages. System dispatcher messages are general cleanup tasks that are typically processed quickly by the server (for example, releasing stateful message beans back to the pool). Typically, only a small number of threads are required to handle the number of system dispatch messages generated during runtime.

    The default value is 2 threads. Any value less than 1 thread is changed to the default.

    Dispatcher Invoke Threads Specify the total number of threads allocated to process invocation dispatcher messages. Invocation dispatcher messages are generated for each payload received and are meant to instantiate a new instance. If the majority of requests processed by the engine are instance invocations (as opposed to instance callbacks), greater performance may be achieved by increasing the number of invocation threads. Higher thread counts may cause greater CPU utilization due to higher context switching costs.

    The default value is 20 threads. Any value less than 1 thread is changed to the default.

    Dispatcher Engine Threads Specify the total number of threads allocated to process engine dispatcher messages. Engine dispatcher messages are generated whenever an activity must be processed asynchronously. If most of the processes deployed are durable with a large number of dehydration points (midprocess receive, onMessage, onAlarm, and wait activities), greater performance may be achieved by increasing the number of engine threads. Note that higher thread counts can cause greater CPU utilization due to higher context-switching costs.

    The default value is 30 threads. Any value less than 1 thread is changed to the default.

    Payload Validation Select to enable validation of inbound and outbound messages. Nonschema-compliant payload data is intercepted and displayed as a fault.

    Note: This setting is independent of the SOA composite application and SOA Infrastructure payload validation level settings. If payload validation is enabled at both the service engine and SOA Infrastructure levels, data is checked twice: once when it enters the SOA Infrastructure, and again when it enters the service engine.

    Disable BPEL Monitors and Sensors Select this checkbox to disable all BPEL monitors and sensors defined for all BPEL components across all deployed SOA composite applications.

  3. Click Apply.

  4. If you want to configure advanced BPEL properties in the System MBean Browser, click More BPEL Configuration Properties. Properties that display include, but are not limited to, the following. Descriptions are provided for each property.

    • BpelcClasspath — The extra BPEL class path to include when compiling BPEL-generated Java sources.

    • DisableAsserts — Disables the execution of assertions in BPEL, including the bpelx:assert activity.

    • DisableSensors — Disables all calls to sensors.

    • ExpirationMaxRetry — The maximum number of times a failed expiration call (wait/onAlarm) is retried before failing.

    • ExpirationRetryDelay — The delay between expiration retries.

    • InstanceKeyBlockSize — The size of the block of instance IDs to allocate from the dehydration store during each fetch.

    • MaximumNumberOfInvokeMessagesInCache — The number of invoke messages stored in in-memory cache.

    • MaxRecoverAttempt — The number of automatic recovery attempts to submit in the same recoverable instance. For more information, see Section 11.3, "Configuring Automatic Recovery Attempts for Invoke and Callback Messages."

    • OneWayDeliveryPolicy — Changes whether one-way invocation messages are delivered.

    • StatsLastN — The size of the most recently processed request list.

    • SyncMaxWaitTime — The maximum time a request and response operation takes before timing out.

  5. Make changes appropriate to your environment.

11.2 Configuring Automatic Recovery for Oracle BPEL Process Manager

Oracle SOA Suite provides an automatic recovery feature in Oracle Enterprise Manager Fusion Middleware Control that enables you to configure and recover:

  • All activities (for example, wait activities and OnAlarm branches of pick activities) that have an associated expiration date and are scheduled with the SOA Infrastructure to be rescheduled

  • All activities that are not complete over a provided threshold time

  • All invoke and callback messages that are unresolved

To configure automatic recovery:

  1. In the navigator, right-click soa-infra and select SOA Administration > BPEL Properties.

  2. Click More BPEL Configuration Properties.

  3. In the Name column, click RecoveryConfig.

  4. Expand RecurringScheduleConfig.

    This section enables you to configure recurring recovery attempts.

  5. Set the following properties to values appropriate to your environment, and click Apply.

    Property Description
    maxMessageRaiseSize The maximum number of messages to submit for each recurring recovery attempt. Use this property to limit the impact of recovery on the server. Note that this value specifies the maximum number of messages to filter from activity, invoke, and callback queries; that is, 50 messages from each of the activity, invoke, and callback tables.

    The default value is 50. A negative value causes all messages selected from the database to be submitted for recovery. A 0 value causes no messages to be selected from the database (effectively disabling recovery).

    startWindowTime The start time for the daily recovery window, specified in a 24-hour notation. Therefore, 2:00 pm is specified as 14:00. The leading zero does not need to be specified for single digit hour values (1:00-9:00).

    The default value is midnight (00:00). Any invalid parsed time value is defaulted to midnight.

    stopWindowTime The stop time for the daily recovery window, specified in a 24-hour notation. Therefore, 2:00 pm is specified as 14:00. The leading zero does not need to be specified for single digit hour values (1:00-9:00).

    If you do not want daily recovery, set the start and stop window times to be the same value. If the stop window time is earlier than the start window time, both the start and stop window times are changed to their respective default values.

    The default value is midnight (04:00), effectively setting recurring recovery to run until 04:00.

    Any invalid parsed time values default to 00:00.

    subsequentTriggerDelay The number of seconds between recovery attempts during daily recurring startup recovery periods. If the next recovery trigger falls outside of the current recovery period, that trigger is not scheduled until the next recurring recovery period (tomorrow).

    The default value is 300 (five minutes). A negative value causes the default to be selected.

    threshHoldTimeInMinutes This is the threshold time in minutes to ignore for automatic recovery processing. For automatic invoke and callback recovery, this value is used for picking messages with a received date less than the threshhold time.

    For automatic activities recovery, this value is used for picking activities with a modification date less than the threshhold time.

    This property prevents the message contention scenario in which a BPEL process service engine picks up a message for recovery while another thread on the service engine is in the middle of processing the message. This property ensures that the recovery part of the service engine only attempts recovery on messages older than the value for threshHoldTimeInMinutes.

    The default value is 10 minutes. A negative value causes the default to be selected.


  6. Expand StartupScheduleConfig.

    This section enables you to configure server startup recovery attempts.

  7. Set the following properties to values appropriate to your environment, and click Apply.

    Property Description
    maxMessageRaiseSize The maximum number of messages to submit for each startup recovery attempt. Use this property to limit the impact of recovery on the server. Note that this value specifies the maximum number of messages to filter from activity, invoke, and callback queries; that is, 50 messages from each of the activity, invoke, and callback tables.

    The default value is 50. A negative value causes all messages selected from the database to be submitted for recovery. A zero value causes no messages to be selected from the database (effectively disabling recovery).

    startupRecoveryDuration Specifies the number of seconds that the startup recovery period lasts. After the server starts, it goes into a startup recovery period. During this period, pending activities and undelivered callback and invocation messages are resubmitted for processing.

    The default value is 600 (ten minutes). A negative or zero value disables startup recovery.

    subsequentTriggerDelay The number of seconds between recovery attempts during the server startup recovery period. If the next recovery trigger falls outside the server startup period, that trigger is not scheduled and the server moves into the recurring recovery period.

    The default value is 300 (five minutes). A negative value causes the default to be selected.


Note:

In a cluster, it is possible for different nodes to concurrently attempt an automatic recovery of the same items. The first node to lock the item attempts the recovery, while other nodes may raise an exception that can be safely ignored.

11.3 Configuring Automatic Recovery Attempts for Invoke and Callback Messages

You can configure the number of automatic recovery attempts to submit in the same recoverable instance. The value you provide specifies the maximum number of times invoke and callback messages are recovered. If the value is 0 (the default value), it recovers all messages. Once the number of recovery attempts on a message exceeds the specified value, a message is marked as nonrecoverable.

To configure automatically recovery attempts for invoke and callback messages:

  1. In the navigator, right-click soa-infra and select SOA Administration > BPEL Properties.

  2. Click More BPEL Configuration Properties.

  3. Go to MaxRecoverAttempt.

  4. In the Value field, enter a value.

  5. Click Apply.

For information about recovering invoke and callback messages, see Section 13.4, "Performing BPEL Process Service Engine Message Recovery."

11.4 Setting the Audit Level at the BPEL Process Service Component Level

You can set the audit level for a BPEL process service component. This setting takes precedence over audit level settings at the SOA Infrastructure, service engine, and SOA composite application levels. The service component level setting is only available for BPEL processes and is not supported for the mediator, human workflow, and business rule service components.

There are two ways to set the audit level for BPEL process service components. Supported values are Off, Minimal, Inherit, Development, and Production.

  • In the System MBean Browser of Oracle Enterprise Manager Fusion Middleware Control:

    1. In the navigation tree, expand the SOA folder.

    2. Right-click soa-infra, and select Administration > System MBean Browser.

    3. Select Application Defined MBeans > oracle.soa.config > Server: server_name > SCAComposite > Composite_Name > SCAComposite.SCAComponent > BPEL_Service_Component > Properties.

    4. Click the Add icon.

    5. Expand the Element_number folder.

    6. From the many list, select false.

    7. In the name field, enter bpel.config.auditlevel.

    8. In the value field, enter a value.

    9. Click Apply.

  • In Oracle JDeveloper:

    1. Set the bpel.config.auditLevel property to an appropriate value in the composite.xml file of your SOA project.

      <component name="BPELProcess"> 
         <implementation.bpel src="BPELProcess.bpel" /> 
         <property name="bpel.config.auditLevel">Off</property> 
      </component>
      

For more information about audit levels, see Section 1.4.1.1, "Introduction to the Order of Precedence for Audit Level Settings."