<?xml version="1.0" encoding="utf-8" ?>
<bp:BusinessProcess xmlns:bp="BitMobile.BusinessProcess">

	<bp:Workflow Name="Main" Controller="Main\Main.js">

		<bp:Step Name="Menu" Screen="Main.xml">
			<bp:Action Name="Visits" NextWorkflow="Visits"></bp:Action>
			<bp:Action Name="Summary" NextStep="Summary"></bp:Action>
			<bp:Action Name="Order" NextWorkflow="Order"></bp:Action>
			<bp:Action Name="Return" NextWorkflow="Return"></bp:Action>
			<bp:Action Name="Outlets" NextWorkflow="Outlets"></bp:Action>
			<bp:Action Name="Stocks" NextWorkflow="Stocks"></bp:Action>
			<bp:Action Name="ToDo" NextWorkflow="ToDo"></bp:Action>
			<bp:Action Name="Settings" NextWorkflow="Settings"></bp:Action>
			<bp:Action Name="Sync" NextWorkflow="Sync" />
			<bp:Action Name="About" NextWorkflow="About" />
		</bp:Step>

	</bp:Workflow>

	<bp:Workflow Name="Visits">

		<bp:Step Name="Visits" Screen="Visit\Visits.xml" Controller="Visits\Main.js">
			<bp:Action Name="ShowMap" NextStep="ShowMap"></bp:Action>
			<bp:Action Name="Select" NextWorkflow="Visit"></bp:Action>
			<bp:Action Name="SelectUnscheduled" NextWorkflow="Visit"></bp:Action>
		</bp:Step>

		<bp:Step Name="ShowMap" Screen="ScheduledVisits_Map.xml">
		</bp:Step>

	</bp:Workflow>

	<bp:Workflow Name="Visit">

		<bp:Step Name="Outlet" Screen="Outlets\Outlet.xml" Controller="Outlets\Main.js">
			<bp:Action Name="Forward" NextStep="Visit_Tasks"></bp:Action>
			<bp:Action Name="SkipTask" NextStep="Questions"></bp:Action>
			<bp:Action Name="SkipQuestions" NextStep="SKUs"></bp:Action>
			<bp:Action Name="SkipSKUs" NextStep="Order"></bp:Action>
			<bp:Action Name="SkipOrder" NextStep="Receivables"></bp:Action>
			<bp:Action Name="SkipEncashment" NextStep="Total"></bp:Action>
			<bp:Action Name="EditParameter" NextStep="EditOutletParameter"></bp:Action>
			<bp:Action Name="EditAddParameter" NextStep="EditOutletAddParameter"></bp:Action>
			<bp:Action Name="ShowMap" NextStep="ShowMap"></bp:Action>
			<bp:Action Name="ShowDetails" NextStep="Details" />
			<bp:Action Name="ShowContacts" NextStep="Contacts" />
			<bp:Action Name="ShowImage" NextStep="Image" />
		</bp:Step>

		<bp:Step Name="Visit_Tasks" Screen="Visit\Tasks.xml" Controller="Tasks\Main.js">
			<bp:Action Name="Forward" NextStep="Questions"></bp:Action>
			<bp:Action Name="Outlet" NextStep="Outlet"></bp:Action>
			<bp:Action Name="Select" NextStep="Visit_Task" />
			<bp:Action Name="SkipQuestions" NextStep="SKUs"></bp:Action>
			<bp:Action Name="SkipSKUs" NextStep="Order"></bp:Action>
			<bp:Action Name="SkipOrder" NextStep="Receivables"></bp:Action>
			<bp:Action Name="SkipEncashment" NextStep="Total"></bp:Action>
		</bp:Step>

		<bp:Step Name="Visit_Task" Screen="Visit\Task.xml" Controller="Tasks\Main.js">
			<bp:Action Name="Forward" NextStep="Visit_Tasks" />
		</bp:Step>

		<bp:Step Name="Questions" Screen="Visit\Questions.xml" Controller="Visits\Questions.js">
			<bp:Action Name="Forward" NextStep="SKUs"></bp:Action>
			<bp:Action Name="SkipSKUs" NextStep="Order"></bp:Action>
			<bp:Action Name="SkipOrder" NextStep="Return"></bp:Action>
			<bp:Action Name="SkipReturn" NextStep="Receivables"></bp:Action>
			<bp:Action Name="SkipEncashment" NextStep="Total"></bp:Action>
			<bp:Action Name="ShowImage" NextStep="Image" />
			<bp:Action Name="Sk" NextStep="Image" />
		</bp:Step>

		<bp:Step Name="SKUs" Screen="Visit\SKUs.xml" Controller="Visits\SKU_Questions.js">
			<bp:Action Name="ShowFilters1" NextStep="Filters1"/>
			<bp:Action Name="Forward" NextStep="Order"></bp:Action>
			<bp:Action Name="SkipOrder" NextStep="Return"></bp:Action>
			<bp:Action Name="SkipReturn" NextStep="Receivables"></bp:Action>
			<bp:Action Name="SkipEncashment" NextStep="Total"></bp:Action>
			<bp:Action Name="ShowImage" NextStep="Image" />
		</bp:Step>

		<bp:Step Name="Order" Screen="Order\Order.xml" Controller="Order\Main.js">
			<bp:Action Name="Add" NextStep="AddSKU"></bp:Action>
			<bp:Action Name="Edit" NextStep="EditSKU"></bp:Action>
			<bp:Action Name="ShowInfo" NextStep="OrderInfo"></bp:Action>
			<bp:Action Name="Forward" NextStep="Return"></bp:Action>
			<bp:Action Name="SkipReturn" NextStep="Receivables" />
			<bp:Action Name="SkipEncashment" NextStep="Total"/>
		</bp:Step>

		<bp:Step Name="Return" Screen="Order\Order.xml" Controller="Order\Main.js">
			<bp:Action Name="Add" NextStep="AddSKU"></bp:Action>
			<bp:Action Name="Edit" NextStep="EditSKU"></bp:Action>
			<bp:Action Name="ShowInfo" NextStep="OrderInfo"></bp:Action>
			<bp:Action Name="Forward" NextStep="Receivables"></bp:Action>
			<bp:Action Name="SkipEncashment" NextStep="Total"/>
		</bp:Step>

		<bp:Step Name="Receivables" Screen="Receivables.xml" Controller="Receivables\Main.js">
			<bp:Action Name="Forward" NextStep="Total"></bp:Action>
		</bp:Step>

		<bp:Step Name="Total" Screen="Visit\Total.xml" Controller="Visits\Total.js">
		</bp:Step>

		<bp:Step Name="Filters1" Screen="Filters.xml" Controller="Order\Order_SKUs.js">
			<bp:Action Name="Forward" NextStep="SKUs"></bp:Action>
		</bp:Step>

		<bp:Step Name="Commentary" Screen="Order_Commentary.xml" Controller="Order\Main.js">
			<bp:Action Name="Forward" NextStep="Receivables"></bp:Action>
		</bp:Step>

		<bp:Step Name="OrderInfo" Screen="Order_Info.xml" Controller="Order\Main.js">
		</bp:Step>

		<bp:Step Name="AddSKU" Screen="Order\Order_SKUs.xml" Controller="Order\Order_SKUs.js">
			<bp:Action Name="SetFilter" NextStep="Filters"></bp:Action>
			<bp:Action Name="SelectSKU" NextStep="EditSKU"></bp:Action>
			<bp:Action Name="Order" NextStep="Order"></bp:Action>
		</bp:Step>

		<bp:Step Name="Filters" Screen="Filters.xml" Controller="Order\Order_SKUs.js">
			<bp:Action Name="Forward" NextStep="AddSKU"></bp:Action>
		</bp:Step>

		<bp:Step Name="EditSKU" Screen="Order_EditSKU.xml" Controller="Order\Order_EditSKU.js">
			<bp:Action Name="Forward" NextStep="AddSKU"></bp:Action>
			<bp:Action Name="ShowOrder" NextStep="Order"></bp:Action>
			<bp:Action Name="ShowReturn" NextStep="Return"></bp:Action>
			<bp:Action Name="ShowImage" NextStep="Image" />
		</bp:Step>

		<bp:Step Name="EditOutletAddParameter" Screen="OutletParameter.xml">
		</bp:Step>

		<bp:Step Name="ShowMap" Screen="Outlet_Map.xml" Controller="Visits\Outlet_Map.js">
		</bp:Step>

		<bp:Step Name="Details" Screen="Details.xml" Controller="Outlets\DetailsAndContacts.js"></bp:Step>

		<bp:Step Name="Contacts" Screen="ContactsList.xml" Controller="Outlets\DetailsAndContacts.js">
			<bp:Action Name="Select" NextStep="Contact" />
		</bp:Step>

		<bp:Step Name="Contact" Screen="Contact.xml" Controller="Outlets\DetailsAndContacts.js">

		</bp:Step>

		<bp:Step Name="Image" Screen="Image.xml" Controller="Outlets\Image.js"></bp:Step>

	</bp:Workflow>

	<bp:Workflow Name="Order">

		<bp:Step Name="OrderList" Screen="Order\OrderList.xml" Controller="Order\Main.js">
			<bp:Action Name="Create" NextStep="Outlets"></bp:Action>
			<bp:Action Name="Select" NextStep="Order"></bp:Action>
		</bp:Step>

		<bp:Step Name="Outlets" Screen="Outlets\Outlets.xml" Controller="Outlets\Main.js">
			<bp:Action Name="Select" NextWorkflow="CreateOrder"></bp:Action>
		</bp:Step>

		<bp:Step Name="Order" Screen="Order\Order.xml" Controller="Order\Main.js">
			<bp:Action Name="Add" NextStep="AddSKU"></bp:Action>
			<bp:Action Name="Edit" NextStep="EditSKU"></bp:Action>
			<bp:Action Name="ShowInfo" NextStep="OrderInfo"></bp:Action>
		</bp:Step>

		<bp:Step Name="OrderInfo" Screen="Order_Info.xml" Controller="Order\Main.js">
		</bp:Step>

		<bp:Step Name="EditSKU" Screen="Order_EditSKU.xml" Controller="Order\Order_EditSKU.js">
			<bp:Action Name="Forward" NextStep="AddSKU"></bp:Action>
			<bp:Action Name="ShowOrder" NextStep="Order"></bp:Action>
			<bp:Action Name="ShowImage" NextStep="Image" />
		</bp:Step>

		<bp:Step Name="AddSKU" Screen="Order_SKUs.xml" Controller="Order\Order_SKUs.js">
			<bp:Action Name="SetFilter" NextStep="Filters"></bp:Action>
			<bp:Action Name="SelectSKU" NextStep="EditSKU"></bp:Action>
			<bp:Action Name="Order" NextStep="Order"></bp:Action>
		</bp:Step>

		<bp:Step Name="Filters" Screen="Filters.xml" Controller="Order\Order_SKUs.js">
			<bp:Action Name="Forward" NextStep="AddSKU"></bp:Action>
		</bp:Step>

		<bp:Step Name="Image" Screen="Image.xml" Controller="Outlets\Image.js"></bp:Step>

	</bp:Workflow>

	<bp:Workflow Name="Return" Controller="Order\Main.js">

		<bp:Step Name="ReturnList" Screen="Order\OrderList.xml">
			<bp:Action Name="Create" NextStep="Outlets"></bp:Action>
			<bp:Action Name="Select" NextStep="Return"></bp:Action>
		</bp:Step>

		<bp:Step Name="Outlets" Screen="Outlets\Outlets.xml" Controller="Outlets\Main.js">
			<bp:Action Name="Select" NextWorkflow="CreateReturn"></bp:Action>
		</bp:Step>

		<bp:Step Name="Return" Screen="Order\Order.xml">
			<bp:Action Name="ShowInfo" NextStep="OrderInfo"></bp:Action>
			<bp:Action Name="Add" NextStep="AddSKU"></bp:Action>
			<bp:Action Name="Edit" NextStep="EditSKU"></bp:Action>
		</bp:Step>

		<bp:Step Name="OrderInfo" Screen="Order_Info.xml" Controller="Order\Main.js">
		</bp:Step>

		<bp:Step Name="AddSKU" Screen="Order_SKUs.xml" Controller="Order\Order_SKUs.js">
			<bp:Action Name="SetFilter" NextStep="Filters"></bp:Action>
			<bp:Action Name="SelectSKU" NextStep="EditSKU"></bp:Action>
		</bp:Step>

		<bp:Step Name="EditSKU" Screen="Order_EditSKU.xml" Controller="Order\Order_EditSKU.js">
			<bp:Action Name="Forward" NextStep="AddSKU"></bp:Action>
			<bp:Action Name="ShowReturn" NextStep="Return"></bp:Action>
			<bp:Action Name="ShowImage" NextStep="Image" />
		</bp:Step>

		<bp:Step Name="Filters" Screen="Filters.xml" Controller="Order\Order_SKUs.js">
			<bp:Action Name="Forward" NextStep="AddSKU"></bp:Action>
		</bp:Step>

		<bp:Step Name="Image" Screen="Image.xml" Controller="Outlets\Image.js"></bp:Step>

	</bp:Workflow>

	<bp:Workflow Name="CreateReturn" Controller="Order\Main.js">

		<bp:Step Name="Return" Screen="Order\Order.xml">
			<bp:Action Name="ShowInfo" NextStep="OrderInfo"></bp:Action>
			<bp:Action Name="Add" NextStep="AddSKU"></bp:Action>
			<bp:Action Name="Edit" NextStep="EditSKU"></bp:Action>
		</bp:Step>

		<bp:Step Name="OrderInfo" Screen="Order_Info.xml" Controller="Order\Main.js">
		</bp:Step>

		<bp:Step Name="AddSKU" Screen="Order_SKUs.xml" Controller="Order\Order_SKUs.js">
			<bp:Action Name="SetFilter" NextStep="Filters"></bp:Action>
			<bp:Action Name="SelectSKU" NextStep="EditSKU"></bp:Action>
		</bp:Step>

		<bp:Step Name="EditSKU" Screen="Order_EditSKU.xml" Controller="Order\Order_EditSKU.js">
			<bp:Action Name="Forward" NextStep="AddSKU"></bp:Action>
			<bp:Action Name="ShowReturn" NextStep="Return"></bp:Action>
			<bp:Action Name="ShowImage" NextStep="Image" />
		</bp:Step>

		<bp:Step Name="Filters" Screen="Filters.xml" Controller="Order\Order_SKUs.js">
			<bp:Action Name="Forward" NextStep="AddSKU"></bp:Action>
		</bp:Step>

		<bp:Step Name="Image" Screen="Image.xml" Controller="Outlets\Image.js"></bp:Step>

	</bp:Workflow>

	<bp:Workflow Name="CreateOrder">

		<bp:Step Name="Order" Screen="Order.xml" Controller="Order\Main.js">
			<bp:Action Name="Add" NextStep="AddSKU"></bp:Action>
			<bp:Action Name="Edit" NextStep="EditSKU"></bp:Action>
			<bp:Action Name="ShowInfo" NextStep="OrderInfo"></bp:Action>
		</bp:Step>

		<bp:Step Name="AddSKU" Screen="Order_SKUs.xml" Controller="Order\Order_SKUs.js">
			<bp:Action Name="SetFilter" NextStep="Filters"></bp:Action>
			<bp:Action Name="SelectSKU" NextStep="EditSKU"></bp:Action>
		</bp:Step>

		<bp:Step Name="Filters" Screen="Filters.xml" Controller="Order\Order_SKUs.js">
			<bp:Action Name="Forward" NextStep="AddSKU"></bp:Action>
		</bp:Step>

		<bp:Step Name="EditSKU" Screen="Order_EditSKU.xml" Controller="Order\Order_EditSKU.js">
			<bp:Action Name="Forward" NextStep="AddSKU"></bp:Action>
			<bp:Action Name="ShowOrder" NextStep="Order"></bp:Action>
			<bp:Action Name="ShowImage" NextStep="Image" />
		</bp:Step>

		<bp:Step Name="OrderInfo" Screen="Order_Info.xml" Controller="Order\Main.js">
		</bp:Step>

		<bp:Step Name="Image" Screen="Image.xml" Controller="Outlets\Image.js"></bp:Step>

	</bp:Workflow>

	<bp:Workflow Name="Settings">

		<bp:Step Name="Settings" Screen="Settings.xml">
		</bp:Step>

	</bp:Workflow>

	<bp:Workflow Name="Outlets" Controller="Outlets\Main.js">

		<bp:Step Name="Outlets" Screen="Outlets\Outlets.xml">
			<bp:Action Name="Select" NextStep="OpenOutlet" />
			<bp:Action Name="Create" NextStep="CreateOutlet" />
		</bp:Step>

		<bp:Step Name="OpenOutlet" Screen="Outlets\Outlet.xml">
			<bp:Action Name="List" NextStep="Outlets" />
			<bp:Action Name="ShowDetails" NextStep="Details" />
			<bp:Action Name="ShowContacts" NextStep="Contacts" />
			<bp:Action Name="ShowMap" NextStep="ShowMap"></bp:Action>
			<bp:Action Name="Plans" NextStep="Plans" />
			<bp:Action Name="ShowImage" NextStep="Image" />
		</bp:Step>

		<bp:Step Name="CreateOutlet" Screen="Outlets\CreateOutlet.xml" Controller="Outlets\CreateOutlet.js">
			<bp:Action Name="Open" NextStep="OpenOutlet" />
		</bp:Step>

		<bp:Step Name="Details" Screen="Details.xml" Controller="Outlets\DetailsAndContacts.js"></bp:Step>

		<bp:Step Name="Contacts" Screen="ContactsList.xml" Controller="Outlets\DetailsAndContacts.js">
			<bp:Action Name="Select" NextStep="Contact" />
		</bp:Step>

		<bp:Step Name="ShowMap" Screen="Outlet_Map.xml" Controller="Visits\Outlet_Map.js">
		</bp:Step>

		<bp:Step Name="Plans" Screen="PlanList.xml" Controller="Outlets\DetailsAndContacts.js"></bp:Step>

		<bp:Step Name="Contact" Screen="Contact.xml" Controller="Outlets\DetailsAndContacts.js"></bp:Step>

		<bp:Step Name="Image" Screen="Image.xml" Controller="Outlets\Image.js"></bp:Step>

	</bp:Workflow>

	<bp:Workflow Name="Sync">
		<bp:Step Name="Sync" Screen="Sync\Sync.xml" Controller="Sync\Main.js" />
	</bp:Workflow>

	<bp:Workflow Name="About">
		<bp:Step Name="About" Screen="About\About.xml" Controller="About\Main.js" />
	</bp:Workflow>

</bp:BusinessProcess>
