home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 April / Chip_2000-04_cd.bin / zkuste / Tango / data1.cab / Tango_Demos_TCFs / BusinessEventViewer.tcf next >
Extensible Markup Language  |  1999-09-21  |  15KB  |  328 lines

  1. <?xml version="1.0" encoding="ISO-8859-1" ?>
  2. <!DOCTYPE TAF SYSTEM "tango.dtd" >
  3. <TCF Version="0x02000001">
  4.     <Comments />
  5.  
  6.     <!--Defined Classes-->
  7.     <Classes>
  8.         <ClassDef>
  9.             <Name>BusinessEventViewer</Name>
  10.  
  11.             <!--Class constructor-->
  12.             <On_Create>
  13.                 <Implementation>
  14.                     <ActionRef Ref="BusinessEventViewer.On_Create.Assign" />
  15.                 </Implementation>
  16.             </On_Create>
  17.  
  18.             <!--Class destructor-->
  19.             <On_Destroy>
  20.                 <Implementation />
  21.             </On_Destroy>
  22.  
  23.             <!--Methods of this class-->
  24.             <Methods>
  25.                 <MethodDef>
  26.                     <Name>Set_ReportTimeframe</Name>
  27.                     <MethodParameterList>
  28.                         <MethodParameterItem DataType="Text" Direction="In">
  29.                             <Name>PrmRptStartDate</Name>
  30.                             <Comments>Start date of the timeframe. Format: %m/%d/%y %H:%M:%S</Comments>
  31.                         </MethodParameterItem>
  32.                         <MethodParameterItem DataType="Text" Direction="In">
  33.                             <Name>PrmRptEndDate</Name>
  34.                             <Comments>End date of the timeframe. Format: %m/%d/%y %H:%M:%S</Comments>
  35.                         </MethodParameterItem>
  36.                     </MethodParameterList>
  37.                     <Implementation>
  38.                         <ActionRef Ref="BusinessEventViewer.Set_ReportTimeframe.SetReportTimeframe" />
  39.                     </Implementation>
  40.                     <Comments>Setter method. Sets the RptStartDate and RptEndDate properties of the Website Activity Viewer object</Comments>
  41.                 </MethodDef>
  42.                 <MethodDef>
  43.                     <Name>EnumBusinessEvents</Name>
  44.                     <MethodParameterList>
  45.                         <MethodParameterItem DataType="Text" Direction="In">
  46.                             <Name>PrmDirection</Name>
  47.                             <Comments>Direction of the fetch</Comments>
  48.                         </MethodParameterItem>
  49.                         <MethodParameterItem DataType="Text" Direction="In">
  50.                             <Name>PrmMaxRows</Name>
  51.                             <Comments>Maximum number of records to retrieve in one time</Comments>
  52.                         </MethodParameterItem>
  53.                         <MethodParameterItem DataType="Array" Direction="Out">
  54.                             <Name>PrmEventsList</Name>
  55.                             <Comments>Array contains business events list</Comments>
  56.                         </MethodParameterItem>
  57.                         <MethodParameterItem DataType="Text" Direction="Out">
  58.                             <Name>PrmTotalRows</Name>
  59.                             <Comments>Total number of records that matches the criteria</Comments>
  60.                         </MethodParameterItem>
  61.                         <MethodParameterItem DataType="Text" Direction="Out">
  62.                             <Name>PrmStartRow</Name>
  63.                             <Comments>Start row of the fetch</Comments>
  64.                         </MethodParameterItem>
  65.                     </MethodParameterList>
  66.                     <Implementation>
  67.                         <ActionRef Ref="BusinessEventViewer.EnumBusinessEvents.If_GetFirst">
  68.                             <ActionRef Ref="BusinessEventViewer.EnumBusinessEvents.Set_Start_And_Max_0" />
  69.                             <ActionRef Ref="BusinessEventViewer.EnumBusinessEvents.GetTotalRows" />
  70.                         </ActionRef>
  71.                         <ActionRef Ref="BusinessEventViewer.EnumBusinessEvents.Elseif_GetNext">
  72.                             <ActionRef Ref="BusinessEventViewer.EnumBusinessEvents.Set_Start_And_Max_1" />
  73.                         </ActionRef>
  74.                         <ActionRef Ref="BusinessEventViewer.EnumBusinessEvents.Elseif_GetPrev">
  75.                             <ActionRef Ref="BusinessEventViewer.EnumBusinessEvents.If_BeforeFirstRow">
  76.                                 <ActionRef Ref="BusinessEventViewer.EnumBusinessEvents.FixNegativeRequest" />
  77.                             </ActionRef>
  78.                             <ActionRef Ref="BusinessEventViewer.EnumBusinessEvents.Normal">
  79.                                 <ActionRef Ref="BusinessEventViewer.EnumBusinessEvents.ProceedNoramally" />
  80.                             </ActionRef>
  81.                         </ActionRef>
  82.                         <ActionRef Ref="BusinessEventViewer.EnumBusinessEvents.Else_RefetchSame" />
  83.                         <ActionRef Ref="BusinessEventViewer.EnumBusinessEvents.CalculateLimits" />
  84.                         <ActionRef Ref="BusinessEventViewer.EnumBusinessEvents.EnumVisits" />
  85.                         <ActionRef Ref="BusinessEventViewer.EnumBusinessEvents.SendResults" />
  86.                     </Implementation>
  87.                     <Comments>Returns a list of business events for the specified time period.</Comments>
  88.                 </MethodDef>
  89.                 <MethodDef>
  90.                     <Name>GetEventInfo</Name>
  91.                     <MethodParameterList>
  92.                         <MethodParameterItem DataType="Text" Direction="In">
  93.                             <Name>PrmBusLogID</Name>
  94.                             <Comments>ID of the Business Event for which we requested information.</Comments>
  95.                         </MethodParameterItem>
  96.                         <MethodParameterItem DataType="Text" Direction="Out">
  97.                             <Name>PrmLogTimeStamp</Name>
  98.                             <Comments>Timestamp of the Business Event</Comments>
  99.                         </MethodParameterItem>
  100.                         <MethodParameterItem DataType="Text" Direction="Out">
  101.                             <Name>PrmVisitorID</Name>
  102.                             <Comments>ID of the visitor - can be obtained in the website activity tables</Comments>
  103.                         </MethodParameterItem>
  104.                         <MethodParameterItem DataType="Text" Direction="Out">
  105.                             <Name>PrmEBusEventID</Name>
  106.                             <Comments>ID of the e-business event.</Comments>
  107.                         </MethodParameterItem>
  108.                         <MethodParameterItem DataType="Text" Direction="Out">
  109.                             <Name>PrmCategory</Name>
  110.                             <Comments>Category of the e-business event.</Comments>
  111.                         </MethodParameterItem>
  112.                         <MethodParameterItem DataType="Text" Direction="Out">
  113.                             <Name>PrmComments</Name>
  114.                             <Comments>Free-form text describing in plain English the event.</Comments>
  115.                         </MethodParameterItem>
  116.                     </MethodParameterList>
  117.                     <Implementation>
  118.                         <ActionRef Ref="BusinessEventViewer.GetEventInfo.Get_EventInfo" />
  119.                     </Implementation>
  120.                     <Comments>Returns information associated with a particular business event, such as Tango Web Analyzer visitor ID, timestamp of business event and e-business event ID.</Comments>
  121.                 </MethodDef>
  122.             </Methods>
  123.  
  124.             <!--Instance variables for this class-->
  125.             <Variables>
  126.                 <VariableDef DataType="Text">
  127.                     <Name>EE_FirstInBatch</Name>
  128.                 </VariableDef>
  129.                 <VariableDef DataType="Text">
  130.                     <Name>EE_LastInBatch</Name>
  131.                 </VariableDef>
  132.                 <VariableDef DataType="Text">
  133.                     <Name>instance$EE_FirstInBatch</Name>
  134.                 </VariableDef>
  135.                 <VariableDef DataType="Text">
  136.                     <Name>instance$EE_LastInBatch</Name>
  137.                 </VariableDef>
  138.             </Variables>
  139.         </ClassDef>
  140.     </Classes>
  141.  
  142.     <!--Program actions-->
  143.     <Actions>
  144.         <AssignAction ID="BusinessEventViewer.On_Create.Assign" Sig="asgn">
  145.             <AssignItem>
  146.                 <Name>EE_TotalRows</Name>
  147.                 <Value><![CDATA[""]]></Value>
  148.                 <Scope>Instance</Scope>
  149.             </AssignItem>
  150.             <AssignItem>
  151.                 <Name>EE_FirstInBatch</Name>
  152.                 <Value><![CDATA[""]]></Value>
  153.                 <Scope>Instance</Scope>
  154.             </AssignItem>
  155.             <AssignItem>
  156.                 <Name>EE_LastInBatch</Name>
  157.                 <Value><![CDATA[""]]></Value>
  158.                 <Scope>Instance</Scope>
  159.             </AssignItem>
  160.             <AssignItem>
  161.                 <Name>RptStartDate</Name>
  162.                 <Value><![CDATA[""]]></Value>
  163.                 <Scope>Default</Scope>
  164.             </AssignItem>
  165.             <AssignItem>
  166.                 <Name>RptEndDate</Name>
  167.                 <Value><![CDATA[""]]></Value>
  168.                 <Scope>Default</Scope>
  169.             </AssignItem>
  170.         </AssignAction>
  171.         <AssignAction ID="BusinessEventViewer.Set_ReportTimeframe.SetReportTimeframe" Sig="asgn">
  172.             <AssignItem>
  173.                 <Name>RptStartDate</Name>
  174.                 <Value><![CDATA[<@VAR method$PrmRptStartDate>]]> </Value>
  175.                 <Scope>Instance</Scope>
  176.             </AssignItem>
  177.             <AssignItem>
  178.                 <Name>RptEndDate</Name>
  179.                 <Value><![CDATA[<@VAR method$PrmRptEndDate>]]></Value>
  180.                 <Scope>Instance</Scope>
  181.             </AssignItem>
  182.         </AssignAction>
  183.         <IfAction ID="BusinessEventViewer.EnumBusinessEvents.If_GetFirst" Sig="if  " Expanded="True">
  184.             <Expression>(<![CDATA['<@VAR method$PrmDirection>'='0')]]></Expression>
  185.             <ExpressionInfo>
  186.                 <ExpLeft><![CDATA[<@VAR method$PrmDirection>]]></ExpLeft>
  187.                 <ExpRight>0</ExpRight>
  188.                 <Operator>iseq</Operator>
  189.             </ExpressionInfo>
  190.         </IfAction>
  191.         <AssignAction ID="BusinessEventViewer.EnumBusinessEvents.Set_Start_And_Max_0" Sig="asgn">
  192.             <AssignItem>
  193.                 <Name>EE_FirstInBatch</Name>
  194.                 <Value>1</Value>
  195.                 <Scope>Instance</Scope>
  196.             </AssignItem>
  197.             <AssignItem>
  198.                 <Name>EE_LastInBatch</Name>
  199.                 <Value><![CDATA[<@VAR method$PrmMaxRows>]]></Value>
  200.                 <Scope>Instance</Scope>
  201.             </AssignItem>
  202.             <Comments>Calculate number of rows to return and row number from which to start retrieval</Comments>
  203.         </AssignAction>
  204.         <DirectDBMSAction DSID="TangoWA" DeploymentDSID="TangoWA" ID="BusinessEventViewer.EnumBusinessEvents.GetTotalRows" Sig="cust">
  205.             <Custom>SELECT  count (*) AS TotalRows FROM  BusinessActivity BA WHERE  LogTimeStamp <![CDATA[>= <@DSTIMESTAMP TS=<@VAR instance$RptStartDate> ENCODING=NONE>  AND]]> LogTimeStamp <![CDATA[<= <@DSTIMESTAMP TS=<@VAR instance$RptEndDate> ENCODING=NONE>]]> </Custom>
  206.             <ResultsOutput Ref="BusinessEventViewer.EnumBusinessEvents.GetTotalRows.Results" />
  207.         </DirectDBMSAction>
  208.         <ElseIfAction ID="BusinessEventViewer.EnumBusinessEvents.Elseif_GetNext" Sig="elif" Expanded="True">
  209.             <Expression>(<![CDATA['<@VAR method$PrmDirection>'='1')]]></Expression>
  210.             <ExpressionInfo>
  211.                 <ExpLeft><![CDATA[<@VAR method$PrmDirection>]]></ExpLeft>
  212.                 <ExpRight>1</ExpRight>
  213.                 <Operator>iseq</Operator>
  214.             </ExpressionInfo>
  215.         </ElseIfAction>
  216.         <AssignAction ID="BusinessEventViewer.EnumBusinessEvents.Set_Start_And_Max_1" Sig="asgn">
  217.             <AssignItem>
  218.                 <Name>EE_FirstInBatch</Name>
  219.                 <Value><![CDATA[<@CALC EXPR="<@VAR instance$EE_LastInBatch> + 1">]]></Value>
  220.                 <Scope>Instance</Scope>
  221.             </AssignItem>
  222.             <AssignItem>
  223.                 <Name>EE_LastInBatch</Name>
  224.                 <Value><![CDATA[<@CALC EXPR="<@VAR instance$EE_LastInBatch> + <@VAR method$PrmMaxRows>">]]></Value>
  225.                 <Scope>Instance</Scope>
  226.             </AssignItem>
  227.             <Comments>Calculate number of rows to return and row number from which to start retrieval</Comments>
  228.         </AssignAction>
  229.         <ElseIfAction ID="BusinessEventViewer.EnumBusinessEvents.Elseif_GetPrev" Sig="elif" Expanded="True">
  230.             <Expression>(<![CDATA['<@VAR method$PrmDirection>'='-1')]]></Expression>
  231.             <ExpressionInfo>
  232.                 <ExpLeft><![CDATA[<@VAR method$PrmDirection>]]></ExpLeft>
  233.                 <ExpRight><![CDATA["-1"]]></ExpRight>
  234.                 <Operator>iseq</Operator>
  235.             </ExpressionInfo>
  236.         </ElseIfAction>
  237.         <IfAction ID="BusinessEventViewer.EnumBusinessEvents.If_BeforeFirstRow" Sig="if  " Expanded="True">
  238.             <Expression>(<![CDATA['<@VAR instance$EE_FirstInBatch>'<='<@VAR method$PrmMaxRows>')]]></Expression>
  239.             <ExpressionInfo>
  240.                 <ExpLeft><![CDATA[<@VAR instance$EE_FirstInBatch>]]></ExpLeft>
  241.                 <ExpRight><![CDATA[<@VAR method$PrmMaxRows>]]></ExpRight>
  242.                 <Operator>lteq</Operator>
  243.             </ExpressionInfo>
  244.             <Comments>Make sure that we<![CDATA['re not going to request a negative record number]]></Comments>
  245.         </IfAction>
  246.         <AssignAction ID="BusinessEventViewer.EnumBusinessEvents.FixNegativeRequest" Sig="asgn">
  247.             <AssignItem>
  248.                 <Name>EE_LastInBatch</Name>
  249.                 <Value><![CDATA[<@CALC EXPR="<@VAR instance$EE_FirstInBatch> -1">]]></Value>
  250.                 <Scope>Instance</Scope>
  251.             </AssignItem>
  252.             <AssignItem>
  253.                 <Name>EE_FirstInBatch</Name>
  254.                 <Value>1</Value>
  255.                 <Scope>Instance</Scope>
  256.             </AssignItem>
  257.         </AssignAction>
  258.         <ElseAction ID="BusinessEventViewer.EnumBusinessEvents.Normal" Sig="else" Expanded="True" />
  259.         <AssignAction ID="BusinessEventViewer.EnumBusinessEvents.ProceedNoramally" Sig="asgn">
  260.             <AssignItem>
  261.                 <Name>instance$EE_LastInBatch</Name>
  262.                 <Value><![CDATA[<@CALC EXPR="<@VAR instance$EE_FirstInBatch> + <@VAR method$PrmMaxRows> - 1">]]></Value>
  263.                 <Scope>Instance</Scope>
  264.             </AssignItem>
  265.             <AssignItem>
  266.                 <Name>instance$EE_FirstInBatch</Name>
  267.                 <Value><![CDATA[<@CALC EXPR="<@VAR instance$EE_FirstInBatch> - <@VAR method$PrmMaxRows>">]]></Value>
  268.                 <Scope>Instance</Scope>
  269.             </AssignItem>
  270.         </AssignAction>
  271.         <ElseAction ID="BusinessEventViewer.EnumBusinessEvents.Else_RefetchSame" Sig="else" Expanded="True" />
  272.         <ResultAction ID="BusinessEventViewer.EnumBusinessEvents.CalculateLimits" Sig="null">
  273.             <Comments>Calculate start record number and number of records to return</Comments>
  274.             <ResultsOutput Ref="BusinessEventViewer.EnumBusinessEvents.CalculateLimits.Results" />
  275.         </ResultAction>
  276.         <DirectDBMSAction DSID="TangoWA" DeploymentDSID="TangoWA" ID="BusinessEventViewer.EnumBusinessEvents.EnumVisits" Sig="cust">
  277.             <Custom>SELECT  <![CDATA[    BusLogID,]]> <![CDATA[    LogTimeStamp]]> FROM   <![CDATA[    BusinessActivity BA]]> WHERE  <![CDATA[    LogTimeStamp >= <@DSTIMESTAMP TS=<@VAR instance$RptStartDate> ENCODING=NONE>  AND]]> <![CDATA[    LogTimeStamp <= <@DSTIMESTAMP TS=<@VAR instance$RptEndDate> ENCODING=NONE>]]></Custom>
  278.             <StartRow><![CDATA[<@VAR method$RowStart>]]></StartRow>
  279.             <MaxRows><![CDATA[<@VAR method$RowLimit>]]></MaxRows>
  280.             <ResultsOutput Ref="BusinessEventViewer.EnumBusinessEvents.EnumVisits.Results" />
  281.         </DirectDBMSAction>
  282.         <AssignAction ID="BusinessEventViewer.EnumBusinessEvents.SendResults" Sig="asgn">
  283.             <AssignItem>
  284.                 <Name>EventsList</Name>
  285.                 <Value><![CDATA[<@VAR method$PrmEventsList>]]></Value>
  286.                 <Scope>Local</Scope>
  287.             </AssignItem>
  288.             <AssignItem>
  289.                 <Name>PrmTotalRows</Name>
  290.                 <Value><![CDATA[<@VAR instance$EE_TotalRows>]]></Value>
  291.                 <Scope>Method</Scope>
  292.             </AssignItem>
  293.             <AssignItem>
  294.                 <Name>PrmStartRow</Name>
  295.                 <Value><![CDATA[<@VAR method$RowStart>]]></Value>
  296.                 <Scope>Method</Scope>
  297.             </AssignItem>
  298.         </AssignAction>
  299.         <DirectDBMSAction DSID="TangoWA" DeploymentDSID="TangoWA" ID="BusinessEventViewer.GetEventInfo.Get_EventInfo" Sig="cust">
  300.             <Custom>SELECT  <![CDATA[    LogTimeStamp AS LogTimeStamp,]]> <![CDATA[    VisitorID AS VisitorID,]]> <![CDATA[    EBusinessEventID AS EBusEventID,]]> <![CDATA[    Category AS category,]]> <![CDATA[    Comments AS Comments]]> FROM  <![CDATA[    BusinessActivity]]> WHERE <![CDATA[    BusLogID = <@VAR method$PrmBusLogID>]]> <![CDATA[    ]]></Custom>
  301.             <ResultsOutput Ref="BusinessEventViewer.GetEventInfo.Get_EventInfo.Results" />
  302.         </DirectDBMSAction>
  303.     </Actions>
  304.  
  305.     <!--Data sources-->
  306.     <DataSources>
  307.         <DataSource ID="TangoWA">
  308.             <DSType>ODBC</DSType>
  309.             <DSN>TangoWA</DSN>
  310.             <DBMS />
  311.             <Host>TangoWA</Host>
  312.             <Database />
  313.             <UserInfo Encrypted="True">
  314.                 <UserName />
  315.                 <Password />
  316.             </UserInfo>
  317.         </DataSource>
  318.     </DataSources>
  319.  
  320.     <!--Output blocks-->
  321.     <Outputs>
  322.         <Output ID="BusinessEventViewer.EnumBusinessEvents.GetTotalRows.Results" Type="HTML"><![CDATA[<@ASSIGN instance$EE_TotalRows <@COLUMN TotalRows>>]]> </Output>
  323.         <Output ID="BusinessEventViewer.EnumBusinessEvents.CalculateLimits.Results" Type="HTML"><![CDATA[<@ASSIGN method$RowLimit <@CALC EXPR="<@VAR instance$EE_LastInBatch> - <@VAR instance$EE_FirstInBatch> + 1">>]]> <![CDATA[<@ASSIGN method$RowStart <@VAR instance$EE_FirstInBatch>>]]></Output>
  324.         <Output ID="BusinessEventViewer.EnumBusinessEvents.EnumVisits.Results" Type="HTML"><![CDATA[<@ASSIGN NAME="PrmEventsList" SCOPE="method" VALUE="<@VAR resultSet>">]]> </Output>
  325.         <Output ID="BusinessEventViewer.GetEventInfo.Get_EventInfo.Results" Type="HTML"><![CDATA[<@ASSIGN method$PrmLogTimeStamp <@COLUMN LogTimeStamp>>]]> <![CDATA[<@ASSIGN method$PrmVisitorID <@COLUMN VisitorID>>]]> <![CDATA[<@ASSIGN method$PrmEBusEventID <@COLUMN EBusEventID>>]]> <![CDATA[<@ASSIGN method$PrmCategory <@COLUMN Category>>]]> <![CDATA[<@ASSIGN method$PrmComments <@COLUMN Comments>>]]> </Output>
  326.     </Outputs>
  327. </TCF>
  328.