miércoles, 13 de abril de 2016

Workflow_Background_Process

Performance Degradation when the Workflow Background Process is Running (Doc ID 743338.1)
===========================================================================
Program Name   : Workflow Background Process /-> Proceso de Segundo Plano de Workflow
Short Name   : FNDWFBG
Description   : Workflow background process for deferred and timeout activities
Application   : Application Object Library
------> le OTRO pROCESO
FNDWFPR module: Depurar Datos Obsoletos de Tiempo de Ejecución de Workflow
Purge Obsolete Workflow Runtime Data (FNDWFPR)


Performance Degradation when the Workflow Background Process is Running [ID 743338.1]
Solution

To implement the solution, please execute the following steps:

1) Using System administrator responsibility, navigate to Concurrent\Requests form.

2) In this screen, remove the scheduling for the existing Workflow Background Process.

3) Still using this screen, schedule a new Workflow Background Process to be executed every 5 minutes with the following parameters:
- Item Type = NULL
- Minimum Threshold = NULL
- Maximum Threshold = NULL
- Process Deferred = Y
- Process Timeout = N
- Process Stuck = N

This Workflow Background Process will run every 5 minutes and will process only the deferred activities.

4) Then schedule a new Workflow Background Process to be executed every 60 minutes with the following parameters:
- Item Type = NULL
- Minimum Threshold = NULL
- Maximum Threshold = NULL
- Process Deferred = N
- Process Timeout = Y
- Process Stuck = N

This Workflow Background Process will run every 60 minutes and process only the timed out workflow activities.


5) Schedule a new Workflow Background Process to be executed every week with the following parameters:
- Item Type = NULL
- Minimum Threshold = NULL
- Maximum Threshold = NULL
- Process Deferred = N
- Process Timeout = N
- Process Stuck = Y

This Workflow Background Process will run once a week and process only the stuck workflow processes. In addition it is better to schedule it so it runs when the load on the system is low.


Note: if a given item type has very high volumes of deferred activities to process, in addition to the above scheduling you may need to schedule an additional Workflow Background Process to handle the deferred activities of this item type.

--> todo estos deben estar activos::::::

SELECT fcq.user_concurrent_queue_name container_name
      , decode(fcp.os_process_id,
               NULL,
               'Not
Running',
               fcp.os_process_id) procid
      ,fcq.max_processes target
      ,fcq.running_processes actual
      ,fcq.enabled_flag enabled
      ,fsc.component_name
      ,fsc.startup_mode
      ,fsc.component_status
  FROM apps.fnd_concurrent_queues_vl fcq
      ,apps.fnd_cp_services          fcs
      ,apps.fnd_concurrent_processes fcp
      ,fnd_svc_components            fsc
 WHERE fcq.manager_type = fcs.service_id
   AND fcs.service_handle = 'FNDCPGSC'
   AND fsc.concurrent_queue_id = fcq.concurrent_queue_id(+)
   AND fcq.concurrent_queue_id = fcp.concurrent_queue_id(+)
   AND fcq.application_id = fcp.queue_application_id(+)
   AND fcp.process_status_code(+) = 'A'
 ORDER BY fcp.os_process_id
         ,fsc.startup_mode;
=======================================================================
 La config. estándar es cada 5 minutos por eso se programó de esa manera pero, si se necesita un menor
 tiempo de respuesta se puede programar un menor intervalo siempre y cuando se indique la opción
 "From the completion of the prior run" en la programación.

Se ha cambiado la programación del concurrente "Workflow Background Process" a lo siguiente:

Programación 1:

Parámetros:
- Process Deferred = Y
- Process Timeout = N
- Process Stuck = N

Programación: Cada 3 minutos, con la opción "From the completion of the prior run" que cuenta el tiempo
para que vuelva a comenzar desde el término del concurrente.

Programación 2:

Parámetros:
- Process Deferred = N
- Process Timeout = Y
- Process Stuck = N

Programación: Cada 1 hora, con la opción "From the completion of the prior run" que cuenta el tiempo
para que vuelva a comenzar desde el término del concurrente.

Programación 3:

Parámetros:
- Process Deferred = N
- Process Timeout = N
- Process Stuck = Y

Programación: Cada 1 semana, los sabados a la 1:30pm. con la opción "From the completion of the prior run"
que cuenta el tiempo para que vuelva a comenzar desde el término del concurrente.

Explicación de Parámetros:

PROCESS DEFERRED: Verifica procesos diferidos.

PROCESS TIME OUT: Verifica procesos que han sido indicados con time out.

PROCESS STUCK: Verifica procesos estancados.

Importante:

Probar con esta configuración. Se ha estimado que con la programación 1 a un intervalo de 3 minutos
entre cada ejecución no debe haber problemas pero, de todas maneras se debe observar el comportamiento
de la aplicación y verificar que el performance no ha sido afectado. Si el performance ha sido degradado
se debe incrementar el valor del intervalo de la programación 1 gradualmente.