You are on page 1of 2

Adapt Workflows for Incident Management

Use

In this activity, you can learn about the organizational activities for adapting the workflows of SAP Business
Workflow to suit your customer-specific processes. The process foundation of the Environment, Health, and
Safety component makes integration with workflows possible. You can adapt workflows to your processes in
the following ways:

 Change the workflow template

 Add steps within a process

 Call further logic from a workflow task (process step)

 Use a dispatcher to send notifications about changes to the data record

Requirements

You have specified processes for the health and safety (HSS) component in the Customizing activity Specify
Process Definitions for Foundation for EHS.

You have checked the processes by implementing the Customizing activity List Configured Processes for
Foundation for EHS.

Standard settings

The standard system is delivered with examples.

Setting up incident workflows

The following workflow templates are delivered with the corresponding PCO class and event:

WF Template PCO Class Name and Event


500001 - EHHSS_INC CL_EHHSS_PCO_INC_LC
500002 - EHHSS_INQY CL_EHHSS_PCO_INC_INQUIRY
500003 - EHHSS_APPR CL_EHHSS_PCO_INC_APPROVAL
500005 - EHHSS_ACT CL_EHHSS_PCO_INC_ACTION_STD
500031 - EHHSS_INV_LC CL_EHHSS_PCO_INV_LC
500032 - EHHSS_INVSTP CL_EHHSS_PCO_INV_STEP
500034 - EHHSS_REPORT CL_EHHSS_PCO_INC_REPORT
500036 - EHHSS_ACT_PM CL_EHHSS_PCO_INC_ACTION_PM
500039 - EHHSS_HR_ABS CL_EHHSS_PCO_INC_HR_ABSENCE
500040 - EHHSS_HRANTF CL_EHHSS_PCO_INC_HR_ABS_NOTI
500051 - EHHSS_RPT_CR CL_EHHSS_PCO_INC_REPORT_GEN

Setting up a fatality notification workflow

If you want set up a fatality notification, do not make changes to the current process definition for the incident
lifecycle process in the Customizing activity Specify Process Definitions.
When a fatality is recorded in incident management, the fatality notification functionality raises the event
FATALITY_OCCURRED of the incident workflow adapter class (CL_EHHSS_INC_WF_ADAPTER). Workflow
WS00500006 retrieves all persons to be notified and then sends the fatality notification to each person via e-
mail.

Activities

To adapt workflows, you can perform the following activities:

 You can change the process flow directly in the workflow template (in the Workflow Builder), or copy
the delivered template to the customer-specific namespace.

 You can add additional steps within a process by performing the following steps:

1. Change the workflow template (or copy the delivery to the customer-specific namespace)
2. Create further steps and (if necessary) workflow tasks in the customer-specific namespace in the
Customizing activity Define Tasks and Actions for Cross-Application Components.
3. Add the new tasks to the workflow inbox configuration in the Customizing activity Assign Task IDs
to POWL Types for Cross-Application Components. Enter the application ID EHHSS_INBOX and the
POWL type EHHSS_INBOX_TYPE for your task.
4. Activate the workflow template.

 You can add logic that can be called from a workflow task (process step) by performing the following
steps:

1. Create a PCO class that inherits from the delivered class of the process that is specified in the
Customizing activity Configure Process Definitions. It is recommended to inherit from the delivery
class and adapt it with further public methods. To include your business logic, use one of the following
two options:

o Implement the logic directly in the PCO method.

o Implement the logic in a BOPF action of the corresponding process control business object
(PCBO). Note: this is the architecture that Environment, Health, and Safety follows.

2. Use the standard event (WORKITEM_COMPLETED) if you open a dialog and the workflow has to
wait for an event. If you want to use a more specific event, you must define the new event on the PCO
class. For the dialog to raise the new event to continue the workflow, you can use the static method
RAISE_WF_EVENT of the root PCO CL_EHFND_WFF_ROOT_PCO.
3. After you have finished implementing and adapting the workflow template, configure the new PCO
class in the process definition in the Customizing activity Configure Process Definitions for Incident
Management.

 You can use the dispatcher workflow to react to changes in the incident with an automatic notification.
To add to the current changes that trigger a notification via the dispatcher process, start the dispatcher
workflow and extend the workflow template as required.