<?xml version="1.0" encoding="utf-8"?>
<Session ID="/baanerp/dm/com/dmcom2170m000" xml:lang="en">
   <Header>
      <Title>Rules (dmcom2170m000)</Title>
   </Header>
   <HelpTopic>
      <AimSection>
         <Paragraph>Rules enable you to trigger the dependent events. You can
		  define rules on the combination of <Link href="/baanerp/dm/glossary/glossary#000087" role="glossary">source object</Link>, source event, <Link href="/baanerp/dm/glossary/glossary#000092" role="glossary">target object</Link>, and target event. The conditions for
		  source event and the condition for target event is assigned in the <Link href="/baanerp/dm/qry/dmqry0501m000" role="session">Query (dmqry0501m000)</Link> session.</Paragraph>
         <Paragraph>To process the rule, you must enter a value in at least one
		  field. The field can be <GUIRef href="" role="manual">Condition on Target Event</GUIRef> or <GUIRef href="" role="manual">Attributes</GUIRef>.</Paragraph>
         <Paragraph>
            <GUIRef href="" role="manual">Processing of Rule if Condition for Target Event is specified:</GUIRef>
         </Paragraph>
         <Paragraph>If the <GUIRef href="" role="manual">Condition for Target Event</GUIRef> is
		  provided, the <Link href="/baanerp/dm/glossary/glossary#000063" role="glossary">objects</Link> to be processed are retrieved from the <Link href="/baanerp/dm/glossary/glossary#000050" role="glossary">query condition</Link>. The query conditions are defined for the
		  source and target entities of the rule. All the objects retrieved from the
		  query execution undergo a life cycle change.</Paragraph>
         <Paragraph>
            <GUIRef href="" role="manual">Processing of Rule When an Attribute is specified:</GUIRef>
         </Paragraph>
         <Paragraph>If the user provides the attribute, you must provide the
		  default value. If this rule is processed, the system compares the default value
		  with the value specified in <GUIRef href="" role="manual">Link Attribute Setup</GUIRef>.</Paragraph>
         <Paragraph> 
            <GUIRef href="" role="manual">Default Value matches and no records are present in the Link Attributes and Properties session:</GUIRef>
         </Paragraph>
         <Paragraph>If the default value specified in <GUIRef href="" role="manual">Link Attribute Setup</GUIRef> and the default value of <GUIRef href="" role="manual">Rules</GUIRef> match and no
		  records are present in the <GUIRef href="" role="manual">Link Attributes and Properties</GUIRef> session, for the specified attribute, in this case, the rule processes all the
		  instances of the <Link href="/baanerp/dm/glossary/glossary#000092" role="glossary">target object</Link>.</Paragraph>
         <Paragraph>
            <GUIRef href="" role="manual">Default Value in Link Attribute Setup matches and records are present in the Link Attributes and Properties session:</GUIRef>
         </Paragraph>
         <Paragraph>If the default value specified in <GUIRef href="" role="manual">Link Attribute Setup</GUIRef> and the default value of <GUIRef href="" role="manual">Rules</GUIRef> match, the
		  records retrieved from the <GUIRef href="" role="manual">Link Attributes and Properties</GUIRef> session undergo lifecycle change.</Paragraph>
         <Paragraph>
            <GUIRef href="" role="manual">Default Value in Link Attribute Setup and Rules do not match and records are present in the Link Attributes and Properties session:</GUIRef>
         </Paragraph>
         <Paragraph>If the default value specified in the <GUIRef href="" role="manual">Link Attribute Setup</GUIRef> session and the default value specified in the <GUIRef href="" role="manual">Rules</GUIRef> session do not match, a search is carried out in the <GUIRef href="" role="manual">Link Attributes and Properties</GUIRef> session to find the records with the given
		  attribute and default value. The objects that match this criteria are retrieved
		  and undergo lifecycle change.</Paragraph>
         <Paragraph>Example: Scenario for Rule Definition: Whenever the revision
		  of the <Link href="/baanerp/dm/onlinemanual/000020" role="manual">Documents</Link> that are created by an employee with a global
		  role are revised, all the child document revisions attached to the main
		  revision must also be revised. You can revise attached child documents if
		  authorizations and the required status are provided to carry out the current
		  action . Define the Owner Object as Doc_Rev and the Owner Event as Revise. The
		  direction is from owner to member. The Member Event is <Link href="/baanerp/dm/glossary/glossary#000037" role="glossary">revise</Link> and the Member Object is again taken as Doc_Rev.
		  The condition for Owner Event is defined in the respective query object. The
		  query condition for the query is defined as the documents which have global
		  role. Create a Document, Doc-1 and link the document to the child document
		  CDoc-1. The role for these two documents is defined as Global. If you run the
		  run the rule and whenever Doc-1 is revised, the attached child document CDoc-1
		  is also revised.</Paragraph>
      </AimSection>
      <RelatedTopics>
         <SectionTitle>Related topics</SectionTitle>
         <RelTopic>
            <GUIRef href="/baanerp/dm/com/dmcom2280m000" role="session">Remove Data Locks for Rules (dmcom2280m000)</GUIRef>
         </RelTopic>
      </RelatedTopics>
   </HelpTopic>
   <Fields>
      <FieldHelp ID="dmcom270.soty">
         <Header>
            <Title>Source Object Type</Title>
         </Header>
         <FuncDesc>The <Link href="/baanerp/dm/glossary/glossary#000087" role="glossary">source object</Link> for which the rules are defined.</FuncDesc>
      </FieldHelp>
      <FieldHelp ID="dmcom270.soev">
         <Header>
            <Title>Source Event</Title>
         </Header>
         <FuncDesc>The source event for the <Link href="/baanerp/dm/glossary/glossary#000087" role="glossary">source object</Link>.</FuncDesc>
      </FieldHelp>
      <FieldHelp ID="dmcom270.cfse">
         <Header>
            <Title>Condition for Source Event</Title>
         </Header>
         <FuncDesc>Use the browse arrow to select the condition for the source
		  event.</FuncDesc>
      </FieldHelp>
      <FieldHelp ID="dmcom270.mmid">
         <Header>
            <Title>Target Object</Title>
         </Header>
         <FuncDesc>Use the browse arrow to select the <Link href="/baanerp/dm/glossary/glossary#000092" role="glossary">target object</Link>.</FuncDesc>
      </FieldHelp>
      <FieldHelp ID="dmcom270.tevt">
         <Header>
            <Title>Target Event</Title>
         </Header>
         <FuncDesc>Use the browse arrow to select the target event.</FuncDesc>
      </FieldHelp>
      <FieldHelp ID="dmcom270.cfte">
         <Header>
            <Title>Condition for Target Event</Title>
         </Header>
         <FuncDesc>Use the browse arrow to select the condition for the target
		  event.</FuncDesc>
      </FieldHelp>
      <FieldHelp ID="dmcom270.atid">
         <Header>
            <Title>Attribute</Title>
         </Header>
         <FuncDesc>Use the browse arrow to select the attribute.</FuncDesc>
      </FieldHelp>
      <FieldHelp ID="dmcom270.dmnv">
         <Header>
            <Title>Default Value</Title>
         </Header>
         <FuncDesc>Displays an option to enter the default value. Note: If the user provides the
		  attribute, the default value must be provided.</FuncDesc>
      </FieldHelp>
   </Fields>
   <FormCommands>
      <CommandHelp ID="execute.rule">
         <Header>
            <Title>Execute Rule</Title>
         </Header>
         <FuncDesc>Executes the rule to carry out the specified action.</FuncDesc>
      </CommandHelp>
   </FormCommands>
</Session>