<?xml version="1.0" encoding="utf-8"?>
<ManualTopic ID="/baanerp/da/onlinemanual/trg_overview" xml:lang="en">
	<Header>
		<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Overview</Title>
		<Keyword ContextSensitive="No"><Level1>Triggering</Level1>
		</Keyword>
		<Keyword ContextSensitive="No"><Level1>i-Flow</Level1>
		</Keyword>
	</Header>
	<AimSection><Paragraph class="Default">You can use Triggering if another site or application must be notified when an event occurs in ERP LN.</Paragraph>
	</AimSection>
	<GeneralSection><Paragraph class="Default">For that purpose, the Triggering (TRG) module is available in the Data Director (da) package.</Paragraph>
		<List><ListIntro>This module is a small component in ERP LN that does the following:</ListIntro>
			<ListItem>Receives an event.</ListItem>
			<ListItem>Checks whether the event meets certain conditions.</ListItem>
			<ListItem>Takes a predefined action.</ListItem>
		</List>
	</GeneralSection>
	<GeneralSection><SectionTitle>Important terms</SectionTitle>
		<TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated"><THEAD><TR><TD rowspan="1" colspan="1">Term</TD>
					<TD rowspan="1" colspan="1">Description</TD>
				</TR>
			</THEAD>
			<TBODY><TR><TD rowspan="1" colspan="1">Event</TD>
					<TD rowspan="1" colspan="1">An event is a message that states that something happened. An event can for example be the creation of a new sales order, the change of a price, or the receipt of a payment. In addition to the type of event, the event also contains data related to the event, such as the identifier of the object on which the event occurred, for example, an order number, and the data that was changed. For more information on events, refer to Chapter 3, "Event handling."</TD>
				</TR>
				<TR><TD rowspan="1" colspan="1">Condition</TD>
					<TD rowspan="1" colspan="1">Conditions are used because not all events are valid. For example, notification of a newly created order might only be required if the order is entered manually. Notification of a change might only be required if a particular status is reached.</TD>
				</TR>
				<TR><TD rowspan="1" colspan="1">Action</TD>
					<TD rowspan="1" colspan="1">The action describes what you must do if an event occurs. This can, for example, be the execution of a program or the creation of an XML file that the receiving application can pick up.</TD>
				</TR>
			</TBODY>
		</TABLE>
	</GeneralSection>
	<GeneralSection><SectionTitle>Origin of events</SectionTitle>
		<List><ListIntro>An event can be generated from multiple sources, such as the following:</ListIntro>
			<ListItem> 
                                 ERP LN sessions can create events: This requires a customization of these sessions. This type of customization can be either visible to the user, for example, by adding a button to a session, or invisible, for example, by adding lines to a program script that creates an event if a specific situation occurs.</ListItem>
			<ListItem>Change events for created, changed, or deleted objects can be created from the Exchange module. In case of deleted objects, an exchange job runs regularly to collect changes on ERP LN data and creates an event for each of these changes. The changes are collected from the audit trail.</ListItem>
			<ListItem>You can use the triggering mechanism to synchronize regularly complete data sets, because the Exchange module can regularly read a specific set of data and create the corresponding events that describe the current status of the data. You can use this method to notify another application or site from the current status of the data set, if the data set is small. For this reason, keeping track of the changes is not worthwhile.</ListItem>
			<ListItem>You can generate events using a timer. As a result, an event occurs regularly, irrespective of the ERP LN application or ERP LN data. In that case, the action must specify what must happen.</ListItem>
		</List>
	</GeneralSection>
	<GeneralSection><Figure space-and-orientation="indented-estimated"><FigIntro>The following figure provides an overview of the solution.</FigIntro>
			<HTML:IMG height="512" width="693" SRC="../images/tr_graph_trg_overview1.gif" path="/enterpriseserver/add-ons/da/onlinemanual" btb-count="1" btb-count2="1" btb-image-name="tr_graph_trg_overview1.gif" btb-source-path="C:\SVN\docnl\Technology\EnterpriseServer~8.5\EnterpriseServer" btb-image-path="/enterpriseserver/add-ons/da/images/tr_graph_trg_overview1.gif" ID="IDAB3V5B" alt="[...]" xmlns:HTML="http://www.w3.org/TR/REC-html40"/><FigCaption>Solution overview</FigCaption>
		</Figure>
	</GeneralSection>
	<GeneralSection><SectionTitle>Runtime actions</SectionTitle>
		<ProcedureList><ListIntro>The following example illustrates what happens at runtime in the exchange-based scenario:</ListIntro>
			<ListItem>Changes are made to the OLTP (online transaction processing) database by users or by other processes that result in changes.</ListItem>
			<ListItem>Changes on relevant tables are logged in the audit trail.</ListItem>
			<ListItem>The exchange process runs regularly in a job.</ListItem>
			<ListItem>The exchange process picks up the changes from the audit trail and processes the changes according to the defined scheme.</ListItem>
			<ListItem>The exchange scheme creates XML events for the changes and forwards these to the triggering component.</ListItem>
			<ListItem>The triggering component receives the event, checks what action must be carried out upon that event and performs this action.</ListItem>
		</ProcedureList>
	</GeneralSection>
	<GeneralSection><SectionTitle>Relation with Infor Workflow
                           </SectionTitle>
		<Paragraph class="Default">You can use the Triggering module to trigger business processes in Infor Workflow. In that case, you can use the Workflow Management (tgwfm) sessions to generate the Exchange schemas and triggers.</Paragraph>
		<Paragraph class="Default">For details, refer to the Workflow online Help and to the User’s Manuals for Infor Workflow for ERP LN.</Paragraph>
	</GeneralSection>
	<GeneralSection><SectionTitle>More information</SectionTitle>
		<List><ListIntro>For information on the scripts that are used in the triggering module, refer to the following topics in the Web Help:</ListIntro>
			<ListItem><Link href="/baanerp/da/onlinemanual/000302" role="manual">To configure an attached condition script</Link>
			</ListItem>
			<ListItem><Link href="/baanerp/da/onlinemanual/000303" role="manual">To configure an attached action script</Link>
			</ListItem>
			<ListItem><Link href="/baanerp/da/onlinemanual/000304" role="manual">Transformation script</Link>
			</ListItem>
		</List>
	</GeneralSection>
</ManualTopic>
