<!-- $Header: ActiveWorkItems.uix 115.39 2004/01/13 14:45:55 grengara noship $ -->


<page xmlns="http://bali.us.oracle.com/cabo/baja" 
      xmlns:baja="http://bali.us.oracle.com/cabo/baja"
      xmlns:marlin="http://bali.us.oracle.com/cabo/marlin" 
      xmlns:html="http://www.w3.org/TR/REC-html40"
      xmlns:data="http://bali.us.oracle.com/cabo/marlin">

  <baja:head xmlns="http://www.w3.org/TR/REC-html40">
    <title>Oracle Workflow Manager</title>
  </baja:head>

  <baja:content xmlns="http://bali.us.oracle.com/cabo/marlin">

    <dataScope>
      <contents>
 
        <pageLayout data:title="header@pageHeader" xmlns:data="http://bali.us.oracle.com/cabo/marlin" quickLinksShown="false" >
          <mediumAdvertisement>
            <include baja:node="/oam/wfm/common/wfmBanner" />
          </mediumAdvertisement>

          <globalButtons>
            <include baja:node="/oam/wfm/common/globalButtonBarWF" />
          </globalButtons>

          <pageHeader>
            <include baja:node="/oam/wfm/common/globalHeaderWF" />
          </pageHeader>

<!-- Inserting tabs for iAS 9.0.4 integration -->
<tabs>
	<include baja:node="/oam/wfm/common/globalTabsWF"/>
</tabs>

	  <location>
	    <include baja:node="/oam/common/breadCrumbs" />
	  </location>
	
         
	 <copyright>
          <include baja:node="/oam/common/copyright"/>
        </copyright>

        <privacy>
          <include baja:node="/oam/common/privacy"/>
        </privacy>
	
	 <contentFooter>
		<flowLayout><contents>
			<!--<tip><contents>
				<styledText data:text="WF_TIP_SUSPEND_ALL@RBData"/>
				
			</contents></tip>-->
			<tip><contents>
				
				<styledText data:text="WF_TIP_LAST_30_DAYS@RBData"/>
			</contents></tip>
		</contents></flowLayout>
	     </contentFooter>

	<contextSwitcher>
		<tableLayout width="100%">
<contents>
<rowLayout hAlign = "start">
<contents>
<cellFormat hAlign="end">
  <contents>
        <form name="itemsForm" data:destination="url@pageDest">
          <contents>
            <flowLayout>
              <contents>
               
                <messageChoice data:prompt="WF_CWI_VIEW@RBData" name="pageCode" selectedIndex="1">
                  <contents>
		     <option data:text="WF_DD_CWI@RBData" value="0" />
                    <option data:text="WF_DD_AWI@RBData"    value="1" />
                    <option data:text="WF_DD_DWI@RBData"  value="2" />
                    <option data:text="WF_DD_SWI@RBData" value="3" />
                    <option data:text="WF_DD_EWI@RBData"     value="4" />
                  </contents>
		  <end>
			<submitButton baja:event="loadfromDD" formName="itemsForm" data:text="WF_CWI_GO@RBData" destination="ActiveWorkItems" />
		  </end>
                </messageChoice>
                
		 
              </contents>
            </flowLayout>
          </contents>
        </form>

  </contents>
</cellFormat>
</contents>
</rowLayout>
</contents>
</tableLayout>
	</contextSwitcher>

        

         <contents>
                    

         <borderLayout>
          <contents>


          <header data:text="header@allDataSum"><contents>
		<switcher data:childName="node@allDataSum">
		  <case name="errNode">
			<messageBox data:message="errMsg@allDataSum"
			messageType="error" longDescUrl="unimpl"
			data:text="WF_GEN_ERROR@RBData"/>
		  </case>

		  <case name="okNode"> 

                   <!--<include baja:node="activityTable" />-->
		   <flowLayout><contents>
		<!-- TABLE FILTER -->
		<messageBox data:message="FILTER_VALIDATION_MSG@allDataSum"
			messageType="error" longDescUrl="unimpl"
			data:rendered="FILTER_VALIDATION_MSG_RENDER@allDataSum"/>
		<include baja:node="/oam/common/tableFilter"/>
		<!-- END TABLE FILTER -->
	<form name="AWIsummaryform" method="post" usesUpload="false" data:destination="url@pageDest">
             <contents>
               <stackLayout>
                 <contents>
		    <!--<include baja:node="/oam/common/lastUpdatedTime"/>-->
		    <tableLayout><contents>
				<styledText data:text="updateTime@allDataSum" styleClass="OraTipText"/>
		    </contents></tableLayout> 
                    <table name="AWIsummarytable" width="100%"
			   
			   data:alternateText="NO_STAGE_SUM_ACTIVITY@RBData"
			   formSubmitted="true"
			   proxied="true"
                           minValue="1"
			  
                           data:maxValue="max@tableDataSum"
			   data:blockSize="size@tableDataSum"
			   data:value="start@tableDataSum"
			   data:columnHeaderData="column@columnDataSum"
			   data:tableData="rows@tableDataSum"
         data:summary="WF_AWI_DET_TABSUM@RBData">

                  <tableFormat tableBanding="rowBanding"/>
                  <columnHeaderStamp>
                    <sortableHeader  data:text="value"
                      sortable="yes" data:sortable="sort" data:value="num"/>
                  </columnHeaderStamp>

                  <tableSelection>
		   <singleSelection data:text="WF_CWI_SELECT_WIAS@RBData" selectedIndex="0" data:shortDesc="select">
		   <contents>
			<submitButton formName="AWIsummaryform" data:text="WF_CWI_VIEW_DETAILES@RBData" name="event" value="loadActStageDetails"
       data:disabled="WF_AWI_DETAIL.VIEW_STAGE_D@respBasedRD"/>

		   </contents>
		   </singleSelection>
		  </tableSelection>

                  <contents>
                   <link data:destination="activity_name_url_sum"  data:disabled="WF_AWI_DETAIL.VIEW_STAGE_D@respBasedRD">
                    <contents>
                     <styledText data:text="activity_name_sum"/>
		                </contents> 
                    </link>    
                  
                    <styledText data:text="count_sum"/>
		    <formValue name="key" data:value="key"/>
                    
                  </contents>
                </table>

                  </contents>
                </stackLayout>
              </contents>
           </form>
		   </contents></flowLayout>
		</case>
	   </switcher>
	  <spacer height="10"/>
	  </contents></header>
	
	  <!-- Setting rendered of this section to be false for performance reasons -->
	  <header data:text="header@allData" rendered="false"><contents>
		<switcher data:childName="node@allData">
		<case name="errNode">
		 <messageBox data:message="errMsg@allData"
			messageType="error" longDescUrl="unimpl"
			data:text="WF_GEN_ERROR@RBData"/>
		</case>

		<case name="okNode">
		<flowLayout><contents>
		<tableLayout><contents>
				<styledText data:text="updateTime@allDataSum" styleClass="OraTipText"/>
		</contents></tableLayout> 
		<spacer height="5"/>
		
		<!--<include baja:node="/oam/common/lastUpdatedTime"/>-->
		
  		<labeledFieldLayout hAlign="end"><contents>
		<flowLayout><contents>
		<!-- Section Level Action buttons -->
		<submitButton formName="AWIallstagesform" data:text="WF_ACTION_ABORT_ALL@RBData" baja:event="AbortAll" data:rendered="renderKey@allData"/>
		<submitButton formName="AWIallstagesform" data:text="WF_ACTION_SUSPEND_ALL@RBData" halign="right" baja:event="SuspendAll" data:rendered="renderKey@allData"/>	
		</contents></flowLayout>
		</contents></labeledFieldLayout>
		
		
		<form name="AWIallstagesform" method="post" data:destination="url@pageDest">
		<contents>
		
		
                <table 	   name="AWIallstagestable" width="100%"
			   
			   data:alternateText="NO_ALL_STAGE_ACTIVITY@RBData"
			   
			   proxied="true"
                           minValue="1"
			  
                           data:maxValue="max@tableData"
			   data:blockSize="size@tableData"
			   data:value="start@tableData"
			   data:columnHeaderData="column@columnData"
			   data:tableData="rows@tableData"
         data:summary="WF_AWI_STAGE_TABSUM@RBData">

                  <tableFormat tableBanding="rowBanding"/>
                  <columnHeaderStamp>
                    <sortableHeader  data:text="value"
                      sortable="yes" data:sortable="sort" data:value="num"/>
                  </columnHeaderStamp>

                  <tableSelection>
		   <singleSelection data:text="WF_CWI_SELECT_ACTIVITY@RBData" selectedIndex="0">
		   <contents>
			<submitButton formName="AWIallstagesform" data:text="ABORT@OAM_SRB" name="event" value="doAbort"/>
			<submitButton formName="AWIallstagesform" data:text="WF_ACTION_SUSPEND@RBData" name="event" value="doSuspend"/>
			<button data:text="WF_CWI_WFMONITOR@RBData"  data:destination="GO_MONITOR@monitorString"/>

		   </contents>
		   </singleSelection>
		  </tableSelection>

                  <contents>
                    <styledText data:text="activity_name"/>
                  
                    <styledText data:text="st_date"/>
                    <styledText data:text="end_date"/>
                    <styledText data:text="asn_user"/>
                    <flowLayout><contents>	
                    <styledText data:text="item_key"/>
		    <formValue name="key" data:value="item_key"/>
		    </contents></flowLayout>
                  </contents>
                </table>
		</contents>
		</form>
		
	    

		</contents></flowLayout>
	        </case>
		</switcher>
		</contents></header>
		<script><contents>
	

	function launch_workflow_monitor(a0)
	{
	  var proxy = new TableProxy(&quot;AWIallstagestable&quot;);
	  var rowCount = proxy.getLength();
	  var selIndex = proxy.getSelectedRow();
	  var d = new Date();
	  var s = d.toString();

	  // get the value of row: selIndex and column: "item_key"	
	 var itemKey = proxy.getFormElement('key', selIndex).value;
	 // var baseRef = location.href;
	  if (rowCount != (void 0))
	  {
 	    destination=a0 + "?event=launchWFMonitor&amp;key=" + itemKey + "&amp;uid=" + s;
	    //alert(s); 
	     window.open(destination,null,'toolbar=0,location=0,directories=0,status=0,menubar=0,width=750,height=550,resizable=1,scrollbars=1'); 
    
 	  }
	}

		</contents></script>

          </contents>
        </borderLayout>


            <script>
              <contents>
                function gotoPage(sel)
                { if (sel[0].checked==true)
                    { window.location="ActWorkItems"; }
                  else
                    { window.location="ActWorkItems2"; }
                }
              </contents>
            </script>

		
         </contents>
         </pageLayout>
      </contents>

      <provider>
	<data name="OAM_SRB">
		<bundle class="oracle.apps.fnd.oam.resources.OAMResourceBundle"/>
	</data>
	<data name="RBData">
		<bundle class="oracle.apps.fnd.wf.oam.resources.WfResourceBundle"/>
	</data>
        
	<!-- Data providers for the stage summary table -->
	<data name="columnDataSum">
          <inline>
	    <column data:sort="column0@colSortOrderSum" data:value="WF_CWI_WIAS@RBData" num="0" />
            <column data:sort="column1@colSortOrderSum" data:value="WF_CWI_COUNT@RBData" num="1" />
          </inline>
        </data>

        <data name="tableDataSum">
		<bean><dataObject select="currentTable" source="allDataSum"/></bean>
  	</data>
   	<data name="colSortOrderSum">
		<bean><dataObject select="sortState" source="allDataSum"/></bean>
	</data>
	<data name="allDataSum">
		<method class="oracle.apps.fnd.wf.oam.handlers.WfActiveItemActStatusHandler" method="getDataSumTable"/>
	</data>

	<!-- Data providers for the all stages table -->
	<data name="columnData">
          <inline>
	    <column data:sort="column0@colSortOrder" data:value="WF_CWI_ACTIVITY_NAME@RBData" num="0" />
            <column data:sort="column1@colSortOrder" data:value="WF_CWI_START_DATE@RBData" num="1" />
            <column data:sort="column3@colSortOrder" data:value="WF_CWI_END_DATE@RBData" num="3" />
            <column data:sort="column4@colSortOrder" data:value="WF_CWI_ASSGN_USER@RBData" num="4"/>
            <column data:sort="column5@colSortOrder" data:value="WF_CWI_IKEY@RBData" num="5"/>
          </inline>
        </data>

        <data name="tableData">
		<bean><dataObject select="currentTable" source="allData"/></bean>
  	</data>
   	<data name="colSortOrder">
		<bean><dataObject select="sortState" source="allData"/></bean>
	</data>
	<data name="allData">
		<method class="oracle.apps.fnd.wf.oam.handlers.WfActiveItemActStatusHandler" method="getDataTable"/>
	</data>

	<data name="pageHeader">
		<method class="oracle.apps.fnd.wf.oam.handlers.WfActiveItemActStatusHandler" method="getPageHeader"/>
	</data>

	 <data name="pageDest">^M
          <method class="oracle.apps.fnd.oam.sdk.common.OAMHandler"  
            method="getPageURLWithPageProp"/>^M
        </data>
	<data name="monitorString">
		<method class="oracle.apps.fnd.wf.oam.handlers.WfSystemStatusHandler" method="getMonitorLaunchString"/>
	</data>

  <data name="respBasedRD">
      <method class="oracle.apps.fnd.wf.oam.handlers.WfActiveItemActStatusHandler" method="getFunctionsCustomization"/>
  </data>
	<!-- Table Filter Related -->
	<data name="choiceData">
                <inline>
                        
			<lang data:text="WF_TF_ST_DATE_WITHIN@RBData" value="flt_stdate"/>
			
		</inline>
        </data>
	<data name="filterCondition">
          <method class="oracle.apps.fnd.wf.oam.handlers.WfActiveItemActStatusHandler" method="getFilterCondition"/>
         </data> 
	
      </provider>
    </dataScope>
  </baja:content>
  
   <handlers>
	<event name="goto">
		<method class="oracle.apps.fnd.wf.oam.handlers.WfActiveItemActStatusHandler" method="doGo"/>
	</event>
	<event name="sort">
		<method class="oracle.apps.fnd.wf.oam.handlers.WfActiveItemActStatusHandler" method="doSort"/>
	</event>
	<!--
	<event name="link">
		<method class="oracle.apps.fnd.wf.oam.handlers.WfActiveItemActStatusHandler" method="doLink"/>
	</event>-->
	<event name="link">
		<method class="oracle.apps.fnd.oam.sdk.common.OAMHandler" method="doLink"/>
	</event>	
	<event name="launchWFMonitor">
		<method class="oracle.apps.fnd.wf.oam.handlers.WfActiveItemActStatusHandler" method="doLaunchWfMonitor"/>
	</event>
	<event name="loadActStageDetails">
		<method class="oracle.apps.fnd.wf.oam.handlers.WfActiveItemActStatusHandler" method="loadAWIStageDetail"/>
	</event>	
	
	<event name="loadfromDD">
		<method class="oracle.apps.fnd.wf.oam.handlers.WfSystemStatusHandler" method="loadFromDropDown"/>
	</event>

        <!--<event name="doSuspend">
		<method class="oracle.apps.fnd.wf.oam.handlers.WfActiveItemActStatusHandler" method="doSuspend"/>
	</event>-->
	 <!--<event name="doAbort">
		<method class="oracle.apps.fnd.wf.oam.handlers.WfActiveItemActStatusHandler" method="doAbort"/>
	</event>-->

	<event name="doSuspend">
		<method class="oracle.apps.fnd.wf.oam.handlers.WfSystemStatusHandler" method="doSuspend"/>
	</event>

	
	<event name="doAbort">
		<method class="oracle.apps.fnd.wf.oam.handlers.WfSystemStatusHandler" method="doAbort"/>
	</event>

	 <event name="SuspendAll">
		<method class="oracle.apps.fnd.wf.oam.handlers.WfActiveItemActStatusHandler" method="doSuspendAll"/>
	</event>

	 <event name="AbortAll">
		<method class="oracle.apps.fnd.wf.oam.handlers.WfActiveItemActStatusHandler" method="doAbortAll"/>
	</event>

	<!-- Table Filter Related -->
	<event name="Filter">
        	<method class="oracle.apps.fnd.wf.oam.handlers.WfActiveItemActStatusHandler" method="doFilter"/>
        </event>
  </handlers>	

</page>






