WORKING WITH EVENT TASKS
We can define events in the workflow to specify the
sequence of task execution.
Use the following tasks to help you use events in the workflow:
v
Event-Wait task. The Event-Wait task waits for an event to
occur. Once the event triggers, the Integration Service continues executing the
rest of the workflow.
Types of Events:
·
Pre-defined event: A pre-defined event is a file-watch event. This event
waits for a specified file to arrive at a given location or directory.
Let us try to understand it with an example. You
wanted to wait for a file to arrive in a directory while keeping the workflow
on running mode. Once the file arrives in the directory the mapping session
should automatically be kicked off to load the data into target.
·
User-defined event: A user-defined event is a sequence of tasks
in the Workflow. We create events and then raise them as per need. In this case
we first raise a user defined event and then configure the event wait which
will wait for user defined event to occur and triggers the next session in the
workflow
EVENT RAISE: Event-Raise task represents a
user-defined event. We use this task to raise a user defined event.
EVENT WAIT: Event-Wait task waits for a
file watcher event or user defined event to occur before executing the next
session in the workflow.
Scenario:-
You have two sessions. The first session first
remove the duplicates from the file (s_remove_dups) and once this gets
completed then you need to run another session which calculates minimum and
maximum salary (s_max_min_sal)
How to configure
User-defined event
·
Workflow -> Create ->
Give name wf_event_wait_event_raise -> Click ok.
·
Workflow -> Edit ->
Events Tab and add events EVENT1 there.
·
Drag “s_remove_dups”
·
Click Tasks -> Create
-> Select EVENT RAISE from list. Give name.
·
Right click
event_raise_example -> EDIT -> Properties Tab -> Open Value for User
Defined Event and Select EVENT1 from the list displayed. Apply -> OK.
·
Click link
between event_raise_example and s_remove_dups and give the condition
$s_remove_dups.Status=SUCCEEDED
·
Click Tasks
-> Create -> Select EVENT WAIT from list. Give name event_wait_example.
Click Create and then done.
·
Link
event_wait_example to START task.
·
Right click
event_wait_example -> EDIT-> EVENTS tab.
·
Select User
Defined there. Select the Event1 by clicking Browse Events button.
·
Apply -> OK.
·
Drag
s_max_min_sal and link it to event_wait_example.
·
Mapping ->
Validate
·
Repository
-> Save.
·
Run workflow
and see.
Screenshot
of Details
Thanks for this descriptive note...
ReplyDelete