Vous êtes sur la page 1sur 4

Name of Solution:

Mapping : Email On Non occurrence of Event

Business Requirement:
An Informatica Workflow example to complete a workflow if the file-watch event does not
occur within the desired time.

Solution URL:
https://community.informatica.com/solutions/2886

Supported Versions:
PowerCenter 9.1 and above

Description:
Overview
A flat file is being used as a source to load a target system at regular intervals. You want to
run a session based on a predefined event, such as the flat file appearing as part of a
nightly batch load. You configure an Event-Wait task to run when an indicator file appears.
Sometimes, the latest source file may not be available for loading, perhaps due to a source
dependency. If the source does not trigger the script that creates the indicator file within a
defined period, you want to receive notification and stop the workflow. Alternatively, if the
file arrives in time, you want to run the session and receive notification.
Solution Description
This example outlines a process to complete a workflow and send an email notification if a
specified event does not occur in a given period of time. A workflow that uses an Event-Wait
task to wait for a predefined or user-defined event, such as a file-watch event, may cause
the Integration Service to wait indefinitely until that event has occurred. A workaround is
demonstrated.
The solution is based on creating a workflow with two branches.
The primary branch of the workflow includes the Event-Wait task that will be triggered by
the file-watch event. The primary branch executes if the event occurs within the desired
time, configured through a workflow variable. An Email task sends out a success
notification. The Command task, then stops the secondary workflow.
The secondary branch of the workflow includes an Assignment task that makes the workflow
wait for a given period of time, controlled by a Timer task. The secondary branch executes if
the file-watch event does not occur within the desired time. An Email task sends out a
failure notification, and a Command task stops the workflow.

Download file contents:


1. Workflow
2. Source File
3. Document

Steps to implement the solution:


1. Place source file in $PMSourceFileDir folder.
2. Import workflow using the Repository Manager. Select the appropriate folder from
the repository and resolve the conflicts by choosing suitable option.
3. Open the workflow in Workflow Manager. Assign the integration service in Workflow > Edit -> Integration Service.
4. Observe the Workflow logic as shown below,

5. Observe the Event wait task, the path of the Source file need to be specified in the
predefined section as shown below.

6. In the Assignment task we are assigning the date value for the workflow variable
$$WAITTIME.
Note: This value is the amount of time the file watcher needs to wait for the file to
arrive. User needs to modify this according to his requirement.

7. Observe the Command task, if the file arrived within the specified time, then
command task will stop the execution of the Timer task and continue with the
execution of the session.

8. If the file does not arrive, then the Event wait task waits till the specified time. It
sends an email to the operator with failure message and stops the workflow.

Note: This logic may get failed if the file arrived after the timer task finished its job,
then command task may get failed which try to stop timer task (which is already
stopped).
9. Edit session and assign valid connection object for the source and target.
10. For more details of importing object, please visit our YouTube link.
11. Execute the workflow and observe the target files.

YouTube Video on Importing and Configuring Workflows:


http://www.youtube.com/playlist?list=PLLRreK2jjjgWBQ4NPfp0QWTxYDvlnEqSJ

Other Useful links:


Mapping Bundles
Workflow Bundles
Informatica Tools Bundles
Informatica for Social Media Bundles
Debugging Tools Bundles
Visio Templates Bundles
B2B Templates and Projects Bundles
Data Quality Packs and Plans Bundles
Script Bundles