Professional Documents
Culture Documents
Filewatch PDF
Filewatch PDF
Filewatch PDF
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.
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.