Event tasks – event wait and event raise

An event is simply a functionality that you wish to implement in a workflow. Informatica PowerCenter has some system-defined events, and you can define user-defined events as well.

There are two types of events:

  • The Event Wait task: This is the task that waits for a particular event to occur. You can define the event for which the Event Wait task should wait. Once triggered, the Event Wait task will wait infinitely for the specified event. As soon the event occurs, the Event Wait succeeds and triggers the next task in the workflow.

    In the Event Wait task, you can define system-defined events (predefined events) or user-defined events.

  • Event Raise task: As opposed to Event Wait, the Event Raise task triggers a particular event in the workflow.

    You can define only user-defined events in the Event Raise task.

Informatica PowerCenter events can be of two types—predefined or user-defined:

  • Predefined events: These are also referred to as system-defined events. They are generally called file-watch events. You can use these events to wait for a specified file at a specific location. Once the file arrives at the path mentioned, the Event Wait or File Watcher triggers the rest of the tasks in the workflow.
  • User-defined events: You can create an event of your own based on the requirement. An Event Raise task is nothing but a sequence of tasks in the workflow. To use a user-defined task, define the event under the workflow.

Before you can use user-defined events under event tasks, you need to create the event at the workflow level. Perform the following steps to add the event to the workflow:

  1. Open the workflow in the Workflow Manager for which you wish to add a user-defined event, and then navigate to Workflow | Edit | Events.
    Event tasks – event wait and event raise
  2. Add a new event, as shown in the preceding screenshot. Then, click on OK.

Creating an event (wait/raise) task

To create an Event Wait or Event Raise task in Workflow Manager, perform the following steps:

  1. In Workflow Manager, navigate to Task | Create.
  2. From the list of tasks, select the Event Wait or Event Raise task and specify the name of the task, which is ew_TASK_NAME or er_TASK_NAME. For our reference, we are using the Event Wait task name as ew_WAIT_FOR_FILE and the Event Raise task name as er_TRIGGER_TASK. Click on Create, and then click on Done.

    The dialog box for the Event Wait task is shown as follows:

    Creating an event (wait/raise) task

    The dialog box for the Event Wait task is shown as follows:

    Creating an event (wait/raise) task

    The Event (Wait/Raise) task appears in Workflow Manager. Use the link task to connect the start task with the event tasks.

    Creating an event (wait/raise) task

    Note that you can use the Event Wait and Event Raise tasks individually as well. We have used both the tasks together for reference purposes.

  3. Double-click on the Event Raise task and click on Properties. Add a new user-defined event, as shown in the following screenshot:
    Creating an event (wait/raise) task
  4. Double-click on the Event Wait task to open the task in the edit view. If you wish to use the Predefined task, specify the path and filename in the option. If you wish to use the User-Defined name, click on the add new event option. Then, click on OK.
    Creating an event (wait/raise) task

    For our reference, we have added a predefined event called the file-watch event. We have added UNIX/PROJ/SRCFILES/SOURCE_FILE.txt as the event wait file.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset