

/********** TradingSystem begin **********/


	/********** CashDeskLine begin **********/


		/********** CashDesk begin **********/


			/********** CashDeskApplication **********/


automaton CashDeskApplication (100) {
	state 0000, 0101, 0102, 0103, 0104, 0201, 0202, 0203, 0204, 0205, 0206, 0207, 0208, 0209, 0210, 0211, 0212, 0301, 0302, 0401, 0402, 0403, 0404, 0405, 0406, 0407, 0501, 0502, 0503, 0504, 0505, 0506, 0507, 0508, 0509, 0510, 0511, 0512, 0513, 0514, 0515, 0516, 0517, 0518, 0519, 0601, 0602, 0701, 0702, 0703, 0704, 0705, 0706, 0707, 0708, 0709, 0710, 0711, 0712, 0713, 0714, 0715, 0716, 0717, 0718, 0719, 0720, 0721, 0722, 0723, 0724, 0725, 0726, 0727, 0728, 0729, 0730, 0801, 0802, 0803, 0804, 0805, 0901, 0902, 1001, 1002;
	init 0000;
	trans 
		// onEventSaleStarted
		0000 -> 0101 (-, onEventSaleStarted, 100),
		0101 -> 0102 (100, onEventSaleStarted'', -),
		0102 -> 0000 (100, onEventSaleStarted', 100),
		0102 -> 0103 (100, reset, 100),
		0103 -> 0104 (100, reset', 100),
		0104 -> 0000 (100, onEventSaleStarted', 100),

		// onEventProductBarcodeScanned
		0000 -> 0201 (-, onEventProductBarcodeScanned, 100),
		0201 -> 0202 (100, onEventProductBarcodeScanned'', -),
		0202 -> 0000 (100, onEventProductBarcodeScanned', 100),
		0202 -> 0203 (100, getProductWithStockItem, -),

		0203 -> 0204 (-,getProductWithStockItem',100),
		0204 -> 0205 (100, publishRunningTotalChangedEvent, -),
		0205 -> 0206 (-, publishRunningTotalChangedEvent', 100),
		0205 -> 0207 (-, exceptionPublishRunningTotalChangedEvent, 100),
		0207 -> 0206 (-, publishRunningTotalChangedEvent', 100),
		0206 -> 0000 (100, onEventProductBarcodeScanned', 100),

		0203 -> 0208 (-,exceptionGetProductWithStockItem,100),
		0208 -> 0209 (-,getProductWithStockItem',100),
		0209 -> 0210 (100, publishProductBarcodeNotValidEvent, -),
		0210 -> 0211 (-, publishProductBarcodeNotValidEvent', 100),
		0210 -> 0212 (-, exceptionPublishProductBarcodeNotValidEvent, 100),
		0212 -> 0211 (-, publishProductBarcodeNotValidEvent', 100),
		0211 -> 0000 (100, onEventProductBarcodeScanned', 100),

		// onEventSaleFinished
		0000 -> 0301 (-, onEventSaleFinished, 100),
		0301 -> 0302 (100, onEventSaleFinished'', -),
		0302 -> 0000 (100, onEventSaleFinished', 100),

		// onEventCashAmountEntered
		0000 -> 0401 (-, onEventCashAmountEntered, 100),
		0401 -> 0402 (100, onEventCashAmountEntered'', -),
		0402 -> 0000 (100, onEventCashAmountEntered', 100),

			// onEventCashAmountEntered_Enter
			0000 -> 0403 (-, onEventCashAmountEntered_Enter, 100),
			0403 -> 0404 (100, onEventCashAmountEntered_Enter'', -),
			0404 -> 0000 (100, onEventCashAmountEntered_Enter', 100),
			0404 -> 0405 (100, publishChangeAmountCalculatedEvent, -),
			0405 -> 0406 (-, publishChangeAmountCalculatedEvent', 100),

			0405 -> 0407 (-, exceptionPublishChangeAmountCalculatedEvent, 100),
			0407 -> 0406 (-, publishChangeAmountCalculatedEvent', 100),

			0406 -> 0000 (100, onEventCashAmountEntered_Enter', 100),

		// onEventCashBoxClosed
		0000 -> 0501 (-, onEventCashBoxClosed, 100),
	    0501 -> 0502 (100, onEventCashBoxClosed'', -),
	    0502 -> 0000 (100, onEventCashBoxClosed', 100),
	    0502 -> 0503 (100, makeSale, 100),
	    0503 -> 0504 (100, publishSaleSuccessEvent, -),
	    0504 -> 0505 (-, publishSaleSuccessEvent', 100),
		0505 -> 0506 (100, publishExtAccountSaleEvent, -),
		0506 -> 0507 (-, publishExtAccountSaleEvent', 100),
		0507 -> 0508 (100, publishExtSaleRegisteredEvent, -),
		0508 -> 0509 (-, publishExtSaleRegisteredEvent', 100),
		0509 -> 0510 (100, makeSale', 100),
	    0510 -> 0511 (100, reset, 100),
	    0511 -> 0512 (100, reset', 100),

	    0504 -> 0513 (-, exceptionPublishSaleSuccessEvent, 100),
	    0513 -> 0514 (100, exceptionMakeSale, 100),
		0514 -> 0519 (-, publishSaleSuccessEvent', 100),
	    
	    0506 -> 0515 (-, exceptionPublishExtAccountSaleEvent, 100),
	    0515 -> 0516 (100, exceptionMakeSale, 100),
		0516 -> 0519 (-, publishExtAccountSaleEvent', 100),

		0508 -> 0517 (-, exceptionPublishExtSaleRegisteredEvent, 100),
		0517 -> 0518 (100, exceptionMakeSale, 100),
		0518 -> 0519 (-, publishExtSaleRegisteredEvent', 100),

	    0519 -> 0512 (100, makeSale', 100),
		
		0512 -> 0000 (100, onEventCashBoxClosed', 100),

		// onEventCreditCardScanned
		0000 -> 0601 (-, onEventCreditCardScanned, 100),
		0601 -> 0602 (100, onEventCreditCardScanned'', -),
		0602 -> 0000 (100, onEventCreditCardScanned', 100),

		// onEventPINEntered
		0000 -> 0701 (-, onEventPINEntered, 100),
	    0701 -> 0702 (100, onEventPINEntered'', -),
	    0702 -> 0000 (100, onEventPINEntered', 100),
	    0702 -> 0703 (100, connect, 100),
	    0703 -> 0704 (100, connect', 100),
		0704 -> 0705 (100, validateCard, -),
		0705 -> 0706 (-, validateCard', 100),

		0706 -> 0707 (100, publishInvalidCreditCardEvent, -),
		0707 -> 0708 (-, publishInvalidCreditCardEvent', 100),
		0707 -> 0709 (-, exceptionPublishInvalidCreditCardEvent, 100),
		0709 -> 0708 (-, publishInvalidCreditCardEvent', 100),

		0706 -> 0710 (100, debitCard, -),
		0710 -> 0711 (-, debitCard', 100),
	
		0711 -> 0712 (100, publishInvalidCreditCardEvent, -),
		0712 -> 0708 (-, publishInvalidCreditCardEvent', 100),
		0712 -> 0713 (-, exceptionPublishInvalidCreditCardEvent, 100),
		0713 -> 0708 (-, publishInvalidCreditCardEvent', 100),
	
		0711 -> 0714 (100, makeSale, 100),
		0714 -> 0715 (100, publishSaleSuccessEvent, -),
		0715 -> 0716 (-, publishSaleSuccessEvent', 100),
		0716 -> 0717 (100, publishExtAccountSaleEvent, -),
		0717 -> 0718 (-, publishExtAccountSaleEvent', 100),
		0718 -> 0719 (100, publishExtSaleRegisteredEvent, -),
		0719 -> 0720 (-, publishExtSaleRegisteredEvent', 100),
		0720 -> 0721 (100, makeSale', 100),
		0721 -> 0722 (100, reset, 100),
		0722 -> 0708 (100, reset', 100),

		0715 -> 0723 (-, exceptionPublishSaleSuccessEvent, 100),
		0723 -> 0724 (100, exceptionMakeSale, 100),
		0724 -> 0729 (-, publishSaleSuccessEvent', 100),

		0717 -> 0725 (-, exceptionPublishExtAccountSaleEvent, 100),
		0725 -> 0726 (100, exceptionMakeSale, 100),
		0726 -> 0729 (-, publishExtAccountSaleEvent', 100),

		0719 -> 0727 (-, exceptionPublishExtSaleRegisteredEvent, 100),
		0727 -> 0728 (100, exceptionMakeSale, 100),
		0728 -> 0729 (-, publishExtSaleRegisteredEvent', 100),

		0729 -> 0708 (100, makeSale', 100),

	    0703 -> 0730 (100, exceptionConnect, 100),
		0730 -> 0708 (100, connect', 100),

		0708 -> 0000 (100, onEventPINEntered', 100),

		// onEventExtExpressModeEnabled
		0000 -> 0801 (-, onEventExtExpressModeEnabled, 100),
		0801 -> 0802 (100, onEventExtExpressModeEnabled'', -),
		0802 -> 0000 (100, onEventExtExpressModeEnabled', 100),
		0802 -> 0803 (100, publishExpressModeEnabledEvent, -),
		0803 -> 0804 (-, publishExpressModeEnabledEvent', 100),

		0803 -> 0805 (-, exceptionPublishExpressModeEnabledEvent, 100),
		0805 -> 0804 (-, publishExpressModeEnabledEvent', 100),

		0804 -> 0000 (100, onEventExtExpressModeEnabled', 100),

		// onEventPaymentMode
		0000 -> 0901 (-, onEventPaymentMode, 100),
		0901 -> 0902 (100, onEventPaymentMode'', -),
		0902 -> 0000 (100, onEventPaymentMode', 100),

		// onEventExpressModeDisabled
		0000 -> 1001 (-, onEventExpressModeDisabled, 100),
		1001 -> 1002 (100, onEventExpressModeDisabled'', -),
		1002 -> 0000 (100, onEventExpressModeDisabled', 100);
}





			/********** CashBoxComposite begin **********/


				/********** CashBox **********/


automaton CashBoxGUI (111) {
	state 000, 010, 011, 012, 020, 021, 022, 030, 031, 032, 040, 041, 042, 050, 051, 052, 060, 061, 062, 070, 071, 072, 080, 081, 082, 090, 091, 092, 100, 101, 102, 110, 111, 112, 120, 121, 122, 130, 131, 132, 133, 134, 140, 141, 142, 150, 151, 152, 160, 161, 162, 170, 171, 172, 180, 181, 182;
	init 000;
	trans 
		000 -> 010 (-, btn0, 111),
		010 -> 011 (111, sendCashAmountEnteredEvent, -),
		011 -> 012 (-, sendCashAmountEnteredEvent', 111),
		012 -> 000 (111, btn0', -),

		000 -> 020 (-, btn1, 111),
		020 -> 021 (111, sendCashAmountEnteredEvent, -),
		021 -> 022 (-, sendCashAmountEnteredEvent', 111),
		022 -> 000 (111, btn1', -),

		000 -> 030 (-, btn2, 111),
		030 -> 031 (111, sendCashAmountEnteredEvent, -),
		031 -> 032 (-, sendCashAmountEnteredEvent', 111),
		032 -> 000 (111, btn2', -),

		000 -> 040 (-, btn3, 111),
		040 -> 041 (111, sendCashAmountEnteredEvent, -),
		041 -> 042 (-, sendCashAmountEnteredEvent', 111),
		042 -> 000 (111, btn3', -),

		000 -> 050 (-, btn4, 111),
		050 -> 051 (111, sendCashAmountEnteredEvent, -),
		051 -> 052 (-, sendCashAmountEnteredEvent', 111),
		052 -> 000 (111, btn4', -),

		000 -> 060 (-, btn5, 111),
		060 -> 061 (111, sendCashAmountEnteredEvent, -),
		061 -> 062 (-, sendCashAmountEnteredEvent', 111),
		062 -> 000 (111, btn5', -),

		000 -> 070 (-, btn6, 111),
		070 -> 071 (111, sendCashAmountEnteredEvent, -),
		071 -> 072 (-, sendCashAmountEnteredEvent', 111),
		072 -> 000 (111, btn6', -),

		000 -> 080 (-, btn7, 111),
		080 -> 081 (111, sendCashAmountEnteredEvent, -),
		081 -> 082 (-, sendCashAmountEnteredEvent', 111),
		082 -> 000 (111, btn7', -),

		000 -> 090 (-, btn8, 111),
		090 -> 091 (111, sendCashAmountEnteredEvent, -),
		091 -> 092 (-, sendCashAmountEnteredEvent', 111),
		092 -> 000 (111, btn8', -),

		000 -> 100 (-, btn9, 111),
		100 -> 101 (111, sendCashAmountEnteredEvent, -),
		101 -> 102 (-, sendCashAmountEnteredEvent', 111),
		102 -> 000 (111, btn9', -),

		000 -> 110 (-, btnComma, 111),
		110 -> 111 (111, sendCashAmountEnteredEvent, -),
		111 -> 112 (-, sendCashAmountEnteredEvent', 111),
		112 -> 000 (111, btnComma', -),

		000 -> 120 (-, btnEnter, 111),
		120 -> 121 (111, sendCashAmountEnteredEvent_Enter, -),
		121 -> 122 (-, sendCashAmountEnteredEvent_Enter', 111),
		122 -> 000 (111, btnEnter', -),

		000 -> 130 (-, btnClose, 111),
		130 -> 131 (111, sendCashBoxClosedEvent, -),
		131 -> 132 (-, sendCashBoxClosedEvent', 111),
		132 -> 133 (111, closeCashBox, 111),
		133 -> 134 (111, closeCashBox', 111),
		134 -> 000 (111, btnClose', -),

		000 -> 140 (-, btnStartNewSale, 111),
		140 -> 141 (111, sendSaleStartedEvent, -),
		141 -> 142 (-, sendSaleStartedEvent', 111),
		142 -> 000 (111, btnStartNewSale', -),

		000 -> 150 (-, btnSaleFinished, 111),
		150 -> 151 (111, sendSaleFinishedEvent, -),
		151 -> 152 (-, sendSaleFinishedEvent', 111),
		152 -> 000 (111, btnSaleFinished', -),

		000 -> 160 (-, btnBarPayment, 111),
		160 -> 161 (111, sendPaymentModeEvent, -),
		161 -> 162 (-, sendPaymentModeEvent', 111),
		162 -> 000 (111, btnBarPayment', -),

		000 -> 170 (-, btnCardPayment, 111),
		170 -> 171 (111, sendPaymentModeEvent, -),
		171 -> 172 (-, sendPaymentModeEvent', 111),
		172 -> 000 (111, btnCardPayment', -),

		000 -> 180 (-, btnExpressMode, 111),
		180 -> 181 (111, sendExpressModeDisabledEvent, -),
		181 -> 182 (-, sendExpressModeDisabledEvent', 111),
		182 -> 000 (111, btnExpressMode', -);
}

automaton openCashBox (111) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, openCashBox, 111),
		1 -> 0 (111, openCashBox', -);
}

automaton closeCashBox (111) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, closeCashBox, 111),
		1 -> 0 (111, closeCashBox', -);
}

composite CashBox {
	CashBoxGUI, openCashBox, closeCashBox;
}


				/********** CashBoxController **********/


automaton CashBoxControllerEvents (112) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, onEventChangeAmountCalculated, 112),     
		1 -> 2 (112, onEventChangeAmountCalculated'', -),   
		2 -> 3 (112, openCashBox, -),                       
		3 -> 4 (-, openCashBox', 112),                      
		4 -> 0 (112, onEventChangeAmountCalculated', 112);
}
	
automaton sendSaleStartedEvent (112) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, sendSaleStartedEvent, 112),
		1 -> 2 (112, publishSaleStartedEvent, -),
		2 -> 3 (-, publishSaleStartedEvent', 112),
		2 -> 4 (-, exceptionPublishSaleStartedEvent, 112),
		4 -> 3 (-, publishSaleStartedEvent', 112),
		3 -> 0 (112, sendSaleStartedEvent', -);
}

automaton sendSaleFinishedEvent (112) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, sendSaleFinishedEvent, 112),
		1 -> 2 (112, publishSaleFinishedEvent, -),
		2 -> 3 (-, publishSaleFinishedEvent', 112),
		2 -> 4 (-, exceptionPublishSaleFinishedEvent, 112),
		4 -> 3 (-, publishSaleFinishedEvent', 112),
		3 -> 0 (112, sendSaleFinishedEvent', -);
}

automaton sendPaymentModeEvent (112) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, sendPaymentModeEvent, 112),
		1 -> 2 (112, publishPaymentModeEvent, -),
		2 -> 3 (-, publishPaymentModeEvent', 112),
		2 -> 4 (-, exceptionPublishPaymentModeEvent, 112),
		4 -> 3 (-, publishPaymentModeEvent', 112),
		3 -> 0 (112, sendPaymentModeEvent', -);
}

automaton sendCashAmountEnteredEvent (112) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, sendCashAmountEnteredEvent, 112),
		1 -> 2 (112, publishCashAmountEnteredEvent, -),
		2 -> 3 (-, publishCashAmountEnteredEvent', 112),
		2 -> 4 (-, exceptionPublishCashAmountEnteredEvent, 112),
		4 -> 3 (-, publishCashAmountEnteredEvent', 112),
		3 -> 0 (112, sendCashAmountEnteredEvent', -);
}

automaton sendCashAmountEnteredEvent_Enter (112) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, sendCashAmountEnteredEvent_Enter, 112),
		1 -> 2 (112, publishCashAmountEnteredEvent_Enter, -),
		2 -> 3 (-, publishCashAmountEnteredEvent_Enter', 112),
		2 -> 4 (-, exceptionPublishCashAmountEnteredEvent_Enter, 112),
		4 -> 3 (-, publishCashAmountEnteredEvent_Enter', 112),
		3 -> 0 (112, sendCashAmountEnteredEvent_Enter', -);
}

automaton sendCashBoxClosedEvent (112) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, sendCashBoxClosedEvent, 112),
		1 -> 2 (112, publishCashBoxClosedEvent, -),
		2 -> 3 (-, publishCashBoxClosedEvent', 112),
		2 -> 4 (-, exceptionPublishCashBoxClosedEvent, 112),
		4 -> 3 (-, publishCashBoxClosedEvent', 112),
		3 -> 0 (112, sendCashBoxClosedEvent', -);
}

automaton sendExpressModeDisabledEvent (112) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, sendExpressModeDisabledEvent, 112),
		1 -> 2 (112, publishExpressModeDisabledEvent, -),
		2 -> 3 (-, publishExpressModeDisabledEvent', 112),
		2 -> 4 (-, exceptionPublishExpressModeDisabledEvent, 112),
		4 -> 3 (-, publishExpressModeDisabledEvent', 112),
		3 -> 0 (112, sendExpressModeDisabledEvent', -);
}

composite CashBoxController {
	CashBoxControllerEvents, sendSaleStartedEvent, sendSaleFinishedEvent, sendPaymentModeEvent, sendCashAmountEnteredEvent, sendCashAmountEnteredEvent_Enter, sendCashBoxClosedEvent, sendExpressModeDisabledEvent;
}


			/********** CashBoxControllerComposite **********/

composite CashBoxControllerComposite {
	CashBox, CashBoxController;
	restrictL 
		(111, sendSaleStartedEvent, -), (-, sendSaleStartedEvent', 111), (-, sendSaleStartedEvent, 112), (112, sendSaleStartedEvent', -), 
		(111, sendSaleFinishedEvent, -), (-, sendSaleFinishedEvent', 111), (-, sendSaleFinishedEvent, 112), (112, sendSaleFinishedEvent', -), 
		(111, sendPaymentModeEvent, -), (-, sendPaymentModeEvent', 111), (-, sendPaymentModeEvent, 112), (112, sendPaymentModeEvent', -), 
		(111, sendCashAmountEnteredEvent, -), (-, sendCashAmountEnteredEvent', 111), (-, sendCashAmountEnteredEvent, 112), (112, sendCashAmountEnteredEvent', -), 
		(111, sendCashAmountEnteredEvent_Enter, -), (-, sendCashAmountEnteredEvent_Enter', 111), (-, sendCashAmountEnteredEvent_Enter, 112), (112, sendCashAmountEnteredEvent_Enter', -), 
		(111, sendCashBoxClosedEvent, -), (-, sendCashBoxClosedEvent', 111), (-, sendCashBoxClosedEvent, 112), (112, sendCashBoxClosedEvent', -), 
		(111, sendExpressModeDisabledEvent, -), (-, sendExpressModeDisabledEvent', 111), (-, sendExpressModeDisabledEvent, 112), (112, sendExpressModeDisabledEvent', -), 
		(-, openCashBox, 111), (111, openCashBox', -), (112, openCashBox, -), (-, openCashBox', 112),
		(-, closeCashBox, 111), (111, closeCashBox', -);
}





			/********** ScannerComposite begin **********/


				/********** Scanner **********/


automaton Scanner (121) {
	state 0, 1, 2, 3;
	init 0;
	trans 
		0 -> 1 (-, btnScanItem, 121),
		1 -> 2 (121, sendProductBarcodeScannedEvent, -),
		2 -> 3 (-, sendProductBarcodeScannedEvent', 121),
		3 -> 0 (121, btnScanItem', -);
}


				/********** ScannerController **********/


automaton ScannerController (122) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, sendProductBarcodeScannedEvent, 122),
		1 -> 2 (122, publishProductBarcodeScannedEvent, -),
		2 -> 3 (-, publishProductBarcodeScannedEvent', 122),
		2 -> 4 (-, exceptionPublishProductBarcodeScannedEvent, 122),
		4 -> 3 (-, publishProductBarcodeScannedEvent', 122),
		3 -> 0 (122, sendProductBarcodeScannedEvent', -);
}


			/********** ScannerControllerComposite **********/


composite ScannerControllerComposite {
	Scanner, ScannerController;
	restrictL 
		(121, sendProductBarcodeScannedEvent, -), (-, sendProductBarcodeScannedEvent', 121), (-, sendProductBarcodeScannedEvent, 122), (122, sendProductBarcodeScannedEvent', -);
}





			/********** CardReaderComposite begin **********/


				/********** CardReader **********/


automaton CardReader (131) {
	state 000, 010, 011, 012, 020, 021, 022;
	init 000;
	trans 
		000 -> 010 (-, btnScanCard, 131),
		010 -> 011 (131, sendCreditCardScannedEvent, -),
		011 -> 012 (-, sendCreditCardScannedEvent', 131),
		012 -> 000 (131, btnScanCard', -),

		000 -> 020 (-, btnEnterPIN, 131),
		020 -> 021 (131, sendPINEnteredEvent, -),
		021 -> 022 (-, sendPINEnteredEvent', 131),
		022 -> 000 (131, btnEnterPIN', -);
}


				/********** CardReaderController **********/


automaton CardReaderControllerEvents (132) {
	state 000, 010, 011, 020, 021;
	init 000;
	trans 
		000 -> 010 (-, onEventExpressModeEnabled, 132),
		010 -> 011 (132, onEventExpressModeEnabled'', -),
		011 -> 000 (132, onEventExpressModeEnabled', 132),

		000 -> 020 (-, onEventExpressModeDisabled, 132),
		020 -> 021 (132, onEventExpressModeDisabled'', -),
		021 -> 000 (132, onEventExpressModeDisabled', 132);
}

automaton sendCreditCardScannedEvent (132) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, sendCreditCardScannedEvent, 132),
		1 -> 2 (132, publishCreditCardScannedEvent, -),
		2 -> 3 (-, publishCreditCardScannedEvent', 132),
		2 -> 4 (-, exceptionPublishCreditCardScannedEvent, 132),
		4 -> 3 (-, publishCreditCardScannedEvent', 132),
		3 -> 0 (132, sendCreditCardScannedEvent', -);
}

automaton sendPINEnteredEvent (132) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, sendPINEnteredEvent, 132),
		1 -> 2 (132, publishPINEnteredEvent, -),
		2 -> 3 (-, publishPINEnteredEvent', 132),
		2 -> 4 (-, exceptionPublishPINEnteredEvent, 132),
		4 -> 3 (-, publishPINEnteredEvent', 132),
		3 -> 0 (132, sendPINEnteredEvent', -);
}

composite CardReaderController {
	CardReaderControllerEvents, sendCreditCardScannedEvent, sendPINEnteredEvent;
}


			/********** CardReaderControllerComposite **********/


composite CardReaderControllerComposite {
	CardReader, CardReaderController;
	restrictL 
		(131, sendCreditCardScannedEvent, -), (-, sendCreditCardScannedEvent', 131), (-, sendCreditCardScannedEvent, 132), (132, sendCreditCardScannedEvent', -),
		(131, sendPINEnteredEvent, -), (-, sendPINEnteredEvent', 131), (-, sendPINEnteredEvent, 132), (132, sendPINEnteredEvent', -);
}





			/********** PrinterComposite begin **********/


				/********** Printer **********/


automaton updatePrintoutRunningTotalChanged (141) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, updatePrintoutRunningTotalChanged, 141),
		1 -> 0 (141, updatePrintoutRunningTotalChanged', -);
}

automaton updatePrintoutChangeAmountCalculated (141) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, updatePrintoutChangeAmountCalculated, 141),
		1 -> 0 (141, updatePrintoutChangeAmountCalculated', -);
}

automaton newSale (141) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, newSale, 141),
		1 -> 0 (141, newSale', -);
}

automaton appendPrintout (141) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, appendPrintout, 141),
		1 -> 0 (141, appendPrintout', -);
}

automaton cashAmountEntered (141) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, cashAmountEntered, 141),
		1 -> 0 (141, cashAmountEntered', -);
}

automaton finishSale (141) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, finishSale, 141),
		1 -> 0 (141, finishSale', -);
}

composite Printer {
	updatePrintoutRunningTotalChanged, updatePrintoutChangeAmountCalculated, newSale, appendPrintout, cashAmountEntered, finishSale;
}


				/********** PrinterController **********/


automaton PrinterController (142) {
	state 000, 010, 011, 012, 013, 020, 021, 022, 023, 024, 025, 026, 027, 030, 031, 032, 033, 040, 041, 042, 043, 050, 051, 052, 053, 060, 061, 070, 071;
	init 000;
	trans 
		000 -> 010 (-, onEventRunningTotalChanged, 142),
		010 -> 011 (142, onEventRunningTotalChanged'', -),
		011 -> 000 (142, onEventRunningTotalChanged', 142),
		011 -> 012 (142, updatePrintoutRunningTotalChanged, -),
		012 -> 013 (-, updatePrintoutRunningTotalChanged', 142),
		013 -> 000 (142, onEventRunningTotalChanged', 142),

		000 -> 020 (-, onEventCashAmountEntered, 142),
		020 -> 021 (142, onEventCashAmountEntered'', -),
		021 -> 000 (142, onEventCashAmountEntered', 142),
		021 -> 022 (142, appendPrintout, -),
		022 -> 023 (-, appendPrintout', 142),
		023 -> 000 (142, onEventCashAmountEntered', 142),

			000 -> 024 (-, onEventCashAmountEntered_Enter, 142),
			024 -> 025 (142, onEventCashAmountEntered_Enter'', -),
			025 -> 000 (142, onEventCashAmountEntered_Enter', 142),
			025 -> 026 (142, cashAmountEntered, -),
			026 -> 027 (-, cashAmountEntered', 142),
			027 -> 000 (142, onEventCashAmountEntered_Enter', 142),

		000 -> 030 (-, onEventChangeAmountCalculated, 142),
		030 -> 031 (142, onEventChangeAmountCalculated'', -),
		031 -> 000 (142, onEventChangeAmountCalculated', 142),
		031 -> 032 (142, updatePrintoutChangeAmountCalculated, -),
		032 -> 033 (-, updatePrintoutChangeAmountCalculated', 142),
		033 -> 000 (142, onEventChangeAmountCalculated', 142),

		000 -> 040 (-, onEventSaleStarted, 142),
		040 -> 041 (142, onEventSaleStarted'', -),
		041 -> 000 (142, onEventSaleStarted', 142),
		041 -> 042 (142, newSale, -),
		042 -> 043 (-, newSale', 142),
		043 -> 000 (142, onEventSaleStarted', 142),

		000 -> 050 (-, onEventSaleFinished, 142),
		050 -> 051 (142, onEventSaleFinished'', -),
		051 -> 000 (142, onEventSaleFinished', 142),
		051 -> 052 (142, finishSale, -),
		052 -> 053 (-, finishSale', 142),
		053 -> 000 (142, onEventSaleFinished', 142),

		000 -> 060 (-, onEventCashBoxClosed, 142),
		060 -> 061 (142, onEventCashBoxClosed'', -),
		061 -> 000 (142, onEventCashBoxClosed', 142),

		000 -> 070 (-, onEventSaleSuccess, 142),
		070 -> 071 (142, onEventSaleSuccess'', -),
		071 -> 000 (142, onEventSaleSuccess', 142);
}


			/********** PrinterControllerComposite **********/


composite PrinterControllerComposite {
	Printer, PrinterController;
	restrictL 
		(-, updatePrintoutRunningTotalChanged, 141), (141, updatePrintoutRunningTotalChanged', -), (142, updatePrintoutRunningTotalChanged, -), (-, updatePrintoutRunningTotalChanged', 142),
		(-, updatePrintoutChangeAmountCalculated, 141), (141, updatePrintoutChangeAmountCalculated', -), (142, updatePrintoutChangeAmountCalculated, -), (-, updatePrintoutChangeAmountCalculated', 142),
		(-, newSale, 141), (141, newSale', -), (142, newSale, -), (-, newSale', 142),
		(142, finishSale, -), (-, finishSale', 142),
		(-, appendPrintout, 141), (141, appendPrintout', -), (142, appendPrintout, -), (-, appendPrintout', 142),
		(-, cashAmountEntered, 141), (141, cashAmountEntered', -), (142, cashAmountEntered, -), (-, cashAmountEntered', 142),
		(-, finishSale, 141), (141, finishSale', -);	
}





			/********** LightDisplayComposite begin **********/


				/********** LightDisplay **********/


automaton updateExpressModeEnabled (151) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, updateExpressModeEnabled, 151),
		1 -> 0 (151, updateExpressModeEnabled', -);
}

automaton updateExpressModeDisabled (151) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, updateExpressModeDisabled, 151),
		1 -> 0 (151, updateExpressModeDisabled', -);
}

composite LightDisplay {
	updateExpressModeEnabled, updateExpressModeDisabled;
}


				/********** LightDisplayController **********/


automaton LightDisplayController (152) {
	state 000, 010, 011, 012, 013, 020, 021, 022, 023;
	init 000;
	trans 
		000 -> 010 (-, onEventExpressModeEnabled, 152),
		010 -> 011 (152, onEventExpressModeEnabled'', -),
		011 -> 012 (152, updateExpressModeEnabled, -),
		012 -> 013 (-, updateExpressModeEnabled', 152),
		013 -> 000 (152, onEventExpressModeEnabled', 152),

		000 -> 020 (-, onEventExpressModeDisabled, 152),
		020 -> 021 (152, onEventExpressModeDisabled'', -),
		021 -> 022 (152, updateExpressModeDisabled, -),
		022 -> 023 (-, updateExpressModeDisabled', 152),
		023 -> 000 (152, onEventExpressModeDisabled', 152);
}


			/********** LightDisplayControllerComposite **********/


composite LightDisplayControllerComposite {
	LightDisplay, LightDisplayController;
	restrictL 
		(-, updateExpressModeEnabled, 151), (151, updateExpressModeEnabled', -), (152, updateExpressModeEnabled, -), (-, updateExpressModeEnabled', 152), 
		(-, updateExpressModeDisabled, 151), (151, updateExpressModeDisabled', -), (152, updateExpressModeDisabled, -), (-, updateExpressModeDisabled', 152);	
}





			/********** CashDeskGUIComposite begin **********/


				/********** CashDeskGUI **********/


automaton updateProductInfo (161) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, updateProductInfo, 161),
		1 -> 0 (161, updateProductInfo', -);
}

automaton setBarcodeNotValid (161) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, setBarcodeNotValid, 161),
		1 -> 0 (161, setBarcodeNotValid', -);
}

automaton setCashAmount (161) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, setCashAmount, 161),
		1 -> 0 (161, setCashAmount', -);
}

automaton onFinished (161) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, onFinished, 161),
		1 -> 0 (161, onFinished', -);
}

automaton onStarted (161) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, onStarted, 161),
		1 -> 0 (161, onStarted', -);
}

automaton onInvalidCreditCard (161) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, onInvalidCreditCard, 161),
		1 -> 0 (161, onInvalidCreditCard', -);
}

automaton onCreditCardScanFailed (161) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, onCreditCardScanFailed, 161),
		1 -> 0 (161, onCreditCardScanFailed', -);
}

automaton onExpressModeDisabledEvent (161) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, onExpressModeDisabledEvent, 161),
		1 -> 0 (161, onExpressModeDisabledEvent', -);
}

automaton onExpressModeEnabledEvent (161) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, onExpressModeEnabledEvent, 161),
		1 -> 0 (161, onExpressModeEnabledEvent', -);
}

composite CashDeskGUI {
	updateProductInfo, setBarcodeNotValid, setCashAmount, onFinished, onStarted, onInvalidCreditCard, onCreditCardScanFailed, onExpressModeDisabledEvent, onExpressModeEnabledEvent;
}


				/********** CashDeskGUIController **********/


automaton CashDeskGUIController (162) {
	state 000, 010, 011, 012, 013, 020, 021, 022, 023, 030, 031, 032, 033, 040, 041, 042, 043, 050, 051, 052, 053, 060, 061, 062, 063, 070, 071, 072, 073, 080, 081, 082, 083, 090, 091, 092, 093, 100, 101, 102, 103;
	init 000;
	trans 
		000 -> 010 (-, onEventRunningTotalChanged, 162),
		010 -> 011 (162, onEventRunningTotalChanged'', -),
		011 -> 012 (162, updateProductInfo, -),
		012 -> 013 (-, updateProductInfo', 162),
		013 -> 000 (162, onEventRunningTotalChanged', 162),

		000 -> 020 (-, onEventCashAmountEntered, 162),
		020 -> 021 (162, onEventCashAmountEntered'', -),
		021 -> 000 (162, onEventCashAmountEntered', 162),

			000 -> 022 (-, onEventCashAmountEntered_Enter, 162),
			022 -> 023 (162, onEventCashAmountEntered_Enter'', -),
			023 -> 000 (162, onEventCashAmountEntered_Enter', 162),

		000 -> 030 (-, onEventChangeAmountCalculated, 162),
		030 -> 031 (162, onEventChangeAmountCalculated'', -),
		031 -> 032 (162, setCashAmount, -),
		032 -> 033 (-, setCashAmount', 162),
		033 -> 000 (162, onEventChangeAmountCalculated', 162),

		000 -> 040 (-, onEventExpressModeDisabled, 162),
		040 -> 041 (162, onEventExpressModeDisabled'', -),
		041 -> 042 (162, onExpressModeDisabledEvent, -),
		042 -> 043 (-, onExpressModeDisabledEvent', 162),
		043 -> 000 (162, onEventExpressModeDisabled', 162),

		000 -> 050 (-, onEventExpressModeEnabled, 162),
		050 -> 051 (162, onEventExpressModeEnabled'', -),
		051 -> 052 (162, onExpressModeEnabledEvent, -),
		052 -> 053 (-, onExpressModeEnabledEvent', 162),
		053 -> 000 (162, onEventExpressModeEnabled', 162),

		000 -> 060 (-, onEventInvalidCreditCard, 162),
		060 -> 061 (162, onEventInvalidCreditCard'', -),
		061 -> 062 (162, onInvalidCreditCard, -),
		062 -> 063 (-, onInvalidCreditCard', 162),
		063 -> 000 (162, onEventInvalidCreditCard', 162),

		000 -> 070 (-, onEventCreditCardScanFailed, 162),
		070 -> 071 (162, onEventCreditCardScanFailed'', -),
		071 -> 072 (162, onCreditCardScanFailed, -),
		072 -> 073 (-, onCreditCardScanFailed', 162),
		073 -> 000 (162, onEventCreditCardScanFailed', 162),

		000 -> 080 (-, onEventProductBarcodeNotValid, 162),
		080 -> 081 (162, onEventProductBarcodeNotValid'', -),
		081 -> 082 (162, setBarcodeNotValid, -),
		082 -> 083 (-, setBarcodeNotValid', 162),
		083 -> 000 (162, onEventProductBarcodeNotValid', 162),

		000 -> 090 (-, onEventSaleSuccess, 162),
		090 -> 091 (162, onEventSaleSuccess'', -),
		091 -> 092 (162, onFinished, -),
		092 -> 093 (-, onFinished', 162),
		093 -> 000 (162, onEventSaleSuccess', 162),

		000 -> 100 (-, onEventSaleStarted, 162),
		100 -> 101 (162, onEventSaleStarted'', -),
		101 -> 102 (162, onStarted, -),
		102 -> 103 (-, onStarted', 162),
		103 -> 000 (162, onEventSaleStarted', 162);
}


			/********** CashDeskGUIControllerComposite **********/


composite CashDeskGUIControllerComposite {
	CashDeskGUI, CashDeskGUIController;
	restrictL 
		(-, updateProductInfo, 161), (161, updateProductInfo', -), (162, updateProductInfo, -), (-, updateProductInfo', 162),
		(-, setBarcodeNotValid, 161), (161, setBarcodeNotValid', -), (162, setBarcodeNotValid, -), (-, setBarcodeNotValid', 162),
		(-, setCashAmount, 161), (161, setCashAmount', -), (162, setCashAmount, -), (-, setCashAmount', 162),
		(-, onFinished, 161), (161, onFinished', -), (162, onFinished, -), (-, onFinished', 162),
		(-, onStarted, 161), (161, onStarted', -), (162, onStarted, -), (-, onStarted', 162),
		(-, onInvalidCreditCard, 161), (161, onInvalidCreditCard', -), (162, onInvalidCreditCard, -), (-, onInvalidCreditCard', 162),
		(-, onCreditCardScanFailed, 161), (161, onCreditCardScanFailed', -), (162, onCreditCardScanFailed, -), (-, onCreditCardScanFailed', 162),
		(-, onExpressModeDisabledEvent, 161), (161, onExpressModeDisabledEvent', -), (162, onExpressModeDisabledEvent, -), (-, onExpressModeDisabledEvent', 162),
		(-, onExpressModeEnabledEvent, 161), (161, onExpressModeEnabledEvent', -), (162, onExpressModeEnabledEvent, -), (-, onExpressModeEnabledEvent', 162);
}






		/********** CashDeskChannel **********/


automaton publishCashAmountEnteredEvent (200) {
	state 0, 1, 2, 3, 4, 5, 6, 7, 8;
	init 0;
	trans 
		0 -> 1 (-, publishCashAmountEnteredEvent, 200),
		2 -> 0 (200, publishCashAmountEnteredEvent', -),
		1 -> 3 (200, onEventCashAmountEntered, -),  
		3 -> 4 (200, onEventCashAmountEntered, -),  
		4 -> 5 (200, onEventCashAmountEntered, -),  
		5 -> 6 (-, onEventCashAmountEntered'', 200),
		6 -> 7 (-, onEventCashAmountEntered'', 200),
		7 -> 2 (-, onEventCashAmountEntered'', 200),
		1 -> 8 (200, exceptionPublishCashAmountEnteredEvent, -),
		8 -> 0 (200, publishCashAmountEnteredEvent', -);
}

automaton publishCashAmountEnteredEvent_Enter (200) {
	state 0, 1, 2, 3, 4, 5, 6, 7, 8;
	init 0;
	trans 
		0 -> 1 (-, publishCashAmountEnteredEvent_Enter, 200),
		2 -> 0 (200, publishCashAmountEnteredEvent_Enter', -),
		1 -> 3 (200, onEventCashAmountEntered_Enter, -),  
		3 -> 4 (200, onEventCashAmountEntered_Enter, -),  
		4 -> 5 (200, onEventCashAmountEntered_Enter, -),  
		5 -> 6 (-, onEventCashAmountEntered_Enter'', 200),
		6 -> 7 (-, onEventCashAmountEntered_Enter'', 200),
		7 -> 2 (-, onEventCashAmountEntered_Enter'', 200),
		1 -> 8 (200, exceptionPublishCashAmountEnteredEvent_Enter, -),
		8 -> 0 (200, publishCashAmountEnteredEvent_Enter', -);
}

automaton publishCashBoxClosedEvent (200) {
	state 0, 1, 2, 3, 4, 5, 6;
	init 0;
	trans 
		0 -> 1 (-, publishCashBoxClosedEvent, 200),
		2 -> 0 (200, publishCashBoxClosedEvent', -),
		1 -> 3 (200, onEventCashBoxClosed, -),  
		3 -> 4 (200, onEventCashBoxClosed, -),  
		4 -> 5 (-, onEventCashBoxClosed'', 200),
		5 -> 2 (-, onEventCashBoxClosed'', 200),
		1 -> 6 (200, exceptionPublishCashBoxClosedEvent, -),
		6 -> 0 (200, publishCashBoxClosedEvent', -);
}

automaton publishChangeAmountCalculatedEvent (200) {
	state 0, 1, 2, 3, 4, 5, 6, 7, 8;
	init 0;
	trans 
		0 -> 1 (-, publishChangeAmountCalculatedEvent, 200),
		2 -> 0 (200, publishChangeAmountCalculatedEvent', -),
		1 -> 3 (200, onEventChangeAmountCalculated, -),  
		3 -> 4 (200, onEventChangeAmountCalculated, -),  
		4 -> 5 (200, onEventChangeAmountCalculated, -),  
		5 -> 6 (-, onEventChangeAmountCalculated'', 200),
		6 -> 7 (-, onEventChangeAmountCalculated'', 200),
		7 -> 2 (-, onEventChangeAmountCalculated'', 200),
		1 -> 8 (200, exceptionPublishChangeAmountCalculatedEvent, -),
		8 -> 0 (200, publishChangeAmountCalculatedEvent', -);
}

automaton publishCreditCardScanFailedEvent (200) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, publishCreditCardScanFailedEvent, 200),
		2 -> 0 (200, publishCreditCardScanFailedEvent', -),
		1 -> 3 (200, onEventCreditCardScanFailed, -),  
		3 -> 2 (-, onEventCreditCardScanFailed'', 200),
		1 -> 4 (200, exceptionPublishCreditCardScanFailedEvent, -),
		4 -> 0 (200, publishCreditCardScanFailedEvent', -);
}

automaton publishCreditCardScannedEvent (200) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, publishCreditCardScannedEvent, 200),
		2 -> 0 (200, publishCreditCardScannedEvent', -),
		1 -> 3 (200, onEventCreditCardScanned, -),  
		3 -> 2 (-, onEventCreditCardScanned'', 200),
		1 -> 4 (200, exceptionPublishCreditCardScannedEvent, -),
		4 -> 0 (200, publishCreditCardScannedEvent', -);
}

automaton publishExpressModeDisabledEvent (200) {
	state 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10;
	init 0;
	trans 
		0 -> 1 (-, publishExpressModeDisabledEvent, 200),
		2 -> 0 (200, publishExpressModeDisabledEvent', -),
		1 -> 3 (200, onEventExpressModeDisabled, -),  
		3 -> 4 (200, onEventExpressModeDisabled, -),  
		4 -> 5 (200, onEventExpressModeDisabled, -),  
		5 -> 6 (200, onEventExpressModeDisabled, -),  
		6 -> 7 (-, onEventExpressModeDisabled'', 200),
		7 -> 8 (-, onEventExpressModeDisabled'', 200),
		8 -> 9 (-, onEventExpressModeDisabled'', 200),
		9 -> 2 (-, onEventExpressModeDisabled'', 200),
		1 -> 10 (200, exceptionPublishExpressModeDisabledEvent, -),
		10 -> 0 (200, publishExpressModeDisabledEvent', -);
}

automaton publishExpressModeEnabledEvent (200) {
	state 0, 1, 2, 3, 4, 5, 6, 7, 8;
	init 0;
	trans 
		0 -> 1 (-, publishExpressModeEnabledEvent, 200),
		2 -> 0 (200, publishExpressModeEnabledEvent', -),
		1 -> 3 (200, onEventExpressModeEnabled, -),  
		3 -> 4 (200, onEventExpressModeEnabled, -),  
		4 -> 5 (200, onEventExpressModeEnabled, -),  
		5 -> 6 (-, onEventExpressModeEnabled'', 200),
		6 -> 7 (-, onEventExpressModeEnabled'', 200),
		7 -> 2 (-, onEventExpressModeEnabled'', 200),
		1 -> 8 (200, exceptionPublishExpressModeEnabledEvent, -),
		8 -> 0 (200, publishExpressModeEnabledEvent', -);
}

automaton publishInvalidCreditCardEvent (200) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, publishInvalidCreditCardEvent, 200),
		2 -> 0 (200, publishInvalidCreditCardEvent', -),
		1 -> 3 (200, onEventInvalidCreditCard, -),  
		3 -> 2 (-, onEventInvalidCreditCard'', 200),
		1 -> 4 (200, exceptionPublishInvalidCreditCardEvent, -),
		4 -> 0 (200, publishInvalidCreditCardEvent', -);
}

automaton publishPaymentModeEvent (200) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, publishPaymentModeEvent, 200),
		2 -> 0 (200, publishPaymentModeEvent', -),
		1 -> 3 (200, onEventPaymentMode, -),  
		3 -> 2 (-, onEventPaymentMode'', 200),
		1 -> 4 (200, exceptionPublishPaymentModeEvent, -),
		4 -> 0 (200, publishPaymentModeEvent', -);
}

automaton publishPINEnteredEvent (200) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, publishPINEnteredEvent, 200),
		2 -> 0 (200, publishPINEnteredEvent', -),
		1 -> 3 (200, onEventPINEntered, -),  
		3 -> 2 (-, onEventPINEntered'', 200),
		1 -> 4 (200, exceptionPublishPINEnteredEvent, -),
		4 -> 0 (200, publishPINEnteredEvent', -);
}

automaton publishProductBarcodeNotValidEvent (200) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, publishProductBarcodeNotValidEvent, 200),
		2 -> 0 (200, publishProductBarcodeNotValidEvent', -),
		1 -> 3 (200, onEventProductBarcodeNotValid, -),  
		3 -> 2 (-, onEventProductBarcodeNotValid'', 200),
		1 -> 4 (200, exceptionPublishProductBarcodeNotValidEvent, -),
		4 -> 0 (200, publishProductBarcodeNotValidEvent', -);
}

automaton publishProductBarcodeScannedEvent (200) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, publishProductBarcodeScannedEvent, 200),
		2 -> 0 (200, publishProductBarcodeScannedEvent', -),
		1 -> 3 (200, onEventProductBarcodeScanned, -),  
		3 -> 2 (-, onEventProductBarcodeScanned'', 200),
		1 -> 4 (200, exceptionPublishProductBarcodeScannedEvent, -),
		4 -> 0 (200, publishProductBarcodeScannedEvent', -);
}

automaton publishRunningTotalChangedEvent (200) {
	state 0, 1, 2, 3, 4, 5, 6;
	init 0;
	trans 
		0 -> 1 (-, publishRunningTotalChangedEvent, 200),
		2 -> 0 (200, publishRunningTotalChangedEvent', -),
		1 -> 3 (200, onEventRunningTotalChanged, -),  
		3 -> 4 (200, onEventRunningTotalChanged, -),  
		4 -> 5 (-, onEventRunningTotalChanged'', 200),
		5 -> 2 (-, onEventRunningTotalChanged'', 200),
		1 -> 6 (200, exceptionPublishRunningTotalChangedEvent, -),
		6 -> 0 (200, publishRunningTotalChangedEvent', -);
}

automaton publishSaleFinishedEvent (200) {
	state 0, 1, 2, 3, 4, 5, 6;
	init 0;
	trans 
		0 -> 1 (-, publishSaleFinishedEvent, 200),
		2 -> 0 (200, publishSaleFinishedEvent', -),
		1 -> 3 (200, onEventSaleFinished, -),  
		3 -> 4 (200, onEventSaleFinished, -),  
		4 -> 5 (-, onEventSaleFinished'', 200),
		5 -> 2 (-, onEventSaleFinished'', 200),
		1 -> 6 (200, exceptionPublishSaleFinishedEvent, -),
		6 -> 0 (200, publishSaleFinishedEvent', -);
}

automaton publishSaleStartedEvent (200) {
	state 0, 1, 2, 3, 4, 5, 6, 7, 8;
	init 0;
	trans 
		0 -> 1 (-, publishSaleStartedEvent, 200),
		2 -> 0 (200, publishSaleStartedEvent', -),
		1 -> 3 (200, onEventSaleStarted, -),  
		3 -> 4 (200, onEventSaleStarted, -),  
		4 -> 5 (200, onEventSaleStarted, -),  
		5 -> 6 (-, onEventSaleStarted'', 200),
		6 -> 7 (-, onEventSaleStarted'', 200),
		7 -> 2 (-, onEventSaleStarted'', 200),
		1 -> 8 (200, exceptionPublishSaleStartedEvent, -),
		8 -> 0 (200, publishSaleStartedEvent', -);
}

automaton publishSaleSuccessEvent (200) {
	state 0, 1, 2, 3, 4, 5, 6;
	init 0;
	trans 
		0 -> 1 (-, publishSaleSuccessEvent, 200),
		2 -> 0 (200, publishSaleSuccessEvent', -),
		1 -> 3 (200, onEventSaleSuccess, -),  
		3 -> 4 (200, onEventSaleSuccess, -),  
		4 -> 5 (-, onEventSaleSuccess'', 200),
		5 -> 2 (-, onEventSaleSuccess'', 200),
		1 -> 6 (200, exceptionPublishSaleSuccessEvent, -),
		6 -> 0 (200, publishSaleSuccessEvent', -);
}

composite CashDeskChannel {
	publishCashAmountEnteredEvent, publishCashAmountEnteredEvent_Enter, publishCashBoxClosedEvent, publishChangeAmountCalculatedEvent, publishCreditCardScanFailedEvent, publishCreditCardScannedEvent, publishExpressModeDisabledEvent, publishExpressModeEnabledEvent, publishInvalidCreditCardEvent, publishPaymentModeEvent, publishPINEnteredEvent, publishProductBarcodeNotValidEvent, publishProductBarcodeScannedEvent, publishRunningTotalChangedEvent, publishSaleFinishedEvent, publishSaleStartedEvent, publishSaleSuccessEvent;
}





		/********** CashDesk **********/


composite CashDesk {
	CashDeskApplication, CashBoxControllerComposite, ScannerControllerComposite, CardReaderControllerComposite, PrinterControllerComposite, LightDisplayControllerComposite, CashDeskGUIControllerComposite, CashDeskChannel;
	restrictL 
		// CashDeskApplication
		(-, onEventSaleStarted, 100), (100, onEventSaleStarted'', -),
		(-, onEventProductBarcodeScanned, 100), (100, onEventProductBarcodeScanned'', -), 
		(-, onEventSaleFinished, 100), (100, onEventSaleFinished'', -), 
		(-, onEventCashAmountEntered, 100), (100, onEventCashAmountEntered'', -), 
		(-, onEventCashAmountEntered_Enter, 100), (100, onEventCashAmountEntered_Enter'', -), 
		(-, onEventCashBoxClosed, 100), (100, onEventCashBoxClosed'', -), 
		(-, onEventCreditCardScanned, 100), (100, onEventCreditCardScanned'', -), 
		(-, onEventPINEntered, 100), (100, onEventPINEntered'', -), 
		(-, onEventPaymentMode, 100), (100, onEventPaymentMode'', -), 
		(-, onEventExpressModeDisabled, 100), (100, onEventExpressModeDisabled'', -), 
			(100, publishRunningTotalChangedEvent, -), (-, publishRunningTotalChangedEvent', 100), (-, exceptionPublishRunningTotalChangedEvent, 100),
			(100, publishProductBarcodeNotValidEvent, -), (-, publishProductBarcodeNotValidEvent', 100), (-, exceptionPublishProductBarcodeNotValidEvent, 100),
			(100, publishChangeAmountCalculatedEvent, -), (-, publishChangeAmountCalculatedEvent', 100), (-, exceptionPublishChangeAmountCalculatedEvent, 100),
			(100, publishInvalidCreditCardEvent, -), (-, publishInvalidCreditCardEvent', 100), (-, exceptionPublishInvalidCreditCardEvent, 100),
			(100, publishExpressModeEnabledEvent, -), (-, publishExpressModeEnabledEvent', 100), (-, exceptionPublishExpressModeEnabledEvent, 100),
			(100, publishSaleSuccessEvent, -), (-, publishSaleSuccessEvent', 100), (-, exceptionPublishSaleSuccessEvent, 100),
		
		// CashBoxController
			(-, onEventChangeAmountCalculated, 112), (112, onEventChangeAmountCalculated'', -), 
		(112, publishSaleStartedEvent, -), (-, publishSaleStartedEvent', 112), (-, exceptionPublishSaleStartedEvent, 112), 
		(112, publishSaleFinishedEvent, -), (-, publishSaleFinishedEvent', 112), (-, exceptionPublishSaleFinishedEvent, 112), 
		(112, publishPaymentModeEvent, -), (-, publishPaymentModeEvent', 112), (-, exceptionPublishPaymentModeEvent, 112), 
		(112, publishCashAmountEnteredEvent, -), (-, publishCashAmountEnteredEvent', 112), (-, exceptionPublishCashAmountEnteredEvent, 112), 
		(112, publishCashAmountEnteredEvent_Enter, -), (-, publishCashAmountEnteredEvent_Enter', 112), (-, exceptionPublishCashAmountEnteredEvent_Enter, 112), 
		(112, publishCashBoxClosedEvent, -), (-, publishCashBoxClosedEvent', 112), (-, exceptionPublishCashBoxClosedEvent, 112), 
		(112, publishExpressModeDisabledEvent, -), (-, publishExpressModeDisabledEvent', 112), (-, exceptionPublishExpressModeDisabledEvent, 112), 

		// ScannerController
		(122, publishProductBarcodeScannedEvent, -), (-, publishProductBarcodeScannedEvent', 122), (-, exceptionPublishProductBarcodeScannedEvent, 122), 

		// CardReaderController
		(-, onEventExpressModeEnabled, 132), (132, onEventExpressModeEnabled'', -),
		(-, onEventExpressModeDisabled, 132), (132, onEventExpressModeDisabled'', -),
			(132, publishCreditCardScannedEvent, -), (-, publishCreditCardScannedEvent', 132), (-, exceptionPublishCreditCardScannedEvent, 132), 
			(132, publishPINEnteredEvent, -), (-, publishPINEnteredEvent', 132), (-, exceptionPublishPINEnteredEvent, 132), 

		// PrinterController
		(-, onEventRunningTotalChanged, 142), (142, onEventRunningTotalChanged'', -),
		(-, onEventCashAmountEntered, 142), (142, onEventCashAmountEntered'', -),
		(-, onEventCashAmountEntered_Enter, 142), (142, onEventCashAmountEntered_Enter'', -),
		(-, onEventChangeAmountCalculated, 142), (142, onEventChangeAmountCalculated'', -),
		(-, onEventSaleStarted, 142), (142, onEventSaleStarted'', -),
		(-, onEventSaleFinished, 142), (142, onEventSaleFinished'', -),
		(-, onEventCashBoxClosed, 142), (142, onEventCashBoxClosed'', -),
		(-, onEventSaleSuccess, 142), (142, onEventSaleSuccess'', -),

		// LightDisplayController
		(-, onEventExpressModeEnabled, 152), (152, onEventExpressModeEnabled'', -), 
		(-, onEventExpressModeDisabled, 152), (152, onEventExpressModeDisabled'', -),

		// CashDeskGUI
		(-, onEventRunningTotalChanged, 162), (162, onEventRunningTotalChanged'', -),
		(-, onEventCashAmountEntered, 162), (162, onEventCashAmountEntered'', -),
		(-, onEventCashAmountEntered_Enter, 162), (162, onEventCashAmountEntered_Enter'', -),
		(-, onEventChangeAmountCalculated, 162), (162, onEventChangeAmountCalculated'', -),
		(-, onEventExpressModeDisabled, 162), (162, onEventExpressModeDisabled'', -),
		(-, onEventExpressModeEnabled, 162), (162, onEventExpressModeEnabled'', -),
		(-, onEventInvalidCreditCard, 162), (162, onEventInvalidCreditCard'', -),
		(-, onEventCreditCardScanFailed, 162), (162, onEventCreditCardScanFailed'', -),
		(-, onEventProductBarcodeNotValid, 162), (162, onEventProductBarcodeNotValid'', -),
		(-, onEventSaleSuccess, 162), (162, onEventSaleSuccess'', -),
		(-, onEventSaleStarted, 162), (162, onEventSaleStarted'', -),

		// CashDeskChannel
		(-, publishCashAmountEnteredEvent, 200), (200, publishCashAmountEnteredEvent', -), (200, exceptionPublishCashAmountEnteredEvent, -), (200, onEventCashAmountEntered, -), (-, onEventCashAmountEntered'', 200), 
		(-, publishCashAmountEnteredEvent_Enter, 200), (200, publishCashAmountEnteredEvent_Enter', -), (200, exceptionPublishCashAmountEnteredEvent_Enter, -), (200, onEventCashAmountEntered_Enter, -), (-, onEventCashAmountEntered_Enter'', 200), 
		(-, publishCashBoxClosedEvent, 200), (200, publishCashBoxClosedEvent', -), (200, exceptionPublishCashBoxClosedEvent, -), (200, onEventCashBoxClosed, -), (-, onEventCashBoxClosed'', 200), 
		(-, publishChangeAmountCalculatedEvent, 200), (200, publishChangeAmountCalculatedEvent', -), (200, exceptionPublishChangeAmountCalculatedEvent, -), (200, onEventChangeAmountCalculated, -), (-, onEventChangeAmountCalculated'', 200), 
		(-, publishCreditCardScanFailedEvent, 200), (200, publishCreditCardScanFailedEvent', -), (200, exceptionPublishCreditCardScanFailedEvent, -), (200, onEventCreditCardScanFailed, -), (-, onEventCreditCardScanFailed'', 200),
		(-, publishCreditCardScannedEvent, 200), (200, publishCreditCardScannedEvent', -), (200, exceptionPublishCreditCardScannedEvent, -), (200, onEventCreditCardScanned, -), (-, onEventCreditCardScanned'', 200), 
		(-, publishExpressModeDisabledEvent, 200), (200, publishExpressModeDisabledEvent', -), (200, exceptionPublishExpressModeDisabledEvent, -), (200, onEventExpressModeDisabled, -), (-, onEventExpressModeDisabled'', 200), 
		(-, publishExpressModeEnabledEvent, 200), (200, publishExpressModeEnabledEvent', -), (200, exceptionPublishExpressModeEnabledEvent, -), (200, onEventExpressModeEnabled, -), (-, onEventExpressModeEnabled'', 200), 
		(-, publishInvalidCreditCardEvent, 200), (200, publishInvalidCreditCardEvent', -), (200, exceptionPublishInvalidCreditCardEvent, -), (200, onEventInvalidCreditCard, -), (-, onEventInvalidCreditCard'', 200), 
		(-, publishPaymentModeEvent, 200), (200, publishPaymentModeEvent', -), (200, exceptionPublishPaymentModeEvent, -), (200, onEventPaymentMode, -), (-, onEventPaymentMode'', 200), 
		(-, publishPINEnteredEvent, 200), (200, publishPINEnteredEvent', -), (200, exceptionPublishPINEnteredEvent, -), (200, onEventPINEntered, -), (-, onEventPINEntered'', 200), 
		(-, publishProductBarcodeNotValidEvent, 200), (200, publishProductBarcodeNotValidEvent', -), (200, exceptionPublishProductBarcodeNotValidEvent, -), (200, onEventProductBarcodeNotValid, -), (-, onEventProductBarcodeNotValid'', 200), 
		(-, publishProductBarcodeScannedEvent, 200), (200, publishProductBarcodeScannedEvent', -), (200, exceptionPublishProductBarcodeScannedEvent, -), (200, onEventProductBarcodeScanned, -), (-, onEventProductBarcodeScanned'', 200), 
		(-, publishRunningTotalChangedEvent, 200), (200, publishRunningTotalChangedEvent', -), (200, exceptionPublishRunningTotalChangedEvent, -), (200, onEventRunningTotalChanged, -), (-, onEventRunningTotalChanged'', 200), 
		(-, publishSaleFinishedEvent, 200), (200, publishSaleFinishedEvent', -), (200, exceptionPublishSaleFinishedEvent, -), (200, onEventSaleFinished, -), (-, onEventSaleFinished'', 200), 
		(-, publishSaleStartedEvent, 200), (200, publishSaleStartedEvent', -), (200, exceptionPublishSaleStartedEvent, -), (200, onEventSaleStarted, -), (-, onEventSaleStarted'', 200), 
		(-, publishSaleSuccessEvent, 200), (200, publishSaleSuccessEvent', -), (200, exceptionPublishSaleSuccessEvent, -), (200, onEventSaleSuccess, -), (-, onEventSaleSuccess'', 200);
}





		/********** ExtCommChannel **********/


automaton publishExtSaleRegisteredEvent (300) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, publishExtSaleRegisteredEvent, 300),
		2 -> 0 (300, publishExtSaleRegisteredEvent', -),
		1 -> 3 (300, onEventExtSaleRegistered, -),  
		3 -> 2 (-, onEventExtSaleRegistered'', 300),
		1 -> 4 (300, exceptionPublishExtSaleRegisteredEvent, -),
		4 -> 0 (300, publishExtSaleRegisteredEvent', -);
}

automaton publishExtExpressModeEnabledEvent (300) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, publishExtExpressModeEnabledEvent, 300),
		2 -> 0 (300, publishExtExpressModeEnabledEvent', -),
		1 -> 3 (300, onEventExtExpressModeEnabled, -),  
		3 -> 2 (-, onEventExtExpressModeEnabled'', 300),
		1 -> 4 (300, exceptionPublishExtExpressModeEnabledEvent, -),
		4 -> 0 (300, publishExtExpressModeEnabledEvent', -);
}

automaton publishExtAccountSaleEvent (300) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, publishExtAccountSaleEvent, 300),
		2 -> 0 (300, publishExtAccountSaleEvent', -),
		1 -> 3 (300, onEventExtAccountSale, -),  
		3 -> 2 (-, onEventExtAccountSale', 300),
		1 -> 4 (300, exceptionPublishExtAccountSaleEvent, -),
		4 -> 0 (300, publishExtAccountSaleEvent', -);
}

composite ExtCommChannel {
	publishExtSaleRegisteredEvent, publishExtExpressModeEnabledEvent, publishExtAccountSaleEvent;
}




		/********** Coordinator **********/


automaton Coordinator (400) {
  state 0, 1, 2, 3, 4, 5, 6, 7, 8, 9;
  init 0;
  trans
	0 -> 1 (-, onEventExtSaleRegistered, 400),
    1 -> 2 (400, onEventExtSaleRegistered'', -),
    2 -> 3 (400, updateStatistics, 400),
    3 -> 4 (400, updateStatistics', 400),
    4 -> 5 (400, isExpressModeNeeded, 400),
    5 -> 6 (400, isExpressModeNeeded', 400),
	5 -> 8 (400, isExpressModeNeeded', 400),
    6 -> 7 (400, publishExtExpressModeEnabledEvent, -),
    7 -> 8 (-, publishExtExpressModeEnabledEvent', 400),

	7 -> 9 (-, exceptionPublishExtExpressModeEnabledEvent, 400),
	9 -> 8 (-, publishExtExpressModeEnabledEvent', 400),
	
	8 -> 0 (400, onEventExtSaleRegistered', 400);
}





	/********** CashDeskLine **********/


composite CashDeskLine {
	CashDesk, ExtCommChannel, Coordinator;
	restrictL 
		// CashDeskApplication
		(-, onEventExtExpressModeEnabled, 100), (100, onEventExtExpressModeEnabled'', -), 
			(100, publishExtAccountSaleEvent, -), (-, publishExtAccountSaleEvent', 100), (-, exceptionPublishExtAccountSaleEvent, 100),
			(100, publishExtSaleRegisteredEvent, -), (-, publishExtSaleRegisteredEvent', 100), (-, exceptionPublishExtSaleRegisteredEvent, 100),

		// ExtCommChannel
		(-, publishExtAccountSaleEvent, 300), (300, publishExtAccountSaleEvent', -), (300, exceptionPublishExtAccountSaleEvent, -), 
		(-, publishExtSaleRegisteredEvent, 300), (300, publishExtSaleRegisteredEvent', -), (300, exceptionPublishExtSaleRegisteredEvent, -), (300, onEventExtSaleRegistered, -), (-, onEventExtSaleRegistered'', 300),
		(-, publishExtExpressModeEnabledEvent, 300), (300, publishExtExpressModeEnabledEvent', -), (300, exceptionPublishExtExpressModeEnabledEvent, -), (300, onEventExtExpressModeEnabled, -), (-, onEventExtExpressModeEnabled'', 300),

		// Coordinator
		(-, onEventExtSaleRegistered, 400), (400, onEventExtSaleRegistered'', -),
			(400, publishExtExpressModeEnabledEvent, -), (-, publishExtExpressModeEnabledEvent', 400), (-, exceptionPublishExtExpressModeEnabledEvent, 400);		
}





	/********** Inventory begin **********/


		/********** Data begin **********/


			/********** Persistence for StoreApplication **********/


automaton PersistenceImpl_1 (511) {
	state 0, 1, 2, 3;
	init 0;
	trans 
		0 -> 1 (-, getPersistenceContext, 511),
		1 -> 2 (511, PersistenceContextImpl, -),
		2 -> 3 (-, PersistenceContextImpl', 511),
		3 -> 0 (511, getPersistenceContext', -);
}

automaton PersistenceContextImpl_1a (511) {
  state 00, 01, 02, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47;
  init 00;
  trans
	00 -> 01 (-, PersistenceContextImpl, 511),
	01 -> 0 (511, PersistenceContextImpl', -),
	0 -> 02 (-, PersistenceContextImplD, 511),
	02 -> 00 (511, PersistenceContextImplD', -),

    0 -> 1 (-, getEntityManager, 511),
    0 -> 2 (-, getTransactionContext, 511),
    0 -> 3 (-, makePersistent, 511),
    0 -> 4 (-, close, 511),
    1 -> 0 (511, getEntityManager', -),
    1 -> 5 (-, getTransactionContext, 511),
    1 -> 6 (-, makePersistent, 511),
    1 -> 7 (-, close, 511),
    2 -> 5 (-, getEntityManager, 511),
    2 -> 8 (511, TransactionContextImpl, -),
    2 -> 9 (-, makePersistent, 511),
    2 -> 10 (-, close, 511),
    3 -> 6 (-, getEntityManager, 511),
    3 -> 9 (-, getTransactionContext, 511),
    3 -> 0 (511, makePersistent', -),
    3 -> 11 (511, exceptionMakePersistent, -),
    3 -> 12 (-, close, 511),
    4 -> 7 (-, getEntityManager, 511),
    4 -> 10 (-, getTransactionContext, 511),
    4 -> 12 (-, makePersistent, 511),
    4 -> 0 (511, close', -),
    5 -> 2 (511, getEntityManager', -),
    5 -> 13 (511, TransactionContextImpl, -),
    5 -> 14 (-, makePersistent, 511),
    5 -> 15 (-, close, 511),
    6 -> 3 (511, getEntityManager', -),
    6 -> 14 (-, getTransactionContext, 511),
    6 -> 1 (511, makePersistent', -),
    6 -> 16 (511, exceptionMakePersistent, -),
    6 -> 17 (-, close, 511),
    7 -> 4 (511, getEntityManager', -),
    7 -> 15 (-, getTransactionContext, 511),
    7 -> 17 (-, makePersistent, 511),
    7 -> 1 (511, close', -),
    8 -> 13 (-, getEntityManager, 511),
    8 -> 18 (-, TransactionContextImpl', 511),
    8 -> 19 (-, makePersistent, 511),
    8 -> 20 (-, close, 511),
    9 -> 14 (-, getEntityManager, 511),
    9 -> 19 (511, TransactionContextImpl, -),
    9 -> 2 (511, makePersistent', -),
    9 -> 21 (511, exceptionMakePersistent, -),
    9 -> 22 (-, close, 511),
    10 -> 15 (-, getEntityManager, 511),
    10 -> 20 (511, TransactionContextImpl, -),
    10 -> 22 (-, makePersistent, 511),
    10 -> 2 (511, close', -),
    11 -> 16 (-, getEntityManager, 511),
    11 -> 21 (-, getTransactionContext, 511),
    11 -> 0 (511, makePersistent', -),
    11 -> 23 (-, close, 511),
    12 -> 17 (-, getEntityManager, 511),
    12 -> 22 (-, getTransactionContext, 511),
    12 -> 4 (511, makePersistent', -),
    12 -> 23 (511, exceptionMakePersistent, -),
    12 -> 3 (511, close', -),
    13 -> 8 (511, getEntityManager', -),
    13 -> 24 (-, TransactionContextImpl', 511),
    13 -> 25 (-, makePersistent, 511),
    13 -> 26 (-, close, 511),
    14 -> 9 (511, getEntityManager', -),
    14 -> 25 (511, TransactionContextImpl, -),
    14 -> 5 (511, makePersistent', -),
    14 -> 27 (511, exceptionMakePersistent, -),
    14 -> 28 (-, close, 511),
    15 -> 10 (511, getEntityManager', -),
    15 -> 26 (511, TransactionContextImpl, -),
    15 -> 28 (-, makePersistent, 511),
    15 -> 5 (511, close', -),
    16 -> 11 (511, getEntityManager', -),
    16 -> 27 (-, getTransactionContext, 511),
    16 -> 1 (511, makePersistent', -),
    16 -> 29 (-, close, 511),
    17 -> 12 (511, getEntityManager', -),
    17 -> 28 (-, getTransactionContext, 511),
    17 -> 7 (511, makePersistent', -),
    17 -> 29 (511, exceptionMakePersistent, -),
    17 -> 6 (511, close', -),
    18 -> 24 (-, getEntityManager, 511),
    18 -> 0 (511, getTransactionContext', -),
    18 -> 30 (-, makePersistent, 511),
    18 -> 31 (-, close, 511),
    19 -> 25 (-, getEntityManager, 511),
    19 -> 30 (-, TransactionContextImpl', 511),
    19 -> 8 (511, makePersistent', -),
    19 -> 32 (511, exceptionMakePersistent, -),
    19 -> 33 (-, close, 511),
    20 -> 26 (-, getEntityManager, 511),
    20 -> 31 (-, TransactionContextImpl', 511),
    20 -> 33 (-, makePersistent, 511),
    20 -> 8 (511, close', -),
    21 -> 27 (-, getEntityManager, 511),
    21 -> 32 (511, TransactionContextImpl, -),
    21 -> 2 (511, makePersistent', -),
    21 -> 34 (-, close, 511),
    22 -> 28 (-, getEntityManager, 511),
    22 -> 33 (511, TransactionContextImpl, -),
    22 -> 10 (511, makePersistent', -),
    22 -> 34 (511, exceptionMakePersistent, -),
    22 -> 9 (511, close', -),
    23 -> 29 (-, getEntityManager, 511),
    23 -> 34 (-, getTransactionContext, 511),
    23 -> 4 (511, makePersistent', -),
    23 -> 11 (511, close', -),
    24 -> 18 (511, getEntityManager', -),
    24 -> 1 (511, getTransactionContext', -),
    24 -> 35 (-, makePersistent, 511),
    24 -> 36 (-, close, 511),
    25 -> 19 (511, getEntityManager', -),
    25 -> 35 (-, TransactionContextImpl', 511),
    25 -> 13 (511, makePersistent', -),
    25 -> 37 (511, exceptionMakePersistent, -),
    25 -> 38 (-, close, 511),
    26 -> 20 (511, getEntityManager', -),
    26 -> 36 (-, TransactionContextImpl', 511),
    26 -> 38 (-, makePersistent, 511),
    26 -> 13 (511, close', -),
    27 -> 21 (511, getEntityManager', -),
    27 -> 37 (511, TransactionContextImpl, -),
    27 -> 5 (511, makePersistent', -),
    27 -> 39 (-, close, 511),
    28 -> 22 (511, getEntityManager', -),
    28 -> 38 (511, TransactionContextImpl, -),
    28 -> 15 (511, makePersistent', -),
    28 -> 39 (511, exceptionMakePersistent, -),
    28 -> 14 (511, close', -),
    29 -> 23 (511, getEntityManager', -),
    29 -> 39 (-, getTransactionContext, 511),
    29 -> 7 (511, makePersistent', -),
    29 -> 16 (511, close', -),
    30 -> 35 (-, getEntityManager, 511),
    30 -> 3 (511, getTransactionContext', -),
    30 -> 18 (511, makePersistent', -),
    30 -> 40 (511, exceptionMakePersistent, -),
    30 -> 41 (-, close, 511),
    31 -> 36 (-, getEntityManager, 511),
    31 -> 4 (511, getTransactionContext', -),
    31 -> 41 (-, makePersistent, 511),
    31 -> 18 (511, close', -),
    32 -> 37 (-, getEntityManager, 511),
    32 -> 40 (-, TransactionContextImpl', 511),
    32 -> 8 (511, makePersistent', -),
    32 -> 42 (-, close, 511),
    33 -> 38 (-, getEntityManager, 511),
    33 -> 41 (-, TransactionContextImpl', 511),
    33 -> 20 (511, makePersistent', -),
    33 -> 42 (511, exceptionMakePersistent, -),
    33 -> 19 (511, close', -),
    34 -> 39 (-, getEntityManager, 511),
    34 -> 42 (511, TransactionContextImpl, -),
    34 -> 10 (511, makePersistent', -),
    34 -> 21 (511, close', -),
    35 -> 30 (511, getEntityManager', -),
    35 -> 6 (511, getTransactionContext', -),
    35 -> 24 (511, makePersistent', -),
    35 -> 43 (511, exceptionMakePersistent, -),
    35 -> 44 (-, close, 511),
    36 -> 31 (511, getEntityManager', -),
    36 -> 7 (511, getTransactionContext', -),
    36 -> 44 (-, makePersistent, 511),
    36 -> 24 (511, close', -),
    37 -> 32 (511, getEntityManager', -),
    37 -> 43 (-, TransactionContextImpl', 511),
    37 -> 13 (511, makePersistent', -),
    37 -> 45 (-, close, 511),
    38 -> 33 (511, getEntityManager', -),
    38 -> 44 (-, TransactionContextImpl', 511),
    38 -> 26 (511, makePersistent', -),
    38 -> 45 (511, exceptionMakePersistent, -),
    38 -> 25 (511, close', -),
    39 -> 34 (511, getEntityManager', -),
    39 -> 45 (511, TransactionContextImpl, -),
    39 -> 15 (511, makePersistent', -),
    39 -> 27 (511, close', -),
    40 -> 43 (-, getEntityManager, 511),
    40 -> 11 (511, getTransactionContext', -),
    40 -> 18 (511, makePersistent', -),
    40 -> 46 (-, close, 511),
    41 -> 44 (-, getEntityManager, 511),
    41 -> 12 (511, getTransactionContext', -),
    41 -> 31 (511, makePersistent', -),
    41 -> 46 (511, exceptionMakePersistent, -),
    41 -> 30 (511, close', -),
    42 -> 45 (-, getEntityManager, 511),
    42 -> 46 (-, TransactionContextImpl', 511),
    42 -> 20 (511, makePersistent', -),
    42 -> 32 (511, close', -),
    43 -> 40 (511, getEntityManager', -),
    43 -> 16 (511, getTransactionContext', -),
    43 -> 24 (511, makePersistent', -),
    43 -> 47 (-, close, 511),
    44 -> 41 (511, getEntityManager', -),
    44 -> 17 (511, getTransactionContext', -),
    44 -> 36 (511, makePersistent', -),
    44 -> 47 (511, exceptionMakePersistent, -),
    44 -> 35 (511, close', -),
    45 -> 42 (511, getEntityManager', -),
    45 -> 47 (-, TransactionContextImpl', 511),
    45 -> 26 (511, makePersistent', -),
    45 -> 37 (511, close', -),
    46 -> 47 (-, getEntityManager, 511),
    46 -> 23 (511, getTransactionContext', -),
    46 -> 31 (511, makePersistent', -),
    46 -> 40 (511, close', -),
    47 -> 46 (511, getEntityManager', -),
    47 -> 29 (511, getTransactionContext', -),
    47 -> 36 (511, makePersistent', -),
    47 -> 43 (511, close', -);
}


automaton PersistenceContextImpl_1b (511) {
  state 00, 01, 02, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47;
  init 00;
  trans
	00 -> 01 (-, PersistenceContextImpl, 511),
	01 -> 0 (511, PersistenceContextImpl', -),
	0 -> 02 (-, PersistenceContextImplD, 511),
	02 -> 00 (511, PersistenceContextImplD', -),

    0 -> 1 (-, getEntityManager, 511),
    0 -> 2 (-, getTransactionContext, 511),
    0 -> 3 (-, makePersistent, 511),
    0 -> 4 (-, close, 511),
    1 -> 0 (511, getEntityManager', -),
    1 -> 5 (-, getTransactionContext, 511),
    1 -> 6 (-, makePersistent, 511),
    1 -> 7 (-, close, 511),
    2 -> 5 (-, getEntityManager, 511),
    2 -> 8 (511, TransactionContextImpl, -),
    2 -> 9 (-, makePersistent, 511),
    2 -> 10 (-, close, 511),
    3 -> 6 (-, getEntityManager, 511),
    3 -> 9 (-, getTransactionContext, 511),
    3 -> 0 (511, makePersistent', -),
    3 -> 11 (511, exceptionMakePersistent, -),
    3 -> 12 (-, close, 511),
    4 -> 7 (-, getEntityManager, 511),
    4 -> 10 (-, getTransactionContext, 511),
    4 -> 12 (-, makePersistent, 511),
    4 -> 0 (511, close', -),
    5 -> 2 (511, getEntityManager', -),
    5 -> 13 (511, TransactionContextImpl, -),
    5 -> 14 (-, makePersistent, 511),
    5 -> 15 (-, close, 511),
    6 -> 3 (511, getEntityManager', -),
    6 -> 14 (-, getTransactionContext, 511),
    6 -> 1 (511, makePersistent', -),
    6 -> 16 (511, exceptionMakePersistent, -),
    6 -> 17 (-, close, 511),
    7 -> 4 (511, getEntityManager', -),
    7 -> 15 (-, getTransactionContext, 511),
    7 -> 17 (-, makePersistent, 511),
    7 -> 1 (511, close', -),
    8 -> 13 (-, getEntityManager, 511),
    8 -> 18 (-, TransactionContextImpl', 511),
    8 -> 19 (-, makePersistent, 511),
    8 -> 20 (-, close, 511),
    9 -> 14 (-, getEntityManager, 511),
    9 -> 19 (511, TransactionContextImpl, -),
    9 -> 2 (511, makePersistent', -),
    9 -> 21 (511, exceptionMakePersistent, -),
    9 -> 22 (-, close, 511),
    10 -> 15 (-, getEntityManager, 511),
    10 -> 20 (511, TransactionContextImpl, -),
    10 -> 22 (-, makePersistent, 511),
    10 -> 2 (511, close', -),
    11 -> 16 (-, getEntityManager, 511),
    11 -> 21 (-, getTransactionContext, 511),
    11 -> 0 (511, makePersistent', -),
    11 -> 23 (-, close, 511),
    12 -> 17 (-, getEntityManager, 511),
    12 -> 22 (-, getTransactionContext, 511),
    12 -> 4 (511, makePersistent', -),
    12 -> 23 (511, exceptionMakePersistent, -),
    12 -> 3 (511, close', -),
    13 -> 8 (511, getEntityManager', -),
    13 -> 24 (-, TransactionContextImpl', 511),
    13 -> 25 (-, makePersistent, 511),
    13 -> 26 (-, close, 511),
    14 -> 9 (511, getEntityManager', -),
    14 -> 25 (511, TransactionContextImpl, -),
    14 -> 5 (511, makePersistent', -),
    14 -> 27 (511, exceptionMakePersistent, -),
    14 -> 28 (-, close, 511),
    15 -> 10 (511, getEntityManager', -),
    15 -> 26 (511, TransactionContextImpl, -),
    15 -> 28 (-, makePersistent, 511),
    15 -> 5 (511, close', -),
    16 -> 11 (511, getEntityManager', -),
    16 -> 27 (-, getTransactionContext, 511),
    16 -> 1 (511, makePersistent', -),
    16 -> 29 (-, close, 511),
    17 -> 12 (511, getEntityManager', -),
    17 -> 28 (-, getTransactionContext, 511),
    17 -> 7 (511, makePersistent', -),
    17 -> 29 (511, exceptionMakePersistent, -),
    17 -> 6 (511, close', -),
    18 -> 24 (-, getEntityManager, 511),
    18 -> 0 (511, getTransactionContext', -),
    18 -> 30 (-, makePersistent, 511),
    18 -> 31 (-, close, 511),
    19 -> 25 (-, getEntityManager, 511),
    19 -> 30 (-, TransactionContextImpl', 511),
    19 -> 8 (511, makePersistent', -),
    19 -> 32 (511, exceptionMakePersistent, -),
    19 -> 33 (-, close, 511),
    20 -> 26 (-, getEntityManager, 511),
    20 -> 31 (-, TransactionContextImpl', 511),
    20 -> 33 (-, makePersistent, 511),
    20 -> 8 (511, close', -),
    21 -> 27 (-, getEntityManager, 511),
    21 -> 32 (511, TransactionContextImpl, -),
    21 -> 2 (511, makePersistent', -),
    21 -> 34 (-, close, 511),
    22 -> 28 (-, getEntityManager, 511),
    22 -> 33 (511, TransactionContextImpl, -),
    22 -> 10 (511, makePersistent', -),
    22 -> 34 (511, exceptionMakePersistent, -),
    22 -> 9 (511, close', -),
    23 -> 29 (-, getEntityManager, 511),
    23 -> 34 (-, getTransactionContext, 511),
    23 -> 4 (511, makePersistent', -),
    23 -> 11 (511, close', -),
    24 -> 18 (511, getEntityManager', -),
    24 -> 1 (511, getTransactionContext', -),
    24 -> 35 (-, makePersistent, 511),
    24 -> 36 (-, close, 511),
    25 -> 19 (511, getEntityManager', -),
    25 -> 35 (-, TransactionContextImpl', 511),
    25 -> 13 (511, makePersistent', -),
    25 -> 37 (511, exceptionMakePersistent, -),
    25 -> 38 (-, close, 511),
    26 -> 20 (511, getEntityManager', -),
    26 -> 36 (-, TransactionContextImpl', 511),
    26 -> 38 (-, makePersistent, 511),
    26 -> 13 (511, close', -),
    27 -> 21 (511, getEntityManager', -),
    27 -> 37 (511, TransactionContextImpl, -),
    27 -> 5 (511, makePersistent', -),
    27 -> 39 (-, close, 511),
    28 -> 22 (511, getEntityManager', -),
    28 -> 38 (511, TransactionContextImpl, -),
    28 -> 15 (511, makePersistent', -),
    28 -> 39 (511, exceptionMakePersistent, -),
    28 -> 14 (511, close', -),
    29 -> 23 (511, getEntityManager', -),
    29 -> 39 (-, getTransactionContext, 511),
    29 -> 7 (511, makePersistent', -),
    29 -> 16 (511, close', -),
    30 -> 35 (-, getEntityManager, 511),
    30 -> 3 (511, getTransactionContext', -),
    30 -> 18 (511, makePersistent', -),
    30 -> 40 (511, exceptionMakePersistent, -),
    30 -> 41 (-, close, 511),
    31 -> 36 (-, getEntityManager, 511),
    31 -> 4 (511, getTransactionContext', -),
    31 -> 41 (-, makePersistent, 511),
    31 -> 18 (511, close', -),
    32 -> 37 (-, getEntityManager, 511),
    32 -> 40 (-, TransactionContextImpl', 511),
    32 -> 8 (511, makePersistent', -),
    32 -> 42 (-, close, 511),
    33 -> 38 (-, getEntityManager, 511),
    33 -> 41 (-, TransactionContextImpl', 511),
    33 -> 20 (511, makePersistent', -),
    33 -> 42 (511, exceptionMakePersistent, -),
    33 -> 19 (511, close', -),
    34 -> 39 (-, getEntityManager, 511),
    34 -> 42 (511, TransactionContextImpl, -),
    34 -> 10 (511, makePersistent', -),
    34 -> 21 (511, close', -),
    35 -> 30 (511, getEntityManager', -),
    35 -> 6 (511, getTransactionContext', -),
    35 -> 24 (511, makePersistent', -),
    35 -> 43 (511, exceptionMakePersistent, -),
    35 -> 44 (-, close, 511),
    36 -> 31 (511, getEntityManager', -),
    36 -> 7 (511, getTransactionContext', -),
    36 -> 44 (-, makePersistent, 511),
    36 -> 24 (511, close', -),
    37 -> 32 (511, getEntityManager', -),
    37 -> 43 (-, TransactionContextImpl', 511),
    37 -> 13 (511, makePersistent', -),
    37 -> 45 (-, close, 511),
    38 -> 33 (511, getEntityManager', -),
    38 -> 44 (-, TransactionContextImpl', 511),
    38 -> 26 (511, makePersistent', -),
    38 -> 45 (511, exceptionMakePersistent, -),
    38 -> 25 (511, close', -),
    39 -> 34 (511, getEntityManager', -),
    39 -> 45 (511, TransactionContextImpl, -),
    39 -> 15 (511, makePersistent', -),
    39 -> 27 (511, close', -),
    40 -> 43 (-, getEntityManager, 511),
    40 -> 11 (511, getTransactionContext', -),
    40 -> 18 (511, makePersistent', -),
    40 -> 46 (-, close, 511),
    41 -> 44 (-, getEntityManager, 511),
    41 -> 12 (511, getTransactionContext', -),
    41 -> 31 (511, makePersistent', -),
    41 -> 46 (511, exceptionMakePersistent, -),
    41 -> 30 (511, close', -),
    42 -> 45 (-, getEntityManager, 511),
    42 -> 46 (-, TransactionContextImpl', 511),
    42 -> 20 (511, makePersistent', -),
    42 -> 32 (511, close', -),
    43 -> 40 (511, getEntityManager', -),
    43 -> 16 (511, getTransactionContext', -),
    43 -> 24 (511, makePersistent', -),
    43 -> 47 (-, close, 511),
    44 -> 41 (511, getEntityManager', -),
    44 -> 17 (511, getTransactionContext', -),
    44 -> 36 (511, makePersistent', -),
    44 -> 47 (511, exceptionMakePersistent, -),
    44 -> 35 (511, close', -),
    45 -> 42 (511, getEntityManager', -),
    45 -> 47 (-, TransactionContextImpl', 511),
    45 -> 26 (511, makePersistent', -),
    45 -> 37 (511, close', -),
    46 -> 47 (-, getEntityManager, 511),
    46 -> 23 (511, getTransactionContext', -),
    46 -> 31 (511, makePersistent', -),
    46 -> 40 (511, close', -),
    47 -> 46 (511, getEntityManager', -),
    47 -> 29 (511, getTransactionContext', -),
    47 -> 36 (511, makePersistent', -),
    47 -> 43 (511, close', -);
}


automaton TransactionContextImpl_1 (511) {
  state 00, 01, 02, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53;
  init 00;
  trans
	00 -> 01 (-, TransactionContextImpl, 511),
	01 -> 0 (511, TransactionContextImpl', -),
	0 -> 02 (-, TransactionContextImplD, 511),
	02 -> 00 (511, TransactionContextImplD', -),

    0 -> 1 (-, beginTransaction, 511),
    0 -> 2 (-, commit, 511),
    0 -> 3 (-, rollback, 511),
    0 -> 4 (-, isActive, 511),
    1 -> 0 (511, beginTransaction', -),
    1 -> 5 (-, commit, 511),
    1 -> 6 (-, rollback, 511),
    1 -> 7 (-, isActive, 511),
    2 -> 5 (-, beginTransaction, 511),
    2 -> 0 (511, commit', -),
    2 -> 8 (511, exceptionCommit, -),
    2 -> 9 (-, rollback, 511),
    2 -> 10 (-, isActive, 511),
    3 -> 6 (-, beginTransaction, 511),
    3 -> 9 (-, commit, 511),
    3 -> 0 (511, rollback', -),
    3 -> 11 (511, exceptionRollback, -),
    3 -> 12 (-, isActive, 511),
    4 -> 7 (-, beginTransaction, 511),
    4 -> 10 (-, commit, 511),
    4 -> 12 (-, rollback, 511),
    4 -> 0 (511, isActive', -),
    4 -> 13 (511, exceptionIsActive, -),
    5 -> 2 (511, beginTransaction', -),
    5 -> 1 (511, commit', -),
    5 -> 14 (511, exceptionCommit, -),
    5 -> 15 (-, rollback, 511),
    5 -> 16 (-, isActive, 511),
    6 -> 3 (511, beginTransaction', -),
    6 -> 15 (-, commit, 511),
    6 -> 1 (511, rollback', -),
    6 -> 17 (511, exceptionRollback, -),
    6 -> 18 (-, isActive, 511),
    7 -> 4 (511, beginTransaction', -),
    7 -> 16 (-, commit, 511),
    7 -> 18 (-, rollback, 511),
    7 -> 1 (511, isActive', -),
    7 -> 19 (511, exceptionIsActive, -),
    8 -> 14 (-, beginTransaction, 511),
    8 -> 0 (511, commit', -),
    8 -> 20 (-, rollback, 511),
    8 -> 21 (-, isActive, 511),
    9 -> 15 (-, beginTransaction, 511),
    9 -> 3 (511, commit', -),
    9 -> 20 (511, exceptionCommit, -),
    9 -> 2 (511, rollback', -),
    9 -> 22 (511, exceptionRollback, -),
    9 -> 23 (-, isActive, 511),
    10 -> 16 (-, beginTransaction, 511),
    10 -> 4 (511, commit', -),
    10 -> 21 (511, exceptionCommit, -),
    10 -> 23 (-, rollback, 511),
    10 -> 2 (511, isActive', -),
    10 -> 24 (511, exceptionIsActive, -),
    11 -> 17 (-, beginTransaction, 511),
    11 -> 22 (-, commit, 511),
    11 -> 0 (511, rollback', -),
    11 -> 25 (-, isActive, 511),
    12 -> 18 (-, beginTransaction, 511),
    12 -> 23 (-, commit, 511),
    12 -> 4 (511, rollback', -),
    12 -> 25 (511, exceptionRollback, -),
    12 -> 3 (511, isActive', -),
    12 -> 26 (511, exceptionIsActive, -),
    13 -> 19 (-, beginTransaction, 511),
    13 -> 24 (-, commit, 511),
    13 -> 26 (-, rollback, 511),
    13 -> 0 (511, isActive', -),
    14 -> 8 (511, beginTransaction', -),
    14 -> 1 (511, commit', -),
    14 -> 27 (-, rollback, 511),
    14 -> 28 (-, isActive, 511),
    15 -> 9 (511, beginTransaction', -),
    15 -> 6 (511, commit', -),
    15 -> 27 (511, exceptionCommit, -),
    15 -> 5 (511, rollback', -),
    15 -> 29 (511, exceptionRollback, -),
    15 -> 30 (-, isActive, 511),
    16 -> 10 (511, beginTransaction', -),
    16 -> 7 (511, commit', -),
    16 -> 28 (511, exceptionCommit, -),
    16 -> 30 (-, rollback, 511),
    16 -> 5 (511, isActive', -),
    16 -> 31 (511, exceptionIsActive, -),
    17 -> 11 (511, beginTransaction', -),
    17 -> 29 (-, commit, 511),
    17 -> 1 (511, rollback', -),
    17 -> 32 (-, isActive, 511),
    18 -> 12 (511, beginTransaction', -),
    18 -> 30 (-, commit, 511),
    18 -> 7 (511, rollback', -),
    18 -> 32 (511, exceptionRollback, -),
    18 -> 6 (511, isActive', -),
    18 -> 33 (511, exceptionIsActive, -),
    19 -> 13 (511, beginTransaction', -),
    19 -> 31 (-, commit, 511),
    19 -> 33 (-, rollback, 511),
    19 -> 1 (511, isActive', -),
    20 -> 27 (-, beginTransaction, 511),
    20 -> 3 (511, commit', -),
    20 -> 8 (511, rollback', -),
    20 -> 34 (511, exceptionRollback, -),
    20 -> 35 (-, isActive, 511),
    21 -> 28 (-, beginTransaction, 511),
    21 -> 4 (511, commit', -),
    21 -> 35 (-, rollback, 511),
    21 -> 8 (511, isActive', -),
    21 -> 36 (511, exceptionIsActive, -),
    22 -> 29 (-, beginTransaction, 511),
    22 -> 11 (511, commit', -),
    22 -> 34 (511, exceptionCommit, -),
    22 -> 2 (511, rollback', -),
    22 -> 37 (-, isActive, 511),
    23 -> 30 (-, beginTransaction, 511),
    23 -> 12 (511, commit', -),
    23 -> 35 (511, exceptionCommit, -),
    23 -> 10 (511, rollback', -),
    23 -> 37 (511, exceptionRollback, -),
    23 -> 9 (511, isActive', -),
    23 -> 38 (511, exceptionIsActive, -),
    24 -> 31 (-, beginTransaction, 511),
    24 -> 13 (511, commit', -),
    24 -> 36 (511, exceptionCommit, -),
    24 -> 38 (-, rollback, 511),
    24 -> 2 (511, isActive', -),
    25 -> 32 (-, beginTransaction, 511),
    25 -> 37 (-, commit, 511),
    25 -> 4 (511, rollback', -),
    25 -> 11 (511, isActive', -),
    25 -> 39 (511, exceptionIsActive, -),
    26 -> 33 (-, beginTransaction, 511),
    26 -> 38 (-, commit, 511),
    26 -> 13 (511, rollback', -),
    26 -> 39 (511, exceptionRollback, -),
    26 -> 3 (511, isActive', -),
    27 -> 20 (511, beginTransaction', -),
    27 -> 6 (511, commit', -),
    27 -> 14 (511, rollback', -),
    27 -> 40 (511, exceptionRollback, -),
    27 -> 41 (-, isActive, 511),
    28 -> 21 (511, beginTransaction', -),
    28 -> 7 (511, commit', -),
    28 -> 41 (-, rollback, 511),
    28 -> 14 (511, isActive', -),
    28 -> 42 (511, exceptionIsActive, -),
    29 -> 22 (511, beginTransaction', -),
    29 -> 17 (511, commit', -),
    29 -> 40 (511, exceptionCommit, -),
    29 -> 5 (511, rollback', -),
    29 -> 43 (-, isActive, 511),
    30 -> 23 (511, beginTransaction', -),
    30 -> 18 (511, commit', -),
    30 -> 41 (511, exceptionCommit, -),
    30 -> 16 (511, rollback', -),
    30 -> 43 (511, exceptionRollback, -),
    30 -> 15 (511, isActive', -),
    30 -> 44 (511, exceptionIsActive, -),
    31 -> 24 (511, beginTransaction', -),
    31 -> 19 (511, commit', -),
    31 -> 42 (511, exceptionCommit, -),
    31 -> 44 (-, rollback, 511),
    31 -> 5 (511, isActive', -),
    32 -> 25 (511, beginTransaction', -),
    32 -> 43 (-, commit, 511),
    32 -> 7 (511, rollback', -),
    32 -> 17 (511, isActive', -),
    32 -> 45 (511, exceptionIsActive, -),
    33 -> 26 (511, beginTransaction', -),
    33 -> 44 (-, commit, 511),
    33 -> 19 (511, rollback', -),
    33 -> 45 (511, exceptionRollback, -),
    33 -> 6 (511, isActive', -),
    34 -> 40 (-, beginTransaction, 511),
    34 -> 11 (511, commit', -),
    34 -> 8 (511, rollback', -),
    34 -> 46 (-, isActive, 511),
    35 -> 41 (-, beginTransaction, 511),
    35 -> 12 (511, commit', -),
    35 -> 21 (511, rollback', -),
    35 -> 46 (511, exceptionRollback, -),
    35 -> 20 (511, isActive', -),
    35 -> 47 (511, exceptionIsActive, -),
    36 -> 42 (-, beginTransaction, 511),
    36 -> 13 (511, commit', -),
    36 -> 47 (-, rollback, 511),
    36 -> 8 (511, isActive', -),
    37 -> 43 (-, beginTransaction, 511),
    37 -> 25 (511, commit', -),
    37 -> 46 (511, exceptionCommit, -),
    37 -> 10 (511, rollback', -),
    37 -> 22 (511, isActive', -),
    37 -> 48 (511, exceptionIsActive, -),
    38 -> 44 (-, beginTransaction, 511),
    38 -> 26 (511, commit', -),
    38 -> 47 (511, exceptionCommit, -),
    38 -> 24 (511, rollback', -),
    38 -> 48 (511, exceptionRollback, -),
    38 -> 9 (511, isActive', -),
    39 -> 45 (-, beginTransaction, 511),
    39 -> 48 (-, commit, 511),
    39 -> 13 (511, rollback', -),
    39 -> 11 (511, isActive', -),
    40 -> 34 (511, beginTransaction', -),
    40 -> 17 (511, commit', -),
    40 -> 14 (511, rollback', -),
    40 -> 49 (-, isActive, 511),
    41 -> 35 (511, beginTransaction', -),
    41 -> 18 (511, commit', -),
    41 -> 28 (511, rollback', -),
    41 -> 49 (511, exceptionRollback, -),
    41 -> 27 (511, isActive', -),
    41 -> 50 (511, exceptionIsActive, -),
    42 -> 36 (511, beginTransaction', -),
    42 -> 19 (511, commit', -),
    42 -> 50 (-, rollback, 511),
    42 -> 14 (511, isActive', -),
    43 -> 37 (511, beginTransaction', -),
    43 -> 32 (511, commit', -),
    43 -> 49 (511, exceptionCommit, -),
    43 -> 16 (511, rollback', -),
    43 -> 29 (511, isActive', -),
    43 -> 51 (511, exceptionIsActive, -),
    44 -> 38 (511, beginTransaction', -),
    44 -> 33 (511, commit', -),
    44 -> 50 (511, exceptionCommit, -),
    44 -> 31 (511, rollback', -),
    44 -> 51 (511, exceptionRollback, -),
    44 -> 15 (511, isActive', -),
    45 -> 39 (511, beginTransaction', -),
    45 -> 51 (-, commit, 511),
    45 -> 19 (511, rollback', -),
    45 -> 17 (511, isActive', -),
    46 -> 49 (-, beginTransaction, 511),
    46 -> 25 (511, commit', -),
    46 -> 21 (511, rollback', -),
    46 -> 34 (511, isActive', -),
    46 -> 52 (511, exceptionIsActive, -),
    47 -> 50 (-, beginTransaction, 511),
    47 -> 26 (511, commit', -),
    47 -> 36 (511, rollback', -),
    47 -> 52 (511, exceptionRollback, -),
    47 -> 20 (511, isActive', -),
    48 -> 51 (-, beginTransaction, 511),
    48 -> 39 (511, commit', -),
    48 -> 52 (511, exceptionCommit, -),
    48 -> 24 (511, rollback', -),
    48 -> 22 (511, isActive', -),
    49 -> 46 (511, beginTransaction', -),
    49 -> 32 (511, commit', -),
    49 -> 28 (511, rollback', -),
    49 -> 40 (511, isActive', -),
    49 -> 53 (511, exceptionIsActive, -),
    50 -> 47 (511, beginTransaction', -),
    50 -> 33 (511, commit', -),
    50 -> 42 (511, rollback', -),
    50 -> 53 (511, exceptionRollback, -),
    50 -> 27 (511, isActive', -),
    51 -> 48 (511, beginTransaction', -),
    51 -> 45 (511, commit', -),
    51 -> 53 (511, exceptionCommit, -),
    51 -> 31 (511, rollback', -),
    51 -> 29 (511, isActive', -),
    52 -> 53 (-, beginTransaction, 511),
    52 -> 39 (511, commit', -),
    52 -> 36 (511, rollback', -),
    52 -> 34 (511, isActive', -),
    53 -> 52 (511, beginTransaction', -),
    53 -> 45 (511, commit', -),
    53 -> 42 (511, rollback', -),
    53 -> 40 (511, isActive', -);
}


composite Persistence_1 {
	PersistenceImpl_1, PersistenceContextImpl_1a, PersistenceContextImpl_1b, TransactionContextImpl_1;
	restrictL 
		// PersistenceImpl
		(511, PersistenceContextImpl, -), (-, PersistenceContextImpl', 511),

		// PersistenceContextImpl
		(-, PersistenceContextImpl, 511), (511, PersistenceContextImpl', -),
		(511, TransactionContextImpl, -), (-, TransactionContextImpl', 511), 

		// TransactionContextImpl
		(-, TransactionContextImpl, 511), (511, TransactionContextImpl', -);
}





			/********** Persistence for ReportingApplication **********/


automaton PersistenceImpl_2 (512) {
	state 0, 1, 2, 3;
	init 0;
	trans 
		0 -> 1 (-, getPersistenceContext, 512),
		1 -> 2 (512, PersistenceContextImpl, -),
		2 -> 3 (-, PersistenceContextImpl', 512),
		3 -> 0 (512, getPersistenceContext', -);
}

automaton PersistenceContextImpl_2 (512) {
  state 00, 01, 02, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47;
  init 00;
  trans
	00 -> 01 (-, PersistenceContextImpl, 512),
	01 -> 0 (512, PersistenceContextImpl', -),
	0 -> 02 (-, PersistenceContextImplD, 512),
	02 -> 00 (512, PersistenceContextImplD', -),

    0 -> 1 (-, getEntityManager, 512),
    0 -> 2 (-, getTransactionContext, 512),
    0 -> 3 (-, makePersistent, 512),
    0 -> 4 (-, close, 512),
    1 -> 0 (512, getEntityManager', -),
    1 -> 5 (-, getTransactionContext, 512),
    1 -> 6 (-, makePersistent, 512),
    1 -> 7 (-, close, 512),
    2 -> 5 (-, getEntityManager, 512),
    2 -> 8 (512, TransactionContextImpl, -),
    2 -> 9 (-, makePersistent, 512),
    2 -> 10 (-, close, 512),
    3 -> 6 (-, getEntityManager, 512),
    3 -> 9 (-, getTransactionContext, 512),
    3 -> 0 (512, makePersistent', -),
    3 -> 11 (512, exceptionMakePersistent, -),
    3 -> 12 (-, close, 512),
    4 -> 7 (-, getEntityManager, 512),
    4 -> 10 (-, getTransactionContext, 512),
    4 -> 12 (-, makePersistent, 512),
    4 -> 0 (512, close', -),
    5 -> 2 (512, getEntityManager', -),
    5 -> 13 (512, TransactionContextImpl, -),
    5 -> 14 (-, makePersistent, 512),
    5 -> 15 (-, close, 512),
    6 -> 3 (512, getEntityManager', -),
    6 -> 14 (-, getTransactionContext, 512),
    6 -> 1 (512, makePersistent', -),
    6 -> 16 (512, exceptionMakePersistent, -),
    6 -> 17 (-, close, 512),
    7 -> 4 (512, getEntityManager', -),
    7 -> 15 (-, getTransactionContext, 512),
    7 -> 17 (-, makePersistent, 512),
    7 -> 1 (512, close', -),
    8 -> 13 (-, getEntityManager, 512),
    8 -> 18 (-, TransactionContextImpl', 512),
    8 -> 19 (-, makePersistent, 512),
    8 -> 20 (-, close, 512),
    9 -> 14 (-, getEntityManager, 512),
    9 -> 19 (512, TransactionContextImpl, -),
    9 -> 2 (512, makePersistent', -),
    9 -> 21 (512, exceptionMakePersistent, -),
    9 -> 22 (-, close, 512),
    10 -> 15 (-, getEntityManager, 512),
    10 -> 20 (512, TransactionContextImpl, -),
    10 -> 22 (-, makePersistent, 512),
    10 -> 2 (512, close', -),
    11 -> 16 (-, getEntityManager, 512),
    11 -> 21 (-, getTransactionContext, 512),
    11 -> 0 (512, makePersistent', -),
    11 -> 23 (-, close, 512),
    12 -> 17 (-, getEntityManager, 512),
    12 -> 22 (-, getTransactionContext, 512),
    12 -> 4 (512, makePersistent', -),
    12 -> 23 (512, exceptionMakePersistent, -),
    12 -> 3 (512, close', -),
    13 -> 8 (512, getEntityManager', -),
    13 -> 24 (-, TransactionContextImpl', 512),
    13 -> 25 (-, makePersistent, 512),
    13 -> 26 (-, close, 512),
    14 -> 9 (512, getEntityManager', -),
    14 -> 25 (512, TransactionContextImpl, -),
    14 -> 5 (512, makePersistent', -),
    14 -> 27 (512, exceptionMakePersistent, -),
    14 -> 28 (-, close, 512),
    15 -> 10 (512, getEntityManager', -),
    15 -> 26 (512, TransactionContextImpl, -),
    15 -> 28 (-, makePersistent, 512),
    15 -> 5 (512, close', -),
    16 -> 11 (512, getEntityManager', -),
    16 -> 27 (-, getTransactionContext, 512),
    16 -> 1 (512, makePersistent', -),
    16 -> 29 (-, close, 512),
    17 -> 12 (512, getEntityManager', -),
    17 -> 28 (-, getTransactionContext, 512),
    17 -> 7 (512, makePersistent', -),
    17 -> 29 (512, exceptionMakePersistent, -),
    17 -> 6 (512, close', -),
    18 -> 24 (-, getEntityManager, 512),
    18 -> 0 (512, getTransactionContext', -),
    18 -> 30 (-, makePersistent, 512),
    18 -> 31 (-, close, 512),
    19 -> 25 (-, getEntityManager, 512),
    19 -> 30 (-, TransactionContextImpl', 512),
    19 -> 8 (512, makePersistent', -),
    19 -> 32 (512, exceptionMakePersistent, -),
    19 -> 33 (-, close, 512),
    20 -> 26 (-, getEntityManager, 512),
    20 -> 31 (-, TransactionContextImpl', 512),
    20 -> 33 (-, makePersistent, 512),
    20 -> 8 (512, close', -),
    21 -> 27 (-, getEntityManager, 512),
    21 -> 32 (512, TransactionContextImpl, -),
    21 -> 2 (512, makePersistent', -),
    21 -> 34 (-, close, 512),
    22 -> 28 (-, getEntityManager, 512),
    22 -> 33 (512, TransactionContextImpl, -),
    22 -> 10 (512, makePersistent', -),
    22 -> 34 (512, exceptionMakePersistent, -),
    22 -> 9 (512, close', -),
    23 -> 29 (-, getEntityManager, 512),
    23 -> 34 (-, getTransactionContext, 512),
    23 -> 4 (512, makePersistent', -),
    23 -> 11 (512, close', -),
    24 -> 18 (512, getEntityManager', -),
    24 -> 1 (512, getTransactionContext', -),
    24 -> 35 (-, makePersistent, 512),
    24 -> 36 (-, close, 512),
    25 -> 19 (512, getEntityManager', -),
    25 -> 35 (-, TransactionContextImpl', 512),
    25 -> 13 (512, makePersistent', -),
    25 -> 37 (512, exceptionMakePersistent, -),
    25 -> 38 (-, close, 512),
    26 -> 20 (512, getEntityManager', -),
    26 -> 36 (-, TransactionContextImpl', 512),
    26 -> 38 (-, makePersistent, 512),
    26 -> 13 (512, close', -),
    27 -> 21 (512, getEntityManager', -),
    27 -> 37 (512, TransactionContextImpl, -),
    27 -> 5 (512, makePersistent', -),
    27 -> 39 (-, close, 512),
    28 -> 22 (512, getEntityManager', -),
    28 -> 38 (512, TransactionContextImpl, -),
    28 -> 15 (512, makePersistent', -),
    28 -> 39 (512, exceptionMakePersistent, -),
    28 -> 14 (512, close', -),
    29 -> 23 (512, getEntityManager', -),
    29 -> 39 (-, getTransactionContext, 512),
    29 -> 7 (512, makePersistent', -),
    29 -> 16 (512, close', -),
    30 -> 35 (-, getEntityManager, 512),
    30 -> 3 (512, getTransactionContext', -),
    30 -> 18 (512, makePersistent', -),
    30 -> 40 (512, exceptionMakePersistent, -),
    30 -> 41 (-, close, 512),
    31 -> 36 (-, getEntityManager, 512),
    31 -> 4 (512, getTransactionContext', -),
    31 -> 41 (-, makePersistent, 512),
    31 -> 18 (512, close', -),
    32 -> 37 (-, getEntityManager, 512),
    32 -> 40 (-, TransactionContextImpl', 512),
    32 -> 8 (512, makePersistent', -),
    32 -> 42 (-, close, 512),
    33 -> 38 (-, getEntityManager, 512),
    33 -> 41 (-, TransactionContextImpl', 512),
    33 -> 20 (512, makePersistent', -),
    33 -> 42 (512, exceptionMakePersistent, -),
    33 -> 19 (512, close', -),
    34 -> 39 (-, getEntityManager, 512),
    34 -> 42 (512, TransactionContextImpl, -),
    34 -> 10 (512, makePersistent', -),
    34 -> 21 (512, close', -),
    35 -> 30 (512, getEntityManager', -),
    35 -> 6 (512, getTransactionContext', -),
    35 -> 24 (512, makePersistent', -),
    35 -> 43 (512, exceptionMakePersistent, -),
    35 -> 44 (-, close, 512),
    36 -> 31 (512, getEntityManager', -),
    36 -> 7 (512, getTransactionContext', -),
    36 -> 44 (-, makePersistent, 512),
    36 -> 24 (512, close', -),
    37 -> 32 (512, getEntityManager', -),
    37 -> 43 (-, TransactionContextImpl', 512),
    37 -> 13 (512, makePersistent', -),
    37 -> 45 (-, close, 512),
    38 -> 33 (512, getEntityManager', -),
    38 -> 44 (-, TransactionContextImpl', 512),
    38 -> 26 (512, makePersistent', -),
    38 -> 45 (512, exceptionMakePersistent, -),
    38 -> 25 (512, close', -),
    39 -> 34 (512, getEntityManager', -),
    39 -> 45 (512, TransactionContextImpl, -),
    39 -> 15 (512, makePersistent', -),
    39 -> 27 (512, close', -),
    40 -> 43 (-, getEntityManager, 512),
    40 -> 11 (512, getTransactionContext', -),
    40 -> 18 (512, makePersistent', -),
    40 -> 46 (-, close, 512),
    41 -> 44 (-, getEntityManager, 512),
    41 -> 12 (512, getTransactionContext', -),
    41 -> 31 (512, makePersistent', -),
    41 -> 46 (512, exceptionMakePersistent, -),
    41 -> 30 (512, close', -),
    42 -> 45 (-, getEntityManager, 512),
    42 -> 46 (-, TransactionContextImpl', 512),
    42 -> 20 (512, makePersistent', -),
    42 -> 32 (512, close', -),
    43 -> 40 (512, getEntityManager', -),
    43 -> 16 (512, getTransactionContext', -),
    43 -> 24 (512, makePersistent', -),
    43 -> 47 (-, close, 512),
    44 -> 41 (512, getEntityManager', -),
    44 -> 17 (512, getTransactionContext', -),
    44 -> 36 (512, makePersistent', -),
    44 -> 47 (512, exceptionMakePersistent, -),
    44 -> 35 (512, close', -),
    45 -> 42 (512, getEntityManager', -),
    45 -> 47 (-, TransactionContextImpl', 512),
    45 -> 26 (512, makePersistent', -),
    45 -> 37 (512, close', -),
    46 -> 47 (-, getEntityManager, 512),
    46 -> 23 (512, getTransactionContext', -),
    46 -> 31 (512, makePersistent', -),
    46 -> 40 (512, close', -),
    47 -> 46 (512, getEntityManager', -),
    47 -> 29 (512, getTransactionContext', -),
    47 -> 36 (512, makePersistent', -),
    47 -> 43 (512, close', -);
}


automaton TransactionContextImpl_2 (512) {
  state 00, 01, 02, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53;
  init 00;
  trans
	00 -> 01 (-, TransactionContextImpl, 512),
	01 -> 0 (512, TransactionContextImpl', -),
	0 -> 02 (-, TransactionContextImplD, 512),
	02 -> 00 (512, TransactionContextImplD', -),

    0 -> 1 (-, beginTransaction, 512),
    0 -> 2 (-, commit, 512),
    0 -> 3 (-, rollback, 512),
    0 -> 4 (-, isActive, 512),
    1 -> 0 (512, beginTransaction', -),
    1 -> 5 (-, commit, 512),
    1 -> 6 (-, rollback, 512),
    1 -> 7 (-, isActive, 512),
    2 -> 5 (-, beginTransaction, 512),
    2 -> 0 (512, commit', -),
    2 -> 8 (512, exceptionCommit, -),
    2 -> 9 (-, rollback, 512),
    2 -> 10 (-, isActive, 512),
    3 -> 6 (-, beginTransaction, 512),
    3 -> 9 (-, commit, 512),
    3 -> 0 (512, rollback', -),
    3 -> 11 (512, exceptionRollback, -),
    3 -> 12 (-, isActive, 512),
    4 -> 7 (-, beginTransaction, 512),
    4 -> 10 (-, commit, 512),
    4 -> 12 (-, rollback, 512),
    4 -> 0 (512, isActive', -),
    4 -> 13 (512, exceptionIsActive, -),
    5 -> 2 (512, beginTransaction', -),
    5 -> 1 (512, commit', -),
    5 -> 14 (512, exceptionCommit, -),
    5 -> 15 (-, rollback, 512),
    5 -> 16 (-, isActive, 512),
    6 -> 3 (512, beginTransaction', -),
    6 -> 15 (-, commit, 512),
    6 -> 1 (512, rollback', -),
    6 -> 17 (512, exceptionRollback, -),
    6 -> 18 (-, isActive, 512),
    7 -> 4 (512, beginTransaction', -),
    7 -> 16 (-, commit, 512),
    7 -> 18 (-, rollback, 512),
    7 -> 1 (512, isActive', -),
    7 -> 19 (512, exceptionIsActive, -),
    8 -> 14 (-, beginTransaction, 512),
    8 -> 0 (512, commit', -),
    8 -> 20 (-, rollback, 512),
    8 -> 21 (-, isActive, 512),
    9 -> 15 (-, beginTransaction, 512),
    9 -> 3 (512, commit', -),
    9 -> 20 (512, exceptionCommit, -),
    9 -> 2 (512, rollback', -),
    9 -> 22 (512, exceptionRollback, -),
    9 -> 23 (-, isActive, 512),
    10 -> 16 (-, beginTransaction, 512),
    10 -> 4 (512, commit', -),
    10 -> 21 (512, exceptionCommit, -),
    10 -> 23 (-, rollback, 512),
    10 -> 2 (512, isActive', -),
    10 -> 24 (512, exceptionIsActive, -),
    11 -> 17 (-, beginTransaction, 512),
    11 -> 22 (-, commit, 512),
    11 -> 0 (512, rollback', -),
    11 -> 25 (-, isActive, 512),
    12 -> 18 (-, beginTransaction, 512),
    12 -> 23 (-, commit, 512),
    12 -> 4 (512, rollback', -),
    12 -> 25 (512, exceptionRollback, -),
    12 -> 3 (512, isActive', -),
    12 -> 26 (512, exceptionIsActive, -),
    13 -> 19 (-, beginTransaction, 512),
    13 -> 24 (-, commit, 512),
    13 -> 26 (-, rollback, 512),
    13 -> 0 (512, isActive', -),
    14 -> 8 (512, beginTransaction', -),
    14 -> 1 (512, commit', -),
    14 -> 27 (-, rollback, 512),
    14 -> 28 (-, isActive, 512),
    15 -> 9 (512, beginTransaction', -),
    15 -> 6 (512, commit', -),
    15 -> 27 (512, exceptionCommit, -),
    15 -> 5 (512, rollback', -),
    15 -> 29 (512, exceptionRollback, -),
    15 -> 30 (-, isActive, 512),
    16 -> 10 (512, beginTransaction', -),
    16 -> 7 (512, commit', -),
    16 -> 28 (512, exceptionCommit, -),
    16 -> 30 (-, rollback, 512),
    16 -> 5 (512, isActive', -),
    16 -> 31 (512, exceptionIsActive, -),
    17 -> 11 (512, beginTransaction', -),
    17 -> 29 (-, commit, 512),
    17 -> 1 (512, rollback', -),
    17 -> 32 (-, isActive, 512),
    18 -> 12 (512, beginTransaction', -),
    18 -> 30 (-, commit, 512),
    18 -> 7 (512, rollback', -),
    18 -> 32 (512, exceptionRollback, -),
    18 -> 6 (512, isActive', -),
    18 -> 33 (512, exceptionIsActive, -),
    19 -> 13 (512, beginTransaction', -),
    19 -> 31 (-, commit, 512),
    19 -> 33 (-, rollback, 512),
    19 -> 1 (512, isActive', -),
    20 -> 27 (-, beginTransaction, 512),
    20 -> 3 (512, commit', -),
    20 -> 8 (512, rollback', -),
    20 -> 34 (512, exceptionRollback, -),
    20 -> 35 (-, isActive, 512),
    21 -> 28 (-, beginTransaction, 512),
    21 -> 4 (512, commit', -),
    21 -> 35 (-, rollback, 512),
    21 -> 8 (512, isActive', -),
    21 -> 36 (512, exceptionIsActive, -),
    22 -> 29 (-, beginTransaction, 512),
    22 -> 11 (512, commit', -),
    22 -> 34 (512, exceptionCommit, -),
    22 -> 2 (512, rollback', -),
    22 -> 37 (-, isActive, 512),
    23 -> 30 (-, beginTransaction, 512),
    23 -> 12 (512, commit', -),
    23 -> 35 (512, exceptionCommit, -),
    23 -> 10 (512, rollback', -),
    23 -> 37 (512, exceptionRollback, -),
    23 -> 9 (512, isActive', -),
    23 -> 38 (512, exceptionIsActive, -),
    24 -> 31 (-, beginTransaction, 512),
    24 -> 13 (512, commit', -),
    24 -> 36 (512, exceptionCommit, -),
    24 -> 38 (-, rollback, 512),
    24 -> 2 (512, isActive', -),
    25 -> 32 (-, beginTransaction, 512),
    25 -> 37 (-, commit, 512),
    25 -> 4 (512, rollback', -),
    25 -> 11 (512, isActive', -),
    25 -> 39 (512, exceptionIsActive, -),
    26 -> 33 (-, beginTransaction, 512),
    26 -> 38 (-, commit, 512),
    26 -> 13 (512, rollback', -),
    26 -> 39 (512, exceptionRollback, -),
    26 -> 3 (512, isActive', -),
    27 -> 20 (512, beginTransaction', -),
    27 -> 6 (512, commit', -),
    27 -> 14 (512, rollback', -),
    27 -> 40 (512, exceptionRollback, -),
    27 -> 41 (-, isActive, 512),
    28 -> 21 (512, beginTransaction', -),
    28 -> 7 (512, commit', -),
    28 -> 41 (-, rollback, 512),
    28 -> 14 (512, isActive', -),
    28 -> 42 (512, exceptionIsActive, -),
    29 -> 22 (512, beginTransaction', -),
    29 -> 17 (512, commit', -),
    29 -> 40 (512, exceptionCommit, -),
    29 -> 5 (512, rollback', -),
    29 -> 43 (-, isActive, 512),
    30 -> 23 (512, beginTransaction', -),
    30 -> 18 (512, commit', -),
    30 -> 41 (512, exceptionCommit, -),
    30 -> 16 (512, rollback', -),
    30 -> 43 (512, exceptionRollback, -),
    30 -> 15 (512, isActive', -),
    30 -> 44 (512, exceptionIsActive, -),
    31 -> 24 (512, beginTransaction', -),
    31 -> 19 (512, commit', -),
    31 -> 42 (512, exceptionCommit, -),
    31 -> 44 (-, rollback, 512),
    31 -> 5 (512, isActive', -),
    32 -> 25 (512, beginTransaction', -),
    32 -> 43 (-, commit, 512),
    32 -> 7 (512, rollback', -),
    32 -> 17 (512, isActive', -),
    32 -> 45 (512, exceptionIsActive, -),
    33 -> 26 (512, beginTransaction', -),
    33 -> 44 (-, commit, 512),
    33 -> 19 (512, rollback', -),
    33 -> 45 (512, exceptionRollback, -),
    33 -> 6 (512, isActive', -),
    34 -> 40 (-, beginTransaction, 512),
    34 -> 11 (512, commit', -),
    34 -> 8 (512, rollback', -),
    34 -> 46 (-, isActive, 512),
    35 -> 41 (-, beginTransaction, 512),
    35 -> 12 (512, commit', -),
    35 -> 21 (512, rollback', -),
    35 -> 46 (512, exceptionRollback, -),
    35 -> 20 (512, isActive', -),
    35 -> 47 (512, exceptionIsActive, -),
    36 -> 42 (-, beginTransaction, 512),
    36 -> 13 (512, commit', -),
    36 -> 47 (-, rollback, 512),
    36 -> 8 (512, isActive', -),
    37 -> 43 (-, beginTransaction, 512),
    37 -> 25 (512, commit', -),
    37 -> 46 (512, exceptionCommit, -),
    37 -> 10 (512, rollback', -),
    37 -> 22 (512, isActive', -),
    37 -> 48 (512, exceptionIsActive, -),
    38 -> 44 (-, beginTransaction, 512),
    38 -> 26 (512, commit', -),
    38 -> 47 (512, exceptionCommit, -),
    38 -> 24 (512, rollback', -),
    38 -> 48 (512, exceptionRollback, -),
    38 -> 9 (512, isActive', -),
    39 -> 45 (-, beginTransaction, 512),
    39 -> 48 (-, commit, 512),
    39 -> 13 (512, rollback', -),
    39 -> 11 (512, isActive', -),
    40 -> 34 (512, beginTransaction', -),
    40 -> 17 (512, commit', -),
    40 -> 14 (512, rollback', -),
    40 -> 49 (-, isActive, 512),
    41 -> 35 (512, beginTransaction', -),
    41 -> 18 (512, commit', -),
    41 -> 28 (512, rollback', -),
    41 -> 49 (512, exceptionRollback, -),
    41 -> 27 (512, isActive', -),
    41 -> 50 (512, exceptionIsActive, -),
    42 -> 36 (512, beginTransaction', -),
    42 -> 19 (512, commit', -),
    42 -> 50 (-, rollback, 512),
    42 -> 14 (512, isActive', -),
    43 -> 37 (512, beginTransaction', -),
    43 -> 32 (512, commit', -),
    43 -> 49 (512, exceptionCommit, -),
    43 -> 16 (512, rollback', -),
    43 -> 29 (512, isActive', -),
    43 -> 51 (512, exceptionIsActive, -),
    44 -> 38 (512, beginTransaction', -),
    44 -> 33 (512, commit', -),
    44 -> 50 (512, exceptionCommit, -),
    44 -> 31 (512, rollback', -),
    44 -> 51 (512, exceptionRollback, -),
    44 -> 15 (512, isActive', -),
    45 -> 39 (512, beginTransaction', -),
    45 -> 51 (-, commit, 512),
    45 -> 19 (512, rollback', -),
    45 -> 17 (512, isActive', -),
    46 -> 49 (-, beginTransaction, 512),
    46 -> 25 (512, commit', -),
    46 -> 21 (512, rollback', -),
    46 -> 34 (512, isActive', -),
    46 -> 52 (512, exceptionIsActive, -),
    47 -> 50 (-, beginTransaction, 512),
    47 -> 26 (512, commit', -),
    47 -> 36 (512, rollback', -),
    47 -> 52 (512, exceptionRollback, -),
    47 -> 20 (512, isActive', -),
    48 -> 51 (-, beginTransaction, 512),
    48 -> 39 (512, commit', -),
    48 -> 52 (512, exceptionCommit, -),
    48 -> 24 (512, rollback', -),
    48 -> 22 (512, isActive', -),
    49 -> 46 (512, beginTransaction', -),
    49 -> 32 (512, commit', -),
    49 -> 28 (512, rollback', -),
    49 -> 40 (512, isActive', -),
    49 -> 53 (512, exceptionIsActive, -),
    50 -> 47 (512, beginTransaction', -),
    50 -> 33 (512, commit', -),
    50 -> 42 (512, rollback', -),
    50 -> 53 (512, exceptionRollback, -),
    50 -> 27 (512, isActive', -),
    51 -> 48 (512, beginTransaction', -),
    51 -> 45 (512, commit', -),
    51 -> 53 (512, exceptionCommit, -),
    51 -> 31 (512, rollback', -),
    51 -> 29 (512, isActive', -),
    52 -> 53 (-, beginTransaction, 512),
    52 -> 39 (512, commit', -),
    52 -> 36 (512, rollback', -),
    52 -> 34 (512, isActive', -),
    53 -> 52 (512, beginTransaction', -),
    53 -> 45 (512, commit', -),
    53 -> 42 (512, rollback', -),
    53 -> 40 (512, isActive', -);
}


composite Persistence_2 {
	PersistenceImpl_2, PersistenceContextImpl_2, TransactionContextImpl_2;
	restrictL 
		// PersistenceImpl
		(512, PersistenceContextImpl, -), (-, PersistenceContextImpl', 512),

		// PersistenceContextImpl
		(-, PersistenceContextImpl, 512), (512, PersistenceContextImpl', -),
		(512, TransactionContextImpl, -), (-, TransactionContextImpl', 512), 

		// TransactionContextImpl
		(-, TransactionContextImpl, 512), (512, TransactionContextImpl', -);
}





			/********** Persistence for ProductDispatcher **********/


automaton PersistenceImpl_3 (513) {
	state 0, 1, 2, 3;
	init 0;
	trans 
		0 -> 1 (-, getPersistenceContext, 513),
		1 -> 2 (513, PersistenceContextImpl, -),
		2 -> 3 (-, PersistenceContextImpl', 513),
		3 -> 0 (513, getPersistenceContext', -);
}

automaton PersistenceContextImpl_3 (513) {
  state 00, 01, 02, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47;
  init 00;
  trans
	00 -> 01 (-, PersistenceContextImpl, 513),
	01 -> 0 (513, PersistenceContextImpl', -),
	0 -> 02 (-, PersistenceContextImplD, 513),
	02 -> 00 (513, PersistenceContextImplD', -),

    0 -> 1 (-, getEntityManager, 513),
    0 -> 2 (-, getTransactionContext, 513),
    0 -> 3 (-, makePersistent, 513),
    0 -> 4 (-, close, 513),
    1 -> 0 (513, getEntityManager', -),
    1 -> 5 (-, getTransactionContext, 513),
    1 -> 6 (-, makePersistent, 513),
    1 -> 7 (-, close, 513),
    2 -> 5 (-, getEntityManager, 513),
    2 -> 8 (513, TransactionContextImpl, -),
    2 -> 9 (-, makePersistent, 513),
    2 -> 10 (-, close, 513),
    3 -> 6 (-, getEntityManager, 513),
    3 -> 9 (-, getTransactionContext, 513),
    3 -> 0 (513, makePersistent', -),
    3 -> 11 (513, exceptionMakePersistent, -),
    3 -> 12 (-, close, 513),
    4 -> 7 (-, getEntityManager, 513),
    4 -> 10 (-, getTransactionContext, 513),
    4 -> 12 (-, makePersistent, 513),
    4 -> 0 (513, close', -),
    5 -> 2 (513, getEntityManager', -),
    5 -> 13 (513, TransactionContextImpl, -),
    5 -> 14 (-, makePersistent, 513),
    5 -> 15 (-, close, 513),
    6 -> 3 (513, getEntityManager', -),
    6 -> 14 (-, getTransactionContext, 513),
    6 -> 1 (513, makePersistent', -),
    6 -> 16 (513, exceptionMakePersistent, -),
    6 -> 17 (-, close, 513),
    7 -> 4 (513, getEntityManager', -),
    7 -> 15 (-, getTransactionContext, 513),
    7 -> 17 (-, makePersistent, 513),
    7 -> 1 (513, close', -),
    8 -> 13 (-, getEntityManager, 513),
    8 -> 18 (-, TransactionContextImpl', 513),
    8 -> 19 (-, makePersistent, 513),
    8 -> 20 (-, close, 513),
    9 -> 14 (-, getEntityManager, 513),
    9 -> 19 (513, TransactionContextImpl, -),
    9 -> 2 (513, makePersistent', -),
    9 -> 21 (513, exceptionMakePersistent, -),
    9 -> 22 (-, close, 513),
    10 -> 15 (-, getEntityManager, 513),
    10 -> 20 (513, TransactionContextImpl, -),
    10 -> 22 (-, makePersistent, 513),
    10 -> 2 (513, close', -),
    11 -> 16 (-, getEntityManager, 513),
    11 -> 21 (-, getTransactionContext, 513),
    11 -> 0 (513, makePersistent', -),
    11 -> 23 (-, close, 513),
    12 -> 17 (-, getEntityManager, 513),
    12 -> 22 (-, getTransactionContext, 513),
    12 -> 4 (513, makePersistent', -),
    12 -> 23 (513, exceptionMakePersistent, -),
    12 -> 3 (513, close', -),
    13 -> 8 (513, getEntityManager', -),
    13 -> 24 (-, TransactionContextImpl', 513),
    13 -> 25 (-, makePersistent, 513),
    13 -> 26 (-, close, 513),
    14 -> 9 (513, getEntityManager', -),
    14 -> 25 (513, TransactionContextImpl, -),
    14 -> 5 (513, makePersistent', -),
    14 -> 27 (513, exceptionMakePersistent, -),
    14 -> 28 (-, close, 513),
    15 -> 10 (513, getEntityManager', -),
    15 -> 26 (513, TransactionContextImpl, -),
    15 -> 28 (-, makePersistent, 513),
    15 -> 5 (513, close', -),
    16 -> 11 (513, getEntityManager', -),
    16 -> 27 (-, getTransactionContext, 513),
    16 -> 1 (513, makePersistent', -),
    16 -> 29 (-, close, 513),
    17 -> 12 (513, getEntityManager', -),
    17 -> 28 (-, getTransactionContext, 513),
    17 -> 7 (513, makePersistent', -),
    17 -> 29 (513, exceptionMakePersistent, -),
    17 -> 6 (513, close', -),
    18 -> 24 (-, getEntityManager, 513),
    18 -> 0 (513, getTransactionContext', -),
    18 -> 30 (-, makePersistent, 513),
    18 -> 31 (-, close, 513),
    19 -> 25 (-, getEntityManager, 513),
    19 -> 30 (-, TransactionContextImpl', 513),
    19 -> 8 (513, makePersistent', -),
    19 -> 32 (513, exceptionMakePersistent, -),
    19 -> 33 (-, close, 513),
    20 -> 26 (-, getEntityManager, 513),
    20 -> 31 (-, TransactionContextImpl', 513),
    20 -> 33 (-, makePersistent, 513),
    20 -> 8 (513, close', -),
    21 -> 27 (-, getEntityManager, 513),
    21 -> 32 (513, TransactionContextImpl, -),
    21 -> 2 (513, makePersistent', -),
    21 -> 34 (-, close, 513),
    22 -> 28 (-, getEntityManager, 513),
    22 -> 33 (513, TransactionContextImpl, -),
    22 -> 10 (513, makePersistent', -),
    22 -> 34 (513, exceptionMakePersistent, -),
    22 -> 9 (513, close', -),
    23 -> 29 (-, getEntityManager, 513),
    23 -> 34 (-, getTransactionContext, 513),
    23 -> 4 (513, makePersistent', -),
    23 -> 11 (513, close', -),
    24 -> 18 (513, getEntityManager', -),
    24 -> 1 (513, getTransactionContext', -),
    24 -> 35 (-, makePersistent, 513),
    24 -> 36 (-, close, 513),
    25 -> 19 (513, getEntityManager', -),
    25 -> 35 (-, TransactionContextImpl', 513),
    25 -> 13 (513, makePersistent', -),
    25 -> 37 (513, exceptionMakePersistent, -),
    25 -> 38 (-, close, 513),
    26 -> 20 (513, getEntityManager', -),
    26 -> 36 (-, TransactionContextImpl', 513),
    26 -> 38 (-, makePersistent, 513),
    26 -> 13 (513, close', -),
    27 -> 21 (513, getEntityManager', -),
    27 -> 37 (513, TransactionContextImpl, -),
    27 -> 5 (513, makePersistent', -),
    27 -> 39 (-, close, 513),
    28 -> 22 (513, getEntityManager', -),
    28 -> 38 (513, TransactionContextImpl, -),
    28 -> 15 (513, makePersistent', -),
    28 -> 39 (513, exceptionMakePersistent, -),
    28 -> 14 (513, close', -),
    29 -> 23 (513, getEntityManager', -),
    29 -> 39 (-, getTransactionContext, 513),
    29 -> 7 (513, makePersistent', -),
    29 -> 16 (513, close', -),
    30 -> 35 (-, getEntityManager, 513),
    30 -> 3 (513, getTransactionContext', -),
    30 -> 18 (513, makePersistent', -),
    30 -> 40 (513, exceptionMakePersistent, -),
    30 -> 41 (-, close, 513),
    31 -> 36 (-, getEntityManager, 513),
    31 -> 4 (513, getTransactionContext', -),
    31 -> 41 (-, makePersistent, 513),
    31 -> 18 (513, close', -),
    32 -> 37 (-, getEntityManager, 513),
    32 -> 40 (-, TransactionContextImpl', 513),
    32 -> 8 (513, makePersistent', -),
    32 -> 42 (-, close, 513),
    33 -> 38 (-, getEntityManager, 513),
    33 -> 41 (-, TransactionContextImpl', 513),
    33 -> 20 (513, makePersistent', -),
    33 -> 42 (513, exceptionMakePersistent, -),
    33 -> 19 (513, close', -),
    34 -> 39 (-, getEntityManager, 513),
    34 -> 42 (513, TransactionContextImpl, -),
    34 -> 10 (513, makePersistent', -),
    34 -> 21 (513, close', -),
    35 -> 30 (513, getEntityManager', -),
    35 -> 6 (513, getTransactionContext', -),
    35 -> 24 (513, makePersistent', -),
    35 -> 43 (513, exceptionMakePersistent, -),
    35 -> 44 (-, close, 513),
    36 -> 31 (513, getEntityManager', -),
    36 -> 7 (513, getTransactionContext', -),
    36 -> 44 (-, makePersistent, 513),
    36 -> 24 (513, close', -),
    37 -> 32 (513, getEntityManager', -),
    37 -> 43 (-, TransactionContextImpl', 513),
    37 -> 13 (513, makePersistent', -),
    37 -> 45 (-, close, 513),
    38 -> 33 (513, getEntityManager', -),
    38 -> 44 (-, TransactionContextImpl', 513),
    38 -> 26 (513, makePersistent', -),
    38 -> 45 (513, exceptionMakePersistent, -),
    38 -> 25 (513, close', -),
    39 -> 34 (513, getEntityManager', -),
    39 -> 45 (513, TransactionContextImpl, -),
    39 -> 15 (513, makePersistent', -),
    39 -> 27 (513, close', -),
    40 -> 43 (-, getEntityManager, 513),
    40 -> 11 (513, getTransactionContext', -),
    40 -> 18 (513, makePersistent', -),
    40 -> 46 (-, close, 513),
    41 -> 44 (-, getEntityManager, 513),
    41 -> 12 (513, getTransactionContext', -),
    41 -> 31 (513, makePersistent', -),
    41 -> 46 (513, exceptionMakePersistent, -),
    41 -> 30 (513, close', -),
    42 -> 45 (-, getEntityManager, 513),
    42 -> 46 (-, TransactionContextImpl', 513),
    42 -> 20 (513, makePersistent', -),
    42 -> 32 (513, close', -),
    43 -> 40 (513, getEntityManager', -),
    43 -> 16 (513, getTransactionContext', -),
    43 -> 24 (513, makePersistent', -),
    43 -> 47 (-, close, 513),
    44 -> 41 (513, getEntityManager', -),
    44 -> 17 (513, getTransactionContext', -),
    44 -> 36 (513, makePersistent', -),
    44 -> 47 (513, exceptionMakePersistent, -),
    44 -> 35 (513, close', -),
    45 -> 42 (513, getEntityManager', -),
    45 -> 47 (-, TransactionContextImpl', 513),
    45 -> 26 (513, makePersistent', -),
    45 -> 37 (513, close', -),
    46 -> 47 (-, getEntityManager, 513),
    46 -> 23 (513, getTransactionContext', -),
    46 -> 31 (513, makePersistent', -),
    46 -> 40 (513, close', -),
    47 -> 46 (513, getEntityManager', -),
    47 -> 29 (513, getTransactionContext', -),
    47 -> 36 (513, makePersistent', -),
    47 -> 43 (513, close', -);
}


automaton TransactionContextImpl_3 (513) {
  state 00, 01, 02, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53;
  init 00;
  trans
	00 -> 01 (-, TransactionContextImpl, 513),
	01 -> 0 (513, TransactionContextImpl', -),
	0 -> 02 (-, TransactionContextImplD, 513),
	02 -> 00 (513, TransactionContextImplD', -),

    0 -> 1 (-, beginTransaction, 513),
    0 -> 2 (-, commit, 513),
    0 -> 3 (-, rollback, 513),
    0 -> 4 (-, isActive, 513),
    1 -> 0 (513, beginTransaction', -),
    1 -> 5 (-, commit, 513),
    1 -> 6 (-, rollback, 513),
    1 -> 7 (-, isActive, 513),
    2 -> 5 (-, beginTransaction, 513),
    2 -> 0 (513, commit', -),
    2 -> 8 (513, exceptionCommit, -),
    2 -> 9 (-, rollback, 513),
    2 -> 10 (-, isActive, 513),
    3 -> 6 (-, beginTransaction, 513),
    3 -> 9 (-, commit, 513),
    3 -> 0 (513, rollback', -),
    3 -> 11 (513, exceptionRollback, -),
    3 -> 12 (-, isActive, 513),
    4 -> 7 (-, beginTransaction, 513),
    4 -> 10 (-, commit, 513),
    4 -> 12 (-, rollback, 513),
    4 -> 0 (513, isActive', -),
    4 -> 13 (513, exceptionIsActive, -),
    5 -> 2 (513, beginTransaction', -),
    5 -> 1 (513, commit', -),
    5 -> 14 (513, exceptionCommit, -),
    5 -> 15 (-, rollback, 513),
    5 -> 16 (-, isActive, 513),
    6 -> 3 (513, beginTransaction', -),
    6 -> 15 (-, commit, 513),
    6 -> 1 (513, rollback', -),
    6 -> 17 (513, exceptionRollback, -),
    6 -> 18 (-, isActive, 513),
    7 -> 4 (513, beginTransaction', -),
    7 -> 16 (-, commit, 513),
    7 -> 18 (-, rollback, 513),
    7 -> 1 (513, isActive', -),
    7 -> 19 (513, exceptionIsActive, -),
    8 -> 14 (-, beginTransaction, 513),
    8 -> 0 (513, commit', -),
    8 -> 20 (-, rollback, 513),
    8 -> 21 (-, isActive, 513),
    9 -> 15 (-, beginTransaction, 513),
    9 -> 3 (513, commit', -),
    9 -> 20 (513, exceptionCommit, -),
    9 -> 2 (513, rollback', -),
    9 -> 22 (513, exceptionRollback, -),
    9 -> 23 (-, isActive, 513),
    10 -> 16 (-, beginTransaction, 513),
    10 -> 4 (513, commit', -),
    10 -> 21 (513, exceptionCommit, -),
    10 -> 23 (-, rollback, 513),
    10 -> 2 (513, isActive', -),
    10 -> 24 (513, exceptionIsActive, -),
    11 -> 17 (-, beginTransaction, 513),
    11 -> 22 (-, commit, 513),
    11 -> 0 (513, rollback', -),
    11 -> 25 (-, isActive, 513),
    12 -> 18 (-, beginTransaction, 513),
    12 -> 23 (-, commit, 513),
    12 -> 4 (513, rollback', -),
    12 -> 25 (513, exceptionRollback, -),
    12 -> 3 (513, isActive', -),
    12 -> 26 (513, exceptionIsActive, -),
    13 -> 19 (-, beginTransaction, 513),
    13 -> 24 (-, commit, 513),
    13 -> 26 (-, rollback, 513),
    13 -> 0 (513, isActive', -),
    14 -> 8 (513, beginTransaction', -),
    14 -> 1 (513, commit', -),
    14 -> 27 (-, rollback, 513),
    14 -> 28 (-, isActive, 513),
    15 -> 9 (513, beginTransaction', -),
    15 -> 6 (513, commit', -),
    15 -> 27 (513, exceptionCommit, -),
    15 -> 5 (513, rollback', -),
    15 -> 29 (513, exceptionRollback, -),
    15 -> 30 (-, isActive, 513),
    16 -> 10 (513, beginTransaction', -),
    16 -> 7 (513, commit', -),
    16 -> 28 (513, exceptionCommit, -),
    16 -> 30 (-, rollback, 513),
    16 -> 5 (513, isActive', -),
    16 -> 31 (513, exceptionIsActive, -),
    17 -> 11 (513, beginTransaction', -),
    17 -> 29 (-, commit, 513),
    17 -> 1 (513, rollback', -),
    17 -> 32 (-, isActive, 513),
    18 -> 12 (513, beginTransaction', -),
    18 -> 30 (-, commit, 513),
    18 -> 7 (513, rollback', -),
    18 -> 32 (513, exceptionRollback, -),
    18 -> 6 (513, isActive', -),
    18 -> 33 (513, exceptionIsActive, -),
    19 -> 13 (513, beginTransaction', -),
    19 -> 31 (-, commit, 513),
    19 -> 33 (-, rollback, 513),
    19 -> 1 (513, isActive', -),
    20 -> 27 (-, beginTransaction, 513),
    20 -> 3 (513, commit', -),
    20 -> 8 (513, rollback', -),
    20 -> 34 (513, exceptionRollback, -),
    20 -> 35 (-, isActive, 513),
    21 -> 28 (-, beginTransaction, 513),
    21 -> 4 (513, commit', -),
    21 -> 35 (-, rollback, 513),
    21 -> 8 (513, isActive', -),
    21 -> 36 (513, exceptionIsActive, -),
    22 -> 29 (-, beginTransaction, 513),
    22 -> 11 (513, commit', -),
    22 -> 34 (513, exceptionCommit, -),
    22 -> 2 (513, rollback', -),
    22 -> 37 (-, isActive, 513),
    23 -> 30 (-, beginTransaction, 513),
    23 -> 12 (513, commit', -),
    23 -> 35 (513, exceptionCommit, -),
    23 -> 10 (513, rollback', -),
    23 -> 37 (513, exceptionRollback, -),
    23 -> 9 (513, isActive', -),
    23 -> 38 (513, exceptionIsActive, -),
    24 -> 31 (-, beginTransaction, 513),
    24 -> 13 (513, commit', -),
    24 -> 36 (513, exceptionCommit, -),
    24 -> 38 (-, rollback, 513),
    24 -> 2 (513, isActive', -),
    25 -> 32 (-, beginTransaction, 513),
    25 -> 37 (-, commit, 513),
    25 -> 4 (513, rollback', -),
    25 -> 11 (513, isActive', -),
    25 -> 39 (513, exceptionIsActive, -),
    26 -> 33 (-, beginTransaction, 513),
    26 -> 38 (-, commit, 513),
    26 -> 13 (513, rollback', -),
    26 -> 39 (513, exceptionRollback, -),
    26 -> 3 (513, isActive', -),
    27 -> 20 (513, beginTransaction', -),
    27 -> 6 (513, commit', -),
    27 -> 14 (513, rollback', -),
    27 -> 40 (513, exceptionRollback, -),
    27 -> 41 (-, isActive, 513),
    28 -> 21 (513, beginTransaction', -),
    28 -> 7 (513, commit', -),
    28 -> 41 (-, rollback, 513),
    28 -> 14 (513, isActive', -),
    28 -> 42 (513, exceptionIsActive, -),
    29 -> 22 (513, beginTransaction', -),
    29 -> 17 (513, commit', -),
    29 -> 40 (513, exceptionCommit, -),
    29 -> 5 (513, rollback', -),
    29 -> 43 (-, isActive, 513),
    30 -> 23 (513, beginTransaction', -),
    30 -> 18 (513, commit', -),
    30 -> 41 (513, exceptionCommit, -),
    30 -> 16 (513, rollback', -),
    30 -> 43 (513, exceptionRollback, -),
    30 -> 15 (513, isActive', -),
    30 -> 44 (513, exceptionIsActive, -),
    31 -> 24 (513, beginTransaction', -),
    31 -> 19 (513, commit', -),
    31 -> 42 (513, exceptionCommit, -),
    31 -> 44 (-, rollback, 513),
    31 -> 5 (513, isActive', -),
    32 -> 25 (513, beginTransaction', -),
    32 -> 43 (-, commit, 513),
    32 -> 7 (513, rollback', -),
    32 -> 17 (513, isActive', -),
    32 -> 45 (513, exceptionIsActive, -),
    33 -> 26 (513, beginTransaction', -),
    33 -> 44 (-, commit, 513),
    33 -> 19 (513, rollback', -),
    33 -> 45 (513, exceptionRollback, -),
    33 -> 6 (513, isActive', -),
    34 -> 40 (-, beginTransaction, 513),
    34 -> 11 (513, commit', -),
    34 -> 8 (513, rollback', -),
    34 -> 46 (-, isActive, 513),
    35 -> 41 (-, beginTransaction, 513),
    35 -> 12 (513, commit', -),
    35 -> 21 (513, rollback', -),
    35 -> 46 (513, exceptionRollback, -),
    35 -> 20 (513, isActive', -),
    35 -> 47 (513, exceptionIsActive, -),
    36 -> 42 (-, beginTransaction, 513),
    36 -> 13 (513, commit', -),
    36 -> 47 (-, rollback, 513),
    36 -> 8 (513, isActive', -),
    37 -> 43 (-, beginTransaction, 513),
    37 -> 25 (513, commit', -),
    37 -> 46 (513, exceptionCommit, -),
    37 -> 10 (513, rollback', -),
    37 -> 22 (513, isActive', -),
    37 -> 48 (513, exceptionIsActive, -),
    38 -> 44 (-, beginTransaction, 513),
    38 -> 26 (513, commit', -),
    38 -> 47 (513, exceptionCommit, -),
    38 -> 24 (513, rollback', -),
    38 -> 48 (513, exceptionRollback, -),
    38 -> 9 (513, isActive', -),
    39 -> 45 (-, beginTransaction, 513),
    39 -> 48 (-, commit, 513),
    39 -> 13 (513, rollback', -),
    39 -> 11 (513, isActive', -),
    40 -> 34 (513, beginTransaction', -),
    40 -> 17 (513, commit', -),
    40 -> 14 (513, rollback', -),
    40 -> 49 (-, isActive, 513),
    41 -> 35 (513, beginTransaction', -),
    41 -> 18 (513, commit', -),
    41 -> 28 (513, rollback', -),
    41 -> 49 (513, exceptionRollback, -),
    41 -> 27 (513, isActive', -),
    41 -> 50 (513, exceptionIsActive, -),
    42 -> 36 (513, beginTransaction', -),
    42 -> 19 (513, commit', -),
    42 -> 50 (-, rollback, 513),
    42 -> 14 (513, isActive', -),
    43 -> 37 (513, beginTransaction', -),
    43 -> 32 (513, commit', -),
    43 -> 49 (513, exceptionCommit, -),
    43 -> 16 (513, rollback', -),
    43 -> 29 (513, isActive', -),
    43 -> 51 (513, exceptionIsActive, -),
    44 -> 38 (513, beginTransaction', -),
    44 -> 33 (513, commit', -),
    44 -> 50 (513, exceptionCommit, -),
    44 -> 31 (513, rollback', -),
    44 -> 51 (513, exceptionRollback, -),
    44 -> 15 (513, isActive', -),
    45 -> 39 (513, beginTransaction', -),
    45 -> 51 (-, commit, 513),
    45 -> 19 (513, rollback', -),
    45 -> 17 (513, isActive', -),
    46 -> 49 (-, beginTransaction, 513),
    46 -> 25 (513, commit', -),
    46 -> 21 (513, rollback', -),
    46 -> 34 (513, isActive', -),
    46 -> 52 (513, exceptionIsActive, -),
    47 -> 50 (-, beginTransaction, 513),
    47 -> 26 (513, commit', -),
    47 -> 36 (513, rollback', -),
    47 -> 52 (513, exceptionRollback, -),
    47 -> 20 (513, isActive', -),
    48 -> 51 (-, beginTransaction, 513),
    48 -> 39 (513, commit', -),
    48 -> 52 (513, exceptionCommit, -),
    48 -> 24 (513, rollback', -),
    48 -> 22 (513, isActive', -),
    49 -> 46 (513, beginTransaction', -),
    49 -> 32 (513, commit', -),
    49 -> 28 (513, rollback', -),
    49 -> 40 (513, isActive', -),
    49 -> 53 (513, exceptionIsActive, -),
    50 -> 47 (513, beginTransaction', -),
    50 -> 33 (513, commit', -),
    50 -> 42 (513, rollback', -),
    50 -> 53 (513, exceptionRollback, -),
    50 -> 27 (513, isActive', -),
    51 -> 48 (513, beginTransaction', -),
    51 -> 45 (513, commit', -),
    51 -> 53 (513, exceptionCommit, -),
    51 -> 31 (513, rollback', -),
    51 -> 29 (513, isActive', -),
    52 -> 53 (-, beginTransaction, 513),
    52 -> 39 (513, commit', -),
    52 -> 36 (513, rollback', -),
    52 -> 34 (513, isActive', -),
    53 -> 52 (513, beginTransaction', -),
    53 -> 45 (513, commit', -),
    53 -> 42 (513, rollback', -),
    53 -> 40 (513, isActive', -);
}


composite Persistence_3 {
	PersistenceImpl_3, PersistenceContextImpl_3, TransactionContextImpl_3;
	restrictL 
		// PersistenceImpl
		(513, PersistenceContextImpl, -), (-, PersistenceContextImpl', 513),

		// PersistenceContextImpl
		(-, PersistenceContextImpl, 513), (513, PersistenceContextImpl', -),
		(513, TransactionContextImpl, -), (-, TransactionContextImpl', 513), 

		// TransactionContextImpl
		(-, TransactionContextImpl, 513), (513, TransactionContextImpl', -);
}





			/********** Store for StoreApplication **********/


automaton queryLowStockItems_1 (521) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, queryLowStockItems, 521),
		1 -> 2 (521, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 521),
		3 -> 0 (521, queryLowStockItems', -),		// could finish here if the exception never happens
		3 -> 4 (521, exceptionQueryLowStockItems, -),
		4 -> 0 (521, queryLowStockItems', -);
}

automaton queryAllStockItems_1 (521) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, queryAllStockItems, 521),
		1 -> 2 (521, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 521),
		3 -> 0 (521, queryAllStockItems', -),
		3 -> 4 (521, exceptionQueryAllStockItems, -),
		4 -> 0 (521, queryAllStockItems', -);
}

automaton queryOrderById_1 (521) {
	state 0, 1, 2, 3;
	init 0;
	trans 
		0 -> 1 (-, queryOrderById, 521),
		1 -> 2 (521, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 521),
		3 -> 0 (521, queryOrderById', -);
}

automaton queryStoreById_1 (521) {
	state 0, 1, 2, 3;
	init 0;
	trans 
		0 -> 1 (-, queryStoreById, 521),
		1 -> 2 (521, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 521),
		3 -> 0 (521, queryStoreById', -);
}

automaton queryProducts_1 (521) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, queryProducts, 521),
		1 -> 2 (521, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 521),
		3 -> 0 (521, queryProducts', -),
		3 -> 4 (521, exceptionQueryProducts, -),
		4 -> 0 (521, queryProducts', -);
}

automaton queryStockItem_1 (521) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, queryStockItem, 521),
		1 -> 2 (521, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 521),
		3 -> 0 (521, queryStockItem', -),
		3 -> 4 (521, exceptionQueryStockItem, -),
		4 -> 0 (521, queryStockItem', -);
}

automaton queryStockItemById_1 (521) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, queryStockItemById, 521),
		1 -> 2 (521, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 521),
		3 -> 0 (521, queryStockItemById', -),
		3 -> 4 (521, exceptionQueryStockItemById, -),
		4 -> 0 (521, queryStockItemById', -);
}

automaton queryProductById_1 (521) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, queryProductById, 521),
		1 -> 2 (521, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 521),
		3 -> 0 (521, queryProductById', -),
		3 -> 4 (521, exceptionQueryProductById, -),
		4 -> 0 (521, queryProductById', -);
}

automaton queryStockItems_1 (521) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, queryStockItems, 521),
		1 -> 2 (521, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 521),
		3 -> 0 (521, queryStockItems', -),
		3 -> 4 (521, exceptionQueryStockItems, -),
		4 -> 0 (521, queryStockItems', -);
}

composite Store_1 {
	queryLowStockItems_1, queryAllStockItems_1, queryOrderById_1, queryStoreById_1, queryProducts_1, queryStockItem_1, queryStockItemById_1, queryProductById_1, queryStockItems_1;
}





			/********** Store for ReportingApplication **********/


automaton queryLowStockItems_2 (522) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, queryLowStockItems, 522),
		1 -> 2 (522, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 522),
		3 -> 0 (522, queryLowStockItems', -),		// could finish here if the exception never happens
		3 -> 4 (522, exceptionQueryLowStockItems, -),
		4 -> 0 (522, queryLowStockItems', -);
}

automaton queryAllStockItems_2 (522) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, queryAllStockItems, 522),
		1 -> 2 (522, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 522),
		3 -> 0 (522, queryAllStockItems', -),
		3 -> 4 (522, exceptionQueryAllStockItems, -),
		4 -> 0 (522, queryAllStockItems', -);
}

automaton queryOrderById_2 (522) {
	state 0, 1, 2, 3;
	init 0;
	trans 
		0 -> 1 (-, queryOrderById, 522),
		1 -> 2 (522, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 522),
		3 -> 0 (522, queryOrderById', -);
}

automaton queryStoreById_2 (522) {
	state 0, 1, 2, 3;
	init 0;
	trans 
		0 -> 1 (-, queryStoreById, 522),
		1 -> 2 (522, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 522),
		3 -> 0 (522, queryStoreById', -);
}

automaton queryProducts_2 (522) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, queryProducts, 522),
		1 -> 2 (522, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 522),
		3 -> 0 (522, queryProducts', -),
		3 -> 4 (522, exceptionQueryProducts, -),
		4 -> 0 (522, queryProducts', -);
}

automaton queryStockItem_2 (522) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, queryStockItem, 522),
		1 -> 2 (522, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 522),
		3 -> 0 (522, queryStockItem', -),
		3 -> 4 (522, exceptionQueryStockItem, -),
		4 -> 0 (522, queryStockItem', -);
}

automaton queryStockItemById_2 (522) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, queryStockItemById, 522),
		1 -> 2 (522, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 522),
		3 -> 0 (522, queryStockItemById', -),
		3 -> 4 (522, exceptionQueryStockItemById, -),
		4 -> 0 (522, queryStockItemById', -);
}

automaton queryProductById_2 (522) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, queryProductById, 522),
		1 -> 2 (522, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 522),
		3 -> 0 (522, queryProductById', -),
		3 -> 4 (522, exceptionQueryProductById, -),
		4 -> 0 (522, queryProductById', -);
}

automaton queryStockItems_2 (522) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, queryStockItems, 522),
		1 -> 2 (522, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 522),
		3 -> 0 (522, queryStockItems', -),
		3 -> 4 (522, exceptionQueryStockItems, -),
		4 -> 0 (522, queryStockItems', -);
}

composite Store_2 {
	queryLowStockItems_2, queryAllStockItems_2, queryOrderById_2, queryStoreById_2, queryProducts_2, queryStockItem_2, queryStockItemById_2, queryProductById_2, queryStockItems_2;
}





			/********** Store for ReportingApplication **********/


automaton queryLowStockItems_3 (523) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, queryLowStockItems, 523),
		1 -> 2 (523, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 523),
		3 -> 0 (523, queryLowStockItems', -),		// could finish here if the exception never happens
		3 -> 4 (523, exceptionQueryLowStockItems, -),
		4 -> 0 (523, queryLowStockItems', -);
}

automaton queryAllStockItems_3 (523) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, queryAllStockItems, 523),
		1 -> 2 (523, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 523),
		3 -> 0 (523, queryAllStockItems', -),
		3 -> 4 (523, exceptionQueryAllStockItems, -),
		4 -> 0 (523, queryAllStockItems', -);
}

automaton queryOrderById_3 (523) {
	state 0, 1, 2, 3;
	init 0;
	trans 
		0 -> 1 (-, queryOrderById, 523),
		1 -> 2 (523, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 523),
		3 -> 0 (523, queryOrderById', -);
}

automaton queryStoreById_3 (523) {
	state 0, 1, 2, 3;
	init 0;
	trans 
		0 -> 1 (-, queryStoreById, 523),
		1 -> 2 (523, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 523),
		3 -> 0 (523, queryStoreById', -);
}

automaton queryProducts_3 (523) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, queryProducts, 523),
		1 -> 2 (523, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 523),
		3 -> 0 (523, queryProducts', -),
		3 -> 4 (523, exceptionQueryProducts, -),
		4 -> 0 (523, queryProducts', -);
}

automaton queryStockItem_3 (523) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, queryStockItem, 523),
		1 -> 2 (523, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 523),
		3 -> 0 (523, queryStockItem', -),
		3 -> 4 (523, exceptionQueryStockItem, -),
		4 -> 0 (523, queryStockItem', -);
}

automaton queryStockItemById_3 (523) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, queryStockItemById, 523),
		1 -> 2 (523, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 523),
		3 -> 0 (523, queryStockItemById', -),
		3 -> 4 (523, exceptionQueryStockItemById, -),
		4 -> 0 (523, queryStockItemById', -);
}

automaton queryProductById_3 (523) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, queryProductById, 523),
		1 -> 2 (523, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 523),
		3 -> 0 (523, queryProductById', -),
		3 -> 4 (523, exceptionQueryProductById, -),
		4 -> 0 (523, queryProductById', -);
}

automaton queryStockItems_3 (523) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, queryStockItems, 523),
		1 -> 2 (523, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 523),
		3 -> 0 (523, queryStockItems', -),
		3 -> 4 (523, exceptionQueryStockItems, -),
		4 -> 0 (523, queryStockItems', -);
}

composite Store_3 {
	queryLowStockItems_3, queryAllStockItems_3, queryOrderById_3, queryStoreById_3, queryProducts_3, queryStockItem_3, queryStockItemById_3, queryProductById_3, queryStockItems_3;
}




			/********** Enterprise for StoreApplication **********/


automaton queryEnterpriseById_1 (531) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, queryEnterpriseById, 531),
		1 -> 2 (531, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 531),
		3 -> 0 (531, queryEnterpriseById', -),
		3 -> 4 (531, exceptionQueryEnterpriseById, -),
		4 -> 0 (531, queryEnterpriseById', -);
}

automaton getMeanTimeToDelivery_1 (531) {
	state 0, 1, 2, 3;
	init 0;
	trans 
		0 -> 1 (-, getMeanTimeToDelivery, 531),
		1 -> 2 (531, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 531),
		3 -> 0 (531, getMeanTimeToDelivery', -);
}

composite Enterprise_1 {
	queryEnterpriseById_1, getMeanTimeToDelivery_1;
}





			/********** Enterprise for ReportingApplication **********/


automaton queryEnterpriseById_2 (532) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, queryEnterpriseById, 532),
		1 -> 2 (532, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 532),
		3 -> 0 (532, queryEnterpriseById', -),
		3 -> 4 (532, exceptionQueryEnterpriseById, -),
		4 -> 0 (532, queryEnterpriseById', -);
}

automaton getMeanTimeToDelivery_2 (532) {
	state 0, 1, 2, 3;
	init 0;
	trans 
		0 -> 1 (-, getMeanTimeToDelivery, 532),
		1 -> 2 (532, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 532),
		3 -> 0 (532, getMeanTimeToDelivery', -);
}

composite Enterprise_2 {
	queryEnterpriseById_2, getMeanTimeToDelivery_2;
}





			/********** Enterprise for ReportingApplication **********/


automaton queryEnterpriseById_3 (533) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, queryEnterpriseById, 533),
		1 -> 2 (533, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 533),
		3 -> 0 (533, queryEnterpriseById', -),
		3 -> 4 (533, exceptionQueryEnterpriseById, -),
		4 -> 0 (533, queryEnterpriseById', -);
}

automaton getMeanTimeToDelivery_3 (533) {
	state 0, 1, 2, 3;
	init 0;
	trans 
		0 -> 1 (-, getMeanTimeToDelivery, 533),
		1 -> 2 (533, getEntityManager, -),
		2 -> 3 (-, getEntityManager', 533),
		3 -> 0 (533, getMeanTimeToDelivery', -);
}

composite Enterprise_3 {
	queryEnterpriseById_3, getMeanTimeToDelivery_3;
}





		/********** Data **********/


composite Data {
	Store_1, Store_2, Store_3, Enterprise_1, Enterprise_2, Enterprise_3, Persistence_1, Persistence_2, Persistence_3;
	restrictL 
		// Persistence, Store, Enterprise - 1
		(-, getEntityManager, 511), (511, getEntityManager', -),
		(521, getEntityManager, -), (-, getEntityManager', 521),
		(531, getEntityManager, -), (-, getEntityManager', 531), 

		(521, getEntityManager, 512), (512, getEntityManager', 521),  // cross-synchronization that is not allowed by bindings
		(531, getEntityManager, 512), (512, getEntityManager', 531), 
		(521, getEntityManager, 513), (513, getEntityManager', 521),
		(531, getEntityManager, 513), (513, getEntityManager', 531), 
		
		// Persistence, Store, Enterprise - 2
		(-, getEntityManager, 512), (512, getEntityManager', -),
		(522, getEntityManager, -), (-, getEntityManager', 522),
		(532, getEntityManager, -), (-, getEntityManager', 532),

		(522, getEntityManager, 511), (511, getEntityManager', 522),
		(532, getEntityManager, 511), (511, getEntityManager', 532),
		(522, getEntityManager, 513), (513, getEntityManager', 522),
		(532, getEntityManager, 513), (513, getEntityManager', 532),

		// Persistence, Store, Enterprise - 3
		(-, getEntityManager, 513), (513, getEntityManager', -),
		(523, getEntityManager, -), (-, getEntityManager', 523),
		(533, getEntityManager, -), (-, getEntityManager', 533),

		(523, getEntityManager, 511), (511, getEntityManager', 523),
		(533, getEntityManager, 511), (511, getEntityManager', 533),
		(523, getEntityManager, 512), (512, getEntityManager', 523),
		(533, getEntityManager, 512), (512, getEntityManager', 533);
}





		/********** Application begin **********/


			/********** StoreApplication **********/


automaton changePrice (610) {
	state 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35;
	init 00;
	trans 
		00 -> 01 (-, changePrice, 610),
		01 -> 02 (610, getPersistenceContext, -), 
		02 -> 03 (-, getPersistenceContext', 610),
		03 -> 04 (610, getTransactionContext, -), 
		04 -> 05 (-, getTransactionContext', 610),
		05 -> 06 (610, beginTransaction, -), 
		06 -> 07 (-, beginTransaction', 610),
		07 -> 08 (610, queryStockItemById, -), 
		08 -> 09 (-, queryStockItemById', 610),
		09 -> 10 (610, commit, -), 
		10 -> 11 (-, commit', 610),
		11 -> 12 (610, close, -), 
		12 -> 13 (-, close', 610),
		13 -> 14 (610, TransactionContextImplD, -), 
		14 -> 15 (-, TransactionContextImplD', 610),
		15 -> 16 (610, PersistenceContextImplD, -), 
		16 -> 17 (-, PersistenceContextImplD', 610),
		17 -> 00 (610, changePrice', -),
		
		08 -> 18 (-, exceptionQueryStockItemById, 610), 
		18 -> 20 (-, queryStockItemById', 610),

		10 -> 19 (-, exceptionCommit, 610), 
		19 -> 20 (-, commit', 610),

		20 -> 21 (610, isActive, -), 
		21 -> 22 (-, isActive', 610),
		22 -> 25 (610, exceptionChangePrice, -),
		22 -> 23 (610, rollback, -), 
		23 -> 24 (-, rollback', 610),
		24 -> 25 (610, exceptionChangePrice, -),
		25 -> 26 (610, close, -), 
		26 -> 27 (-, close', 610),
		27 -> 28 (610, TransactionContextImplD, -), 
		28 -> 29 (-, TransactionContextImplD', 610),
		29 -> 30 (610, PersistenceContextImplD, -), 
		30 -> 31 (-, PersistenceContextImplD', 610),
		31 -> 00 (610, changePrice', -),

		21 -> 32 (-, exceptionIsActive, 610),
		32 -> 33 (610, exceptionChangePrice, -),
		33 -> 25 (-, isActive', 610),

		23 -> 34 (-, exceptionRollback, 610),
		34 -> 35 (610, exceptionChangePrice, -),
		35 -> 25 (-, rollback', 610);
}


automaton getAllProducts (610) {
	state 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35;
	init 00;
	trans 
		00 -> 01 (-, getAllProducts, 610),
		01 -> 02 (610, getPersistenceContext, -), 
		02 -> 03 (-, getPersistenceContext', 610),
		03 -> 04 (610, getTransactionContext, -), 
		04 -> 05 (-, getTransactionContext', 610),
		05 -> 06 (610, beginTransaction, -), 
		06 -> 07 (-, beginTransaction', 610),
		07 -> 08 (610, queryProducts, -), 
		08 -> 09 (-, queryProducts', 610),
		09 -> 10 (610, commit, -), 
		10 -> 11 (-, commit', 610),
		11 -> 12 (610, close, -), 
		12 -> 13 (-, close', 610),
		13 -> 14 (610, TransactionContextImplD, -), 
		14 -> 15 (-, TransactionContextImplD', 610),
		15 -> 16 (610, PersistenceContextImplD, -), 
		16 -> 17 (-, PersistenceContextImplD', 610),
		17 -> 00 (610, getAllProducts', -),
		
		08 -> 18 (-, exceptionQueryProducts, 610), 
		18 -> 20 (-, queryProducts', 610),

		10 -> 19 (-, exceptionCommit, 610), 
		19 -> 20 (-, commit', 610),

		20 -> 21 (610, isActive, -), 
		21 -> 22 (-, isActive', 610),
		22 -> 25 (610, exceptionGetAllProducts, -),
		22 -> 23 (610, rollback, -), 
		23 -> 24 (-, rollback', 610),
		24 -> 25 (610, exceptionGetAllProducts, -),
		25 -> 26 (610, close, -), 
		26 -> 27 (-, close', 610),
		27 -> 28 (610, TransactionContextImplD, -), 
		28 -> 29 (-, TransactionContextImplD', 610),
		29 -> 30 (610, PersistenceContextImplD, -), 
		30 -> 31 (-, PersistenceContextImplD', 610),
		31 -> 00 (610, getAllProducts', -),

		21 -> 32 (-, exceptionIsActive, 610),
		32 -> 33 (610, exceptionGetAllProducts, -),
		33 -> 25 (-, isActive', 610),

		23 -> 34 (-, exceptionRollback, 610),
		34 -> 35 (610, exceptionGetAllProducts, -),
		35 -> 25 (-, rollback', 610);
}


automaton getAllProductsWithOptionalStockItem (610) {
	state 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35;
	init 00;
	trans 
		00 -> 01 (-, getAllProductsWithOptionalStockItem, 610),
		01 -> 02 (610, getPersistenceContext, -), 
		02 -> 03 (-, getPersistenceContext', 610),
		03 -> 04 (610, getTransactionContext, -), 
		04 -> 05 (-, getTransactionContext', 610),
		05 -> 06 (610, beginTransaction, -), 
		06 -> 07 (-, beginTransaction', 610),
		07 -> 08 (610, queryProducts, -), 
		08 -> 09 (-, queryProducts', 610),
		09 -> 10 (610, commit, -), 
		10 -> 11 (-, commit', 610),
		11 -> 12 (610, close, -), 
		12 -> 13 (-, close', 610),
		13 -> 14 (610, TransactionContextImplD, -), 
		14 -> 15 (-, TransactionContextImplD', 610),
		15 -> 16 (610, PersistenceContextImplD, -), 
		16 -> 17 (-, PersistenceContextImplD', 610),
		17 -> 00 (610, getAllProductsWithOptionalStockItem', -),
		
		08 -> 18 (-, exceptionQueryProducts, 610), 
		18 -> 20 (-, queryProducts', 610),

		10 -> 19 (-, exceptionCommit, 610), 
		19 -> 20 (-, commit', 610),

		20 -> 21 (610, isActive, -), 
		21 -> 22 (-, isActive', 610),
		22 -> 25 (610, exceptionGetAllProductsWithOptionalStockItem, -),
		22 -> 23 (610, rollback, -), 
		23 -> 24 (-, rollback', 610),
		24 -> 25 (610, exceptionGetAllProductsWithOptionalStockItem, -),
		25 -> 26 (610, close, -), 
		26 -> 27 (-, close', 610),
		27 -> 28 (610, TransactionContextImplD, -), 
		28 -> 29 (-, TransactionContextImplD', 610),
		29 -> 30 (610, PersistenceContextImplD, -), 
		30 -> 31 (-, PersistenceContextImplD', 610),
		31 -> 00 (610, getAllProductsWithOptionalStockItem', -),

		21 -> 32 (-, exceptionIsActive, 610),
		32 -> 33 (610, exceptionGetAllProductsWithOptionalStockItem, -),
		33 -> 25 (-, isActive', 610),

		23 -> 34 (-, exceptionRollback, 610),
		34 -> 35 (610, exceptionGetAllProductsWithOptionalStockItem, -),
		35 -> 25 (-, rollback', 610);
}


automaton getOrder (610) {
	state 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35;
	init 00;
	trans 
		00 -> 01 (-, getOrder, 610),
		01 -> 02 (610, getPersistenceContext, -), 
		02 -> 03 (-, getPersistenceContext', 610),
		03 -> 04 (610, getTransactionContext, -), 
		04 -> 05 (-, getTransactionContext', 610),
		05 -> 06 (610, beginTransaction, -), 
		06 -> 07 (-, beginTransaction', 610),
		07 -> 08 (610, queryOrderById, -), 
		08 -> 09 (-, queryOrderById', 610),
		09 -> 10 (610, commit, -), 
		10 -> 11 (-, commit', 610),
		11 -> 12 (610, close, -), 
		12 -> 13 (-, close', 610),
		13 -> 14 (610, TransactionContextImplD, -), 
		14 -> 15 (-, TransactionContextImplD', 610),
		15 -> 16 (610, PersistenceContextImplD, -), 
		16 -> 17 (-, PersistenceContextImplD', 610),
		17 -> 00 (610, getOrder', -),

		10 -> 19 (-, exceptionCommit, 610), 
		19 -> 20 (-, commit', 610),

		20 -> 21 (610, isActive, -), 
		21 -> 22 (-, isActive', 610),
		22 -> 25 (610, exceptionGetOrder, -),
		22 -> 23 (610, rollback, -), 
		23 -> 24 (-, rollback', 610),
		24 -> 25 (610, exceptionGetOrder, -),
		25 -> 26 (610, close, -), 
		26 -> 27 (-, close', 610),
		27 -> 28 (610, TransactionContextImplD, -), 
		28 -> 29 (-, TransactionContextImplD', 610),
		29 -> 30 (610, PersistenceContextImplD, -), 
		30 -> 31 (-, PersistenceContextImplD', 610),
		31 -> 00 (610, getOrder', -),

		21 -> 32 (-, exceptionIsActive, 610),
		32 -> 33 (610, exceptionGetOrder, -),
		33 -> 25 (-, isActive', 610),

		23 -> 34 (-, exceptionRollback, 610),
		34 -> 35 (610, exceptionGetOrder, -),
		35 -> 25 (-, rollback', 610);
}


automaton getProductsWithLowStock (610) {
	state 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35;
	init 00;
	trans 
		00 -> 01 (-, getProductsWithLowStock, 610),
		01 -> 02 (610, getPersistenceContext, -), 
		02 -> 03 (-, getPersistenceContext', 610),
		03 -> 04 (610, getTransactionContext, -), 
		04 -> 05 (-, getTransactionContext', 610),
		05 -> 06 (610, beginTransaction, -), 
		06 -> 07 (-, beginTransaction', 610),
		07 -> 08 (610, queryLowStockItems, -), 
		08 -> 09 (-, queryLowStockItems', 610),
		09 -> 10 (610, commit, -), 
		10 -> 11 (-, commit', 610),
		11 -> 12 (610, close, -), 
		12 -> 13 (-, close', 610),
		13 -> 14 (610, TransactionContextImplD, -), 
		14 -> 15 (-, TransactionContextImplD', 610),
		15 -> 16 (610, PersistenceContextImplD, -), 
		16 -> 17 (-, PersistenceContextImplD', 610),
		17 -> 00 (610, getProductsWithLowStock', -),
		
		08 -> 18 (-, exceptionQueryLowStockItems, 610), 
		18 -> 20 (-, queryLowStockItems', 610),

		10 -> 19 (-, exceptionCommit, 610), 
		19 -> 20 (-, commit', 610),

		20 -> 21 (610, isActive, -), 
		21 -> 22 (-, isActive', 610),
		22 -> 25 (610, exceptionGetProductsWithLowStock, -),
		22 -> 23 (610, rollback, -), 
		23 -> 24 (-, rollback', 610),
		24 -> 25 (610, exceptionGetProductsWithLowStock, -),
		25 -> 26 (610, close, -), 
		26 -> 27 (-, close', 610),
		27 -> 28 (610, TransactionContextImplD, -), 
		28 -> 29 (-, TransactionContextImplD', 610),
		29 -> 30 (610, PersistenceContextImplD, -), 
		30 -> 31 (-, PersistenceContextImplD', 610),
		31 -> 00 (610, getProductsWithLowStock', -),

		21 -> 32 (-, exceptionIsActive, 610),
		32 -> 33 (610, exceptionGetProductsWithLowStock, -),
		33 -> 25 (-, isActive', 610),

		23 -> 34 (-, exceptionRollback, 610),
		34 -> 35 (610, exceptionGetProductsWithLowStock, -),
		35 -> 25 (-, rollback', 610);
}


automaton getStore (610) {
	state 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35;
	init 00;
	trans 
		00 -> 01 (-, getStore, 610),
		01 -> 02 (610, getPersistenceContext, -), 
		02 -> 03 (-, getPersistenceContext', 610),
		03 -> 04 (610, getTransactionContext, -), 
		04 -> 05 (-, getTransactionContext', 610),
		05 -> 06 (610, beginTransaction, -), 
		06 -> 07 (-, beginTransaction', 610),
		07 -> 08 (610, queryStoreById, -), 
		08 -> 09 (-, queryStoreById', 610),
		09 -> 10 (610, commit, -), 
		10 -> 11 (-, commit', 610),
		11 -> 12 (610, close, -), 
		12 -> 13 (-, close', 610),
		13 -> 14 (610, TransactionContextImplD, -), 
		14 -> 15 (-, TransactionContextImplD', 610),
		15 -> 16 (610, PersistenceContextImplD, -), 
		16 -> 17 (-, PersistenceContextImplD', 610),
		17 -> 00 (610, getStore', -),

		10 -> 19 (-, exceptionCommit, 610), 
		19 -> 20 (-, commit', 610),

		20 -> 21 (610, isActive, -), 
		21 -> 22 (-, isActive', 610),
		22 -> 25 (610, exceptionGetStore, -),
		22 -> 23 (610, rollback, -), 
		23 -> 24 (-, rollback', 610),
		24 -> 25 (610, exceptionGetStore, -),
		25 -> 26 (610, close, -), 
		26 -> 27 (-, close', 610),
		27 -> 28 (610, TransactionContextImplD, -), 
		28 -> 29 (-, TransactionContextImplD', 610),
		29 -> 30 (610, PersistenceContextImplD, -), 
		30 -> 31 (-, PersistenceContextImplD', 610),
		31 -> 00 (610, getStore', -),

		21 -> 32 (-, exceptionIsActive, 610),
		32 -> 33 (610, exceptionGetStore, -),
		33 -> 25 (-, isActive', 610),

		23 -> 34 (-, exceptionRollback, 610),
		34 -> 35 (610, exceptionGetStore, -),
		35 -> 25 (-, rollback', 610);
}


automaton orderProducts (610) {
	state 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 41, 42, 43, 44, 45, 46, 47, 48, 49;
	init 00;
	trans 
		00 -> 01 (-, orderProducts, 610),
		01 -> 02 (610, getPersistenceContext, -), 
		02 -> 03 (-, getPersistenceContext', 610),
		03 -> 04 (610, getTransactionContext, -), 
		04 -> 05 (-, getTransactionContext', 610),
		05 -> 06 (610, beginTransaction, -), 
		06 -> 07 (-, beginTransaction', 610),

		07 -> 41 (610, queryProductById, -),
		41 -> 42 (-, queryProductById', 610),
		42 -> 43 (610, makePersistent, -),
		43 -> 07 (-, makePersistent', 610),
		43 -> 09 (-, makePersistent', 610),

		41 -> 44 (-, exceptionQueryProductById, 610), 
		44 -> 20 (-, queryProductById', 610),

		43 -> 45 (-, exceptionMakePersistent, 610), 
		45 -> 20 (-, makePersistent', 610),

		09 -> 46 (610, makePersistent, -),
		46 -> 47 (-, makePersistent', 610),
		47 -> 48 (610, queryStoreById, -),
		48 -> 09 (-, queryStoreById', 610),

		46 -> 49 (-, exceptionMakePersistent, 610), 
		49 -> 20 (-, makePersistent', 610),

		09 -> 10 (610, commit, -), 
		10 -> 11 (-, commit', 610),
		11 -> 12 (610, close, -), 
		12 -> 13 (-, close', 610),
		13 -> 14 (610, TransactionContextImplD, -), 
		14 -> 15 (-, TransactionContextImplD', 610),
		15 -> 16 (610, PersistenceContextImplD, -), 
		16 -> 17 (-, PersistenceContextImplD', 610),
		17 -> 00 (610, orderProducts', -),

		10 -> 19 (-, exceptionCommit, 610), 
		19 -> 20 (-, commit', 610),

		20 -> 21 (610, isActive, -), 
		21 -> 22 (-, isActive', 610),
		22 -> 25 (610, exceptionOrderProducts, -),
		22 -> 23 (610, rollback, -), 
		23 -> 24 (-, rollback', 610),
		24 -> 25 (610, exceptionOrderProducts, -),
		25 -> 26 (610, close, -), 
		26 -> 27 (-, close', 610),
		27 -> 28 (610, TransactionContextImplD, -), 
		28 -> 29 (-, TransactionContextImplD', 610),
		29 -> 30 (610, PersistenceContextImplD, -), 
		30 -> 31 (-, PersistenceContextImplD', 610),
		31 -> 00 (610, orderProducts', -),

		21 -> 32 (-, exceptionIsActive, 610),
		32 -> 33 (610, exceptionOrderProducts, -),
		33 -> 25 (-, isActive', 610),

		23 -> 34 (-, exceptionRollback, 610),
		34 -> 35 (610, exceptionOrderProducts, -),
		35 -> 25 (-, rollback', 610);
}


automaton rollInReceivedOrder (610) {
	state 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 41, 42;
	init 00;
	trans 
		00 -> 01 (-, rollInReceivedOrder, 610),
		01 -> 02 (610, getPersistenceContext, -), 
		02 -> 03 (-, getPersistenceContext', 610),
		03 -> 04 (610, getTransactionContext, -), 
		04 -> 05 (-, getTransactionContext', 610),
		05 -> 06 (610, beginTransaction, -), 
		06 -> 07 (-, beginTransaction', 610),
		07 -> 08 (610, queryOrderById, -), 
		08 -> 09 (-, queryOrderById', 610),
		08 -> 20 (-, queryOrderById', 610),
		08 -> 25 (-, queryOrderById', 610),

		09 -> 41 (610, queryStockItem, -),
		41 -> 09 (-, queryStockItem', 610),
		41 -> 42 (-, exceptionQueryStockItem, 610),
		42 -> 20 (-, queryStockItem', 610),

		09 -> 10 (610, commit, -), 
		10 -> 11 (-, commit', 610),
		11 -> 12 (610, close, -), 
		12 -> 13 (-, close', 610),
		13 -> 14 (610, TransactionContextImplD, -), 
		14 -> 15 (-, TransactionContextImplD', 610),
		15 -> 16 (610, PersistenceContextImplD, -), 
		16 -> 17 (-, PersistenceContextImplD', 610),
		17 -> 00 (610, rollInReceivedOrder', -),

		10 -> 19 (-, exceptionCommit, 610), 
		19 -> 20 (-, commit', 610),

		20 -> 21 (610, isActive, -), 
		21 -> 22 (-, isActive', 610),
		22 -> 25 (610, exceptionRollInReceivedOrder, -),
		22 -> 23 (610, rollback, -), 
		23 -> 24 (-, rollback', 610),
		24 -> 25 (610, exceptionRollInReceivedOrder, -),
		25 -> 26 (610, close, -), 
		26 -> 27 (-, close', 610),
		27 -> 28 (610, TransactionContextImplD, -), 
		28 -> 29 (-, TransactionContextImplD', 610),
		29 -> 30 (610, PersistenceContextImplD, -), 
		30 -> 31 (-, PersistenceContextImplD', 610),
		31 -> 00 (610, rollInReceivedOrder', -),

		21 -> 32 (-, exceptionIsActive, 610),
		32 -> 33 (610, exceptionRollInReceivedOrder, -),
		33 -> 25 (-, isActive', 610),

		23 -> 34 (-, exceptionRollback, 610),
		34 -> 35 (610, exceptionRollInReceivedOrder, -),
		35 -> 25 (-, rollback', 610);
}


// = bookSale()
automaton onEventExtAccountSale (610) {
	state 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 41, 42, 43;
	init 00;
	trans 
		00 -> 01 (-, onEventExtAccountSale, 610),
		01 -> 02 (610, getPersistenceContext, -), 
		02 -> 03 (-, getPersistenceContext', 610),
		03 -> 04 (610, getTransactionContext, -), 
		04 -> 05 (-, getTransactionContext', 610),
		05 -> 06 (610, beginTransaction, -), 
		06 -> 07 (-, beginTransaction', 610),
		07 -> 08 (610, queryStockItemById, -), 
		08 -> 07 (-, queryStockItemById', 610),
		07 -> 10 (610, commit, -), 
		10 -> 11 (-, commit', 610),
		11 -> 12 (610, close, -), 
		12 -> 13 (-, close', 610),
		13 -> 14 (610, TransactionContextImplD, -), 
		14 -> 15 (-, TransactionContextImplD', 610),
		15 -> 16 (610, PersistenceContextImplD, -), 
		16 -> 17 (-, PersistenceContextImplD', 610),

		17 -> 41 (610, checkForLowRunningGoods, -),				// UC 8
		41 -> 42 (-, checkForLowRunningGoods', 610),
		41 -> 43 (-, exceptionCheckForLowRunningGoods, 610),
		43 -> 42 (-, checkForLowRunningGoods', 610),

		42 -> 00 (610, onEventExtAccountSale', -),
		
		08 -> 18 (-, exceptionQueryStockItemById, 610), 
		18 -> 20 (-, queryStockItemById', 610),

		10 -> 19 (-, exceptionCommit, 610), 
		19 -> 20 (-, commit', 610),

		20 -> 21 (610, isActive, -), 
		21 -> 22 (-, isActive', 610),
		22 -> 25 (610, exceptionOnEventExtAccountSale, 610),
		22 -> 23 (610, rollback, -), 
		23 -> 24 (-, rollback', 610),
		24 -> 25 (610, exceptionOnEventExtAccountSale, 610),
		25 -> 26 (610, close, -), 
		26 -> 27 (-, close', 610),
		27 -> 28 (610, TransactionContextImplD, -), 
		28 -> 29 (-, TransactionContextImplD', 610),
		29 -> 30 (610, PersistenceContextImplD, -), 
		30 -> 31 (-, PersistenceContextImplD', 610),
		31 -> 00 (610, onEventExtAccountSale', -),

		21 -> 32 (-, exceptionIsActive, 610),
		32 -> 33 (610, exceptionOnEventExtAccountSale, 610),
		33 -> 25 (-, isActive', 610),

		23 -> 34 (-, exceptionRollback, 610),
		34 -> 35 (610, exceptionOnEventExtAccountSale, 610),
		35 -> 25 (-, rollback', 610);
}


automaton getProductWithStockItem (610) {
	state 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35;
	init 00;
	trans 
		00 -> 01 (-, getProductWithStockItem, 610),
		01 -> 02 (610, getPersistenceContext, -), 
		02 -> 03 (-, getPersistenceContext', 610),
		03 -> 04 (610, getTransactionContext, -), 
		04 -> 05 (-, getTransactionContext', 610),
		05 -> 06 (610, beginTransaction, -), 
		06 -> 07 (-, beginTransaction', 610),
		07 -> 08 (610, queryStockItem, -), 
		08 -> 09 (-, queryStockItem', 610),
		09 -> 10 (610, commit, -), 
		10 -> 11 (-, commit', 610),
		11 -> 12 (610, close, -), 
		12 -> 13 (-, close', 610),
		13 -> 14 (610, TransactionContextImplD, -), 
		14 -> 15 (-, TransactionContextImplD', 610),
		15 -> 16 (610, PersistenceContextImplD, -), 
		16 -> 17 (-, PersistenceContextImplD', 610),
		17 -> 00 (610, getProductWithStockItem', -),
		
		08 -> 18 (-, exceptionQueryStockItem, 610), 
		18 -> 20 (-, queryStockItem', 610),

		10 -> 19 (-, exceptionCommit, 610), 
		19 -> 20 (-, commit', 610),
		10 -> 20 (-, commit', 610),							// if NoSuchProductException is thrown

		20 -> 21 (610, isActive, -), 
		21 -> 22 (-, isActive', 610),
		22 -> 25 (610, exceptionGetProductWithStockItem, -),
		22 -> 23 (610, rollback, -), 
		23 -> 24 (-, rollback', 610),
		24 -> 25 (610, exceptionGetProductWithStockItem, -),
		25 -> 26 (610, close, -), 
		26 -> 27 (-, close', 610),
		27 -> 28 (610, TransactionContextImplD, -), 
		28 -> 29 (-, TransactionContextImplD', 610),
		29 -> 30 (610, PersistenceContextImplD, -), 
		30 -> 31 (-, PersistenceContextImplD', 610),
		31 -> 00 (610, getProductWithStockItem', -),

		21 -> 32 (-, exceptionIsActive, 610),
		32 -> 33 (610, exceptionGetProductWithStockItem, -),
		33 -> 25 (-, isActive', 610),

		23 -> 34 (-, exceptionRollback, 610),
		34 -> 35 (610, exceptionGetProductWithStockItem, -),
		35 -> 25 (-, rollback', 610);
}


automaton getStockItems (610) {
	state 0, 1, 2;
	init 0;
	trans 
		0 -> 1 (-, getStockItems, 610),
		1 -> 2 (610, exceptionGetStockItems, -),
		2 -> 0 (610, getStockItems', -);
}


automaton markProductsUnavailableInStock (610) {
	state 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35;
	init 00;
	trans 
		00 -> 01 (-, markProductsUnavailableInStock, 610),
		01 -> 02 (610, getPersistenceContext, -), 
		02 -> 03 (-, getPersistenceContext', 610),
		03 -> 04 (610, getTransactionContext, -), 
		04 -> 05 (-, getTransactionContext', 610),
		05 -> 06 (610, beginTransaction, -), 
		06 -> 07 (-, beginTransaction', 610),
		07 -> 08 (610, queryStockItem, -), 
		08 -> 07 (-, queryStockItem', 610),
		08 -> 20 (-, queryStockItem', 610),
		07 -> 10 (610, commit, -), 
		10 -> 11 (-, commit', 610),
		11 -> 12 (610, close, -), 
		12 -> 13 (-, close', 610),
		13 -> 14 (610, TransactionContextImplD, -), 
		14 -> 15 (-, TransactionContextImplD', 610),
		15 -> 16 (610, PersistenceContextImplD, -), 
		16 -> 17 (-, PersistenceContextImplD', 610),
		17 -> 00 (610, markProductsUnavailableInStock', -),
		
		08 -> 18 (-, exceptionQueryStockItem, 610), 
		18 -> 20 (-, queryStockItem', 610),

		10 -> 19 (-, exceptionCommit, 610), 
		19 -> 20 (-, commit', 610),

		20 -> 21 (610, isActive, -), 
		21 -> 22 (-, isActive', 610),
		22 -> 25 (610, exceptionMarkProductsUnavailableInStock, -),
		22 -> 23 (610, rollback, -), 
		23 -> 24 (-, rollback', 610),
		24 -> 25 (610, exceptionMarkProductsUnavailableInStock, -),
		25 -> 26 (610, close, -), 
		26 -> 27 (-, close', 610),
		27 -> 28 (610, TransactionContextImplD, -), 
		28 -> 29 (-, TransactionContextImplD', 610),
		29 -> 30 (610, PersistenceContextImplD, -), 
		30 -> 31 (-, PersistenceContextImplD', 610),
		31 -> 00 (610, markProductsUnavailableInStock', -),

		21 -> 32 (-, exceptionIsActive, 610),
		32 -> 33 (610, exceptionMarkProductsUnavailableInStock, -),
		33 -> 25 (-, isActive', 610),

		23 -> 34 (-, exceptionRollback, 610),
		34 -> 35 (610, exceptionMarkProductsUnavailableInStock, -),
		35 -> 25 (-, rollback', 610);
}


automaton checkForLowRunningGoods (610) {
	state 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49;
	init 00;
	trans 
		00 -> 01 (-, checkForLowRunningGoods, 610),
		01 -> 02 (610, getPersistenceContext, -), 
		02 -> 03 (-, getPersistenceContext', 610),
		03 -> 04 (610, queryLowStockItems, -), 
		04 -> 05 (-, queryLowStockItems', 610),
		05 -> 06 (610, calculateProductAmounts, -), 
		06 -> 07 (-, calculateProductAmounts', 610),
		07 -> 08 (610, queryStoreById, -), 
		08 -> 09 (-, queryStoreById', 610),
		09 -> 10 (610, orderProductsAvailableAtOtherStores, -),	// try block
		10 -> 11 (-, orderProductsAvailableAtOtherStores', 610),
		11 -> 12 (610, close, -),								// finaly block
		12 -> 13 (-, close', 610),
		13 -> 14 (610, PersistenceContextImplD, -),				// finish
		14 -> 15 (-, PersistenceContextImplD', 610),
		15 -> 00 (610, checkForLowRunningGoods', -),

		11 -> 16 (610, getTransactionContext, -),				// try block
		16 -> 17 (-, getTransactionContext', 610),
		17 -> 18 (610, beginTransaction, -),
		18 -> 19 (-, beginTransaction', 610),
		19 -> 20 (610, queryStockItem, -),
		20 -> 19 (-, queryStockItem', 610),
		19 -> 21 (610, commit, -),
		21 -> 22 (-, commit', 610),
		22 -> 23 (610, close, -),								// finaly block
		23 -> 24 (-, close', 610),
		24 -> 25 (610, TransactionContextImplD, -),
		25 -> 13 (-, TransactionContextImplD', 610),

		04 -> 26 (-, exceptionQueryLowStockItems, 610),   
		26 -> 27 (610, exceptionCheckForLowRunningGoods, -),
		27 -> 43 (-, queryLowStockItems', 610),           

		10 -> 28 (-, exceptionOrderProductsAvailableAtOtherStores, 610),     
		28 -> 29 (610, exceptionCheckForLowRunningGoods, -),
		29 -> 30 (-, orderProductsAvailableAtOtherStores', 610),             
		30 -> 31 (610, close, -),								// finaly
		31 -> 43 (-, close', 610),

		20 -> 32 (-, exceptionQueryStockItem, 610),
		32 -> 34 (-, queryStockItem', 610),

		21 -> 33 (-, exceptionCommit, 610),
		33 -> 34 (-, commit', 610),

		34 -> 35 (610, isActive, -),							// catch block
		35 -> 36 (-, isActive', 610),
		36 -> 39 (610, exceptionCheckForLowRunningGoods, -),
		36 -> 37 (610, rollback, -), 
		37 -> 38 (-, rollback', 610),
		38 -> 39 (610, exceptionCheckForLowRunningGoods, -),

		35 -> 46 (-, exceptionIsActive, 610),
		46 -> 47 (610, exceptionCheckForLowRunningGoods, -),
		47 -> 39 (-, isActive', 610),

		37 -> 48 (-, exceptionRollback, 610),
		48 -> 49 (610, exceptionCheckForLowRunningGoods, -),
		49 -> 39 (-, rollback', 610),

		39 -> 40 (610, close, -),								// finaly block
		40 -> 41 (-, close', 610),
		41 -> 42 (610, TransactionContextImplD, -), 
		42 -> 43 (-, TransactionContextImplD', 610),
		
		43 -> 44 (610, PersistenceContextImplD, -),				// finish
		44 -> 45 (-, PersistenceContextImplD', 610),
		45 -> 00 (610, checkForLowRunningGoods', -);
}


automaton calculateProductAmounts (610) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, calculateProductAmounts, 610),
		1 -> 0 (610, calculateProductAmounts', -);
}


composite StoreApplication {
	changePrice, getAllProducts, getAllProductsWithOptionalStockItem, getOrder, getProductsWithLowStock, getStore, orderProducts, rollInReceivedOrder, onEventExtAccountSale, getProductWithStockItem, getStockItems, markProductsUnavailableInStock, checkForLowRunningGoods, calculateProductAmounts;
	restrictL 
		(610, checkForLowRunningGoods, -), (-, checkForLowRunningGoods', 610), (-, exceptionCheckForLowRunningGoods, 610),
		(610, calculateProductAmounts, -), (-, calculateProductAmounts', 610),
		(-, checkForLowRunningGoods, 610), (610, checkForLowRunningGoods', -), (610, exceptionCheckForLowRunningGoods, -),
		(-, calculateProductAmounts, 610), (610, calculateProductAmounts', -);
}





			/********** ReportingApplication **********/


automaton getMeanTimeToDeliveryReport (620) {
	state 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 41;
	init 00;
	trans 
		00 -> 01 (-, getMeanTimeToDeliveryReport, 620),
		01 -> 02 (620, getPersistenceContext, -), 
		02 -> 03 (-, getPersistenceContext', 620),
		03 -> 04 (620, getTransactionContext, -), 
		04 -> 05 (-, getTransactionContext', 620),
		05 -> 06 (620, beginTransaction, -), 
		06 -> 07 (-, beginTransaction', 620),
		07 -> 08 (620, queryEnterpriseById, -), 
		08 -> 09 (-, queryEnterpriseById', 620),

		09 -> 41 (620, getMeanTimeToDelivery, -),
		41 -> 09 (-, getMeanTimeToDelivery', 620),

		09 -> 10 (620, commit, -), 
		10 -> 11 (-, commit', 620),
		11 -> 12 (620, close, -), 
		12 -> 13 (-, close', 620),
		13 -> 14 (620, TransactionContextImplD, -), 
		14 -> 15 (-, TransactionContextImplD', 620),
		15 -> 16 (620, PersistenceContextImplD, -), 
		16 -> 17 (-, PersistenceContextImplD', 620),
		17 -> 00 (620, getMeanTimeToDeliveryReport', -),
		
		08 -> 18 (-, exceptionQueryEnterpriseById, 620), 
		18 -> 20 (-, queryEnterpriseById', 620),

		10 -> 19 (-, exceptionCommit, 620), 
		19 -> 20 (-, commit', 620),

		20 -> 21 (620, isActive, -), 
		21 -> 22 (-, isActive', 620),
		22 -> 25 (620, exceptionGetMeanTimeToDeliveryReport, -),
		22 -> 23 (620, rollback, -), 
		23 -> 24 (-, rollback', 620),
		24 -> 25 (620, exceptionGetMeanTimeToDeliveryReport, -),
		25 -> 26 (620, close, -), 
		26 -> 27 (-, close', 620),
		27 -> 28 (620, TransactionContextImplD, -), 
		28 -> 29 (-, TransactionContextImplD', 620),
		29 -> 30 (620, PersistenceContextImplD, -), 
		30 -> 31 (-, PersistenceContextImplD', 620),
		31 -> 00 (620, getMeanTimeToDeliveryReport', -),

		21 -> 32 (-, exceptionIsActive, 620),
		32 -> 33 (620, exceptionGetMeanTimeToDeliveryReport, -),
		33 -> 25 (-, isActive', 620),

		23 -> 34 (-, exceptionRollback, 620),
		34 -> 35 (620, exceptionGetMeanTimeToDeliveryReport, -),
		35 -> 25 (-, rollback', 620);
}


automaton getStockReportStore (620) {
	state 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 41, 42, 43;
	init 00;
	trans 
		00 -> 01 (-, getStockReportStore, 620),
		01 -> 02 (620, getPersistenceContext, -), 
		02 -> 03 (-, getPersistenceContext', 620),
		03 -> 04 (620, getTransactionContext, -), 
		04 -> 05 (-, getTransactionContext', 620),
		05 -> 06 (620, beginTransaction, -), 
		06 -> 07 (-, beginTransaction', 620),
		07 -> 08 (620, queryStoreById, -), 
		08 -> 09 (-, queryStoreById', 620),
		08 -> 20 (-, queryStoreById', 620),

		09 -> 41 (620, append, -),         
		41 -> 42 (-, append', 620),        
		41 -> 43 (-, exceptionAppend, 620),
		43 -> 20 (-, append', 620),        

		42 -> 10 (620, commit, -), 
		10 -> 11 (-, commit', 620),
		11 -> 12 (620, close, -), 
		12 -> 13 (-, close', 620),
		13 -> 14 (620, TransactionContextImplD, -), 
		14 -> 15 (-, TransactionContextImplD', 620),
		15 -> 16 (620, PersistenceContextImplD, -), 
		16 -> 17 (-, PersistenceContextImplD', 620),
		17 -> 00 (620, getStockReportStore', -),

		10 -> 19 (-, exceptionCommit, 620), 
		19 -> 20 (-, commit', 620),

		20 -> 21 (620, isActive, -), 
		21 -> 22 (-, isActive', 620),
		22 -> 25 (620, exceptionGetStockReportStore, -),
		22 -> 23 (620, rollback, -), 
		23 -> 24 (-, rollback', 620),
		24 -> 25 (620, exceptionGetStockReportStore, -),
		25 -> 26 (620, close, -), 
		26 -> 27 (-, close', 620),
		27 -> 28 (620, TransactionContextImplD, -), 
		28 -> 29 (-, TransactionContextImplD', 620),
		29 -> 30 (620, PersistenceContextImplD, -), 
		30 -> 31 (-, PersistenceContextImplD', 620),
		31 -> 00 (620, getStockReportStore', -),

		21 -> 32 (-, exceptionIsActive, 620),
		32 -> 33 (620, exceptionGetStockReportStore, -),
		33 -> 25 (-, isActive', 620),

		23 -> 34 (-, exceptionRollback, 620),
		34 -> 35 (620, exceptionGetStockReportStore, -),
		35 -> 25 (-, rollback', 620);
}


automaton getStockReportEnterprise (620) {
	state 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 41, 42;
	init 00;
	trans 
		00 -> 01 (-, getStockReportEnterprise, 620),
		01 -> 02 (620, getPersistenceContext, -), 
		02 -> 03 (-, getPersistenceContext', 620),
		03 -> 04 (620, getTransactionContext, -), 
		04 -> 05 (-, getTransactionContext', 620),
		05 -> 06 (620, beginTransaction, -), 
		06 -> 07 (-, beginTransaction', 620),
		07 -> 08 (620, queryEnterpriseById, -), 
		08 -> 09 (-, queryEnterpriseById', 620),

		09 -> 41 (620, append, -), 
		41 -> 09 (-, append', 620),
		41 -> 42 (-, exceptionAppend, 620),
		42 -> 20 (-, append', 620),

		09 -> 10 (620, commit, -), 
		10 -> 11 (-, commit', 620),
		11 -> 12 (620, close, -), 
		12 -> 13 (-, close', 620),
		13 -> 14 (620, TransactionContextImplD, -), 
		14 -> 15 (-, TransactionContextImplD', 620),
		15 -> 16 (620, PersistenceContextImplD, -), 
		16 -> 17 (-, PersistenceContextImplD', 620),
		17 -> 00 (620, getStockReportEnterprise', -),
		
		08 -> 18 (-, exceptionQueryEnterpriseById, 620), 
		18 -> 20 (-, queryEnterpriseById', 620),

		10 -> 19 (-, exceptionCommit, 620), 
		19 -> 20 (-, commit', 620),

		20 -> 21 (620, isActive, -), 
		21 -> 22 (-, isActive', 620),
		22 -> 25 (620, exceptionGetStockReportEnterprise, -),
		22 -> 23 (620, rollback, -), 
		23 -> 24 (-, rollback', 620),
		24 -> 25 (620, exceptionGetStockReportEnterprise, -),
		25 -> 26 (620, close, -), 
		26 -> 27 (-, close', 620),
		27 -> 28 (620, TransactionContextImplD, -), 
		28 -> 29 (-, TransactionContextImplD', 620),
		29 -> 30 (620, PersistenceContextImplD, -), 
		30 -> 31 (-, PersistenceContextImplD', 620),
		31 -> 00 (620, getStockReportEnterprise', -),

		21 -> 32 (-, exceptionIsActive, 620),
		32 -> 33 (620, exceptionGetStockReportEnterprise, -),
		33 -> 25 (-, isActive', 620),

		23 -> 34 (-, exceptionRollback, 620),
		34 -> 35 (620, exceptionGetStockReportEnterprise, -),
		35 -> 25 (-, rollback', 620);
}


automaton append (620) {
	state 0, 1, 2, 3, 4, 5, 6, 7, 8;
	init 0;
	trans 
		0 -> 1 (-, append, 620),
		1 -> 2 (620, queryAllStockItems, -),
		2 -> 3 (-, queryAllStockItems', 620),
		3 -> 4 (620, queryStoreById, -), 
		4 -> 5 (-, queryStoreById', 620),
		5 -> 0 (620, append', -),

		2 -> 6 (-, exceptionQueryAllStockItems, 620),
		6 -> 7 (620, exceptionAppend, -),
		7 -> 8 (-, queryAllStockItems', 620),
		8 -> 0 (620, append', -);
}


composite ReportingApplication {
	getMeanTimeToDeliveryReport, getStockReportStore, getStockReportEnterprise, append;
	restrictL 
		(620, append, -), (-, append', 620), (-, exceptionAppend, 620),
		(-, append, 620), (620, append', -), (620, exceptionAppend, -);
}


				


			/********** ProductDispatcher **********/


automaton solveOptimization (630) {
	state 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13;
	init 00;
	trans 
		00 -> 01 (-, solveOptimization, 630),
		01 -> 02 (630, removeUnavailableProducts, -),
		02 -> 03 (-, removeUnavailableProducts', 630),
		03 -> 00 (630, solveOptimization', -),
		03 -> 04 (630, createDataString, -), 
		04 -> 05 (-, createDataString', 630),
		05 -> 06 (630, createTmpFile, -), 
		06 -> 07 (-, createTmpFile', 630),
		07 -> 08 (630, parseOutput, -), 
		08 -> 09 (-, parseOutput', 630),
		09 -> 00 (630, solveOptimization', -),

		06 -> 10 (-, exceptionCreateTmpFile, 630),
		10 -> 07 (-, createTmpFile', 630),

		08 -> 11 (-, exceptionParseOutput, 630),
		11 -> 12 (630, exceptionSolveOptimization, -),
		12 -> 13 (-, parseOutput', 630),
		13 -> 00 (630, solveOptimization', -);
}

automaton removeUnavailableProducts (630) {
	state 0, 1, 2;
	init 0;
	trans 
		0 -> 1 (-, removeUnavailableProducts, 630),
		1 -> 0 (630, removeUnavailableProducts', -),
		1 -> 2 (630, searchForProductOffered, -),
		2 -> 1 (-, searchForProductOffered', 630);
}

automaton parseOutput (630) {
	state 0, 1, 2, 3, 4, 5, 6, 7;
	init 0;
	trans 
		0 -> 1 (-, parseOutput, 630),
		1 -> 0 (630, parseOutput', -),
		1 -> 2 (630, queryStoreById, -),
		2 -> 1 (-, queryStoreById', 630),
		2 -> 3 (-, queryStoreById', 630),
		3 -> 4 (630, queryProductById, -), 
		4 -> 3 (-, queryProductById', 630),
		4 -> 1 (-, queryProductById', 630),

		4 -> 5 (-, exceptionQueryProductById, 630),
		5 -> 6 (630, exceptionParseOutput, -),
		6 -> 7 (-, queryProductById', 630),
		7 -> 0 (630, parseOutput', -);
}

automaton createTmpFile (630) {
	state 0, 1, 2;
	init 0;
	trans 
		0 -> 1 (-, createTmpFile, 630),
		1 -> 0 (630, createTmpFile', -),
		1 -> 2 (630, exceptionCreateTmpFile, -),
		2 -> 0 (630, createTmpFile', -);
}

automaton createDataString (630) {
	state 0, 1, 2, 3, 4, 5, 6, 7;
	init 0;
	trans 
		0 -> 1 (-, createDataString, 630),
		1 -> 2 (630, appendStoreDistances, -), 
		2 -> 3 (-, appendStoreDistances', 630),
		3 -> 4 (630, appendRequiredProductAmounts, -), 
		4 -> 5 (-, appendRequiredProductAmounts', 630),
		5 -> 6 (630, appendOfferingStoresProductsAmountsMatrix, -), 
		6 -> 7 (-, appendOfferingStoresProductsAmountsMatrix', 630),
		7 -> 0 (630, createDataString', -);
}

automaton appendOfferingStoresProductsAmountsMatrix (630) {
	state 0, 1, 2, 3, 4;
	init 0;
	trans 
		0 -> 1 (-, appendOfferingStoresProductsAmountsMatrix, 630),
		1 -> 2 (630, appendMatrixHeader, -), 
		2 -> 3 (-, appendMatrixHeader', 630),
		3 -> 4 (630, searchForProductOffered, -), 
		4 -> 3 (-, searchForProductOffered', 630),
		3 -> 0 (630, appendOfferingStoresProductsAmountsMatrix', -);
}

automaton searchForProductOffered (630) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, searchForProductOffered, 630),
		1 -> 0 (630, searchForProductOffered', -);
}

automaton appendMatrixHeader (630) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, appendMatrixHeader, 630),
		1 -> 0 (630, appendMatrixHeader', -);
}

automaton appendRequiredProductAmounts (630) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, appendRequiredProductAmounts, 630),
		1 -> 0 (630, appendRequiredProductAmounts', -);
}

automaton appendStoreDistances (630) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, appendStoreDistances, 630),
		1 -> 0 (630, appendStoreDistances', -);
}

composite AmplStarter {
	solveOptimization, removeUnavailableProducts, parseOutput, createTmpFile, createDataString, appendOfferingStoresProductsAmountsMatrix, searchForProductOffered, appendMatrixHeader, appendRequiredProductAmounts, appendStoreDistances;
	restrictL 
		(-, removeUnavailableProducts, 630), (630, removeUnavailableProducts', -),
		(-, parseOutput, 630), (630, parseOutput', -), (630, exceptionParseOutput, -),
		(-, createTmpFile, 630), (630, createTmpFile', -), (630, exceptionCreateTmpFile, -),
		(-, createDataString, 630), (630, createDataString', -),
		(-, appendOfferingStoresProductsAmountsMatrix, 630), (630, appendOfferingStoresProductsAmountsMatrix', -),
		(-, searchForProductOffered, 630), (630, searchForProductOffered', -),
		(-, appendMatrixHeader, 630), (630, appendMatrixHeader', -),
		(-, appendRequiredProductAmounts, 630), (630, appendRequiredProductAmounts', -),
		(-, appendStoreDistances, 630), (630, appendStoreDistances', -),

		(630, removeUnavailableProducts, -), (-, removeUnavailableProducts', 630),
		(630, parseOutput, -), (-, parseOutput', 630), (-, exceptionParseOutput, 630),
		(630, createTmpFile, -), (-, createTmpFile', 630), (-, exceptionCreateTmpFile, 630),
		(630, createDataString, -), (-, createDataString', 630),
		(630, appendOfferingStoresProductsAmountsMatrix, -), (-, appendOfferingStoresProductsAmountsMatrix', 630),
		(630, searchForProductOffered, -), (-, searchForProductOffered', 630), 
		(630, appendMatrixHeader, -), (-, appendMatrixHeader', 630),
		(630, appendRequiredProductAmounts, -), (-, appendRequiredProductAmounts', 630),
		(630, appendStoreDistances, -), (-, appendStoreDistances', 630);
}

automaton orderProductsAvailableAtOtherStores (630) {
	state 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32;
	init 00;
	trans 
		00 -> 01 (-, orderProductsAvailableAtOtherStores, 630),
		01 -> 02 (630, getPersistenceContext, -), 
		02 -> 03 (-, getPersistenceContext', 630),
		03 -> 04 (630, queryEnterpriseById, -), 
		04 -> 05 (-, queryEnterpriseById', 630),
		05 -> 06 (630, letAllStoresFlushDatabase, -), 
		06 -> 07 (-, letAllStoresFlushDatabase', 630),
		07 -> 08 (630, getProductIds, -), 
		08 -> 09 (-, getProductIds', 630),
		09 -> 10 (630, getOfferedStockItemsPerStore, -), 
		10 -> 11 (-, getOfferedStockItemsPerStore', 630),
		11 -> 12 (630, getStoreDistances, -), 
		12 -> 13 (-, getStoreDistances', 630),
		13 -> 14 (630, solveOptimization, -), 
		14 -> 15 (-, solveOptimization', 630),
		15 -> 16 (630, markProductsUnavailableInStockPD, -), 
		16 -> 17 (-, markProductsUnavailableInStockPD', 630),
		17 -> 18 (630, sumUpIncomingProducts, -), 
		18 -> 19 (-, sumUpIncomingProducts', 630),
		19 -> 20 (630, PersistenceContextImplD, -), 
		20 -> 21 (-, PersistenceContextImplD', 630),
		21 -> 00 (630, orderProductsAvailableAtOtherStores', -),

		04 -> 22 (-, exceptionQueryEnterpriseById, 630),  
		22 -> 23 (630, exceptionOrderProductsAvailableAtOtherStores, -),          
		23 -> 30 (-, queryEnterpriseById', 630),

		10 -> 24 (-, exceptionGetOfferedStockItemsPerStore, 630),
		24 -> 25 (630, exceptionOrderProductsAvailableAtOtherStores, -),
		25 -> 30 (-, getOfferedStockItemsPerStore', 630),

		14 -> 26 (-, exceptionSolveOptimization, 630),
		26 -> 27 (630, exceptionOrderProductsAvailableAtOtherStores, -),
		27 -> 30 (-, solveOptimization', 630),

		16 -> 28 (-, exceptionMarkProductsUnavailableInStockPD, 630),
		28 -> 29 (630, exceptionOrderProductsAvailableAtOtherStores, -),
		29 -> 30 (-, markProductsUnavailableInStockPD', 630),

		30 -> 31 (630, PersistenceContextImplD, -), 
		31 -> 32 (-, PersistenceContextImplD', 630),
		32 -> 00 (630, orderProductsAvailableAtOtherStores', -);
}

automaton sumUpIncomingProducts (630) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, sumUpIncomingProducts, 630),
		1 -> 0 (630, sumUpIncomingProducts', -);
}

automaton markProductsUnavailableInStockPD (630) {
	state 0, 1, 2, 3, 4, 5, 6, 7;
	init 0;
	trans 
		0 -> 1 (-, markProductsUnavailableInStockPD, 630),
		1 -> 0 (630, markProductsUnavailableInStockPD', -),
		1 -> 2 (630, createProductMovements, -), 
		2 -> 3 (-, createProductMovements', 630),
		3 -> 4 (630, markProductsUnavailableInStock, -), 
		4 -> 1 (-, markProductsUnavailableInStock', 630),
		
		4 -> 5 (-, exceptionMarkProductsUnavailableInStock, 630),
		5 -> 6 (-, markProductsUnavailableInStock', 630),
		6 -> 7 (630, exceptionMarkProductsUnavailableInStockPD, -),
		7 -> 0 (630, markProductsUnavailableInStockPD', -);
}

automaton createProductMovements (630) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, createProductMovements, 630),
		1 -> 0 (630, createProductMovements', -);
}

automaton getOfferedStockItemsPerStore (630) {
	state 0, 1, 2, 3, 4, 5;
	init 0;
	trans 
		0 -> 1 (-, getOfferedStockItemsPerStore, 630),
		1 -> 0 (630, getOfferedStockItemsPerStore', -),
		1 -> 2 (630, queryStockItems, -), 
		2 -> 1 (-, queryStockItems', 630),

		2 -> 3 (-, exceptionQueryStockItems, 630),
		3 -> 4 (630, exceptionGetOfferedStockItemsPerStore, -),
		4 -> 5 (-, queryStockItems', 630),
		5 -> 0 (630, getOfferedStockItemsPerStore', -);
}

automaton letAllStoresFlushDatabase (630) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, letAllStoresFlushDatabase, 630),
		1 -> 0 (630, letAllStoresFlushDatabase', -);
}

automaton getStoreDistances (630) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, getStoreDistances, 630),
		1 -> 0 (630, getStoreDistances', -);
}

automaton getProductIds (630) {
	state 0, 1;
	init 0;
	trans 
		0 -> 1 (-, getProductIds, 630),
		1 -> 0 (630, getProductIds', -);
}

composite ProductDispatcher {
	orderProductsAvailableAtOtherStores, sumUpIncomingProducts, markProductsUnavailableInStockPD, createProductMovements, getOfferedStockItemsPerStore, letAllStoresFlushDatabase, getStoreDistances, getProductIds, AmplStarter;
	restrictL 
		(-, sumUpIncomingProducts, 630), (630, sumUpIncomingProducts', -),
		(-, markProductsUnavailableInStockPD, 630), (630, markProductsUnavailableInStockPD', -), (630, exceptionMarkProductsUnavailableInStockPD, -),
		(-, createProductMovements, 630), (630, createProductMovements', -),
		(-, getOfferedStockItemsPerStore, 630), (630, getOfferedStockItemsPerStore', -), (630, exceptionGetOfferedStockItemsPerStore, -),
		(-, letAllStoresFlushDatabase, 630), (630, letAllStoresFlushDatabase', -), 
		(-, getStoreDistances, 630), (630, getStoreDistances', -),
		(-, getProductIds, 630), (630, getProductIds', -),

		(630, sumUpIncomingProducts, -), (-, sumUpIncomingProducts', 630),
		(630, markProductsUnavailableInStockPD, -), (-, markProductsUnavailableInStockPD', 630), (-, exceptionMarkProductsUnavailableInStockPD, 630),
		(630, createProductMovements, -), (-, createProductMovements', 630),
		(630, getOfferedStockItemsPerStore, -), (-, getOfferedStockItemsPerStore', 630), (-, exceptionGetOfferedStockItemsPerStore, 630),
		(630, letAllStoresFlushDatabase, -), (-, letAllStoresFlushDatabase', 630),
		(630, getStoreDistances, -), (-, getStoreDistances', 630),
		(630, getProductIds, -), (-, getProductIds', 630),

		(-, solveOptimization, 630), (630, solveOptimization', -), (630, exceptionSolveOptimization, -),

		(630, solveOptimization, -), (-, solveOptimization', 630), (-, exceptionSolveOptimization, 630);
}





		/********** Application **********/


composite Application {
	StoreApplication, ReportingApplication, ProductDispatcher;
	restrictL 
		(-, orderProductsAvailableAtOtherStores, 630), (630, orderProductsAvailableAtOtherStores', -), (630, exceptionOrderProductsAvailableAtOtherStores, -),
		(610, orderProductsAvailableAtOtherStores, -), (-, orderProductsAvailableAtOtherStores', 610), (-, exceptionOrderProductsAvailableAtOtherStores, 610);
}





		/********** GUI begin **********/


			/********** StoreGUI **********/


automaton StoreGUI (710) {
	state  000, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 201, 202, 203, 204, 205, 206, 207, 208, 209, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 401, 402, 403, 404, 501, 502, 503, 504;
	init 000;
	trans 
		// createAndShowGUI
		000 -> 101 (-, createAndShowGUI, 710),

		101 -> 102 (710, refreshStoreDescr, 710),
		102 -> 103 (710, getStore, -),
		103 -> 104 (-, getStore', 710),
		103 -> 105 (-, exceptionGetStore, 710),
		105 -> 104 (-, getStore', 710),
		104 -> 106 (710, refreshStoreDescr', 710),
	
	    106 -> 107 (710, refreshProductSupplierTableModel, 710),
	    107 -> 108 (710, getAllProducts, -),
	    108 -> 109 (-, getAllProducts', 710),
	    108 -> 110 (-, exceptionGetAllProducts, 710),
		110 -> 109 (-, getAllProducts', 710),
		109 -> 111 (710, refreshProductSupplierTableModel', 710),

		111 -> 112 (710, refreshProductStockItemTableModel, 710),
		112 -> 113 (710, getProductsWithLowStock, -),
		113 -> 114 (-, getProductsWithLowStock', 710),
		113 -> 115 (-, exceptionGetProductsWithLowStock, 710),
		115 -> 114 (-, getProductsWithLowStock', 710),
		114 -> 116 (710, refreshProductStockItemTableModel', 710),

		116 -> 117 (710, refreshProductSupplierStockItemTableModel, 710),
		117 -> 118 (710, getAllProductsWithOptionalStockItem, -),
		118 -> 119 (-, getAllProductsWithOptionalStockItem', 710),
		118 -> 120 (-, exceptionGetAllProductsWithOptionalStockItem, 710),
		120 -> 119 (-, getAllProductsWithOptionalStockItem', 710),
		119 -> 121 (710, refreshProductSupplierStockItemTableModel', 710),

		121 -> 122 (710, refreshProductSupplierOrderTableModel, 710),
		122 -> 123 (710, getAllProducts, -),
		123 -> 124 (-, getAllProducts', 710),
		123 -> 125 (-, exceptionGetAllProducts, 710),
		125 -> 124 (-, getAllProducts', 710),
		124 -> 126 (710, refreshProductSupplierOrderTableModel', 710),

		126 -> 000 (710, createAndShowGUI', -),


		// btnOrder
		000 -> 201 (-, btnOrder, 710),

	    201 -> 202 (710, orderProducts, -),
	    202 -> 203 (-, orderProducts', 710),
	    202 -> 204 (-, exceptionOrderProducts, 710),
	    204 -> 203 (-, orderProducts', 710),

	    203 -> 205 (710, refreshProductSupplierOrderTableModel, 710),
	    205 -> 206 (710, getAllProducts, -),
	    206 -> 207 (-, getAllProducts', 710),
	    206 -> 208 (-, exceptionGetAllProducts, 710),
	    208 -> 207 (-, getAllProducts', 710),
	    207 -> 209 (710, refreshProductSupplierOrderTableModel', 710),

	    209 -> 000 (710, btnOrder', -),


		// btnRefresh
		000 -> 301 (-, btnRefresh, 710),

		301 -> 302 (710, refreshProductSupplierTableModel, 710),
		302 -> 303 (710, getAllProducts, -),
		303 -> 304 (-, getAllProducts', 710),
		303 -> 305 (-, exceptionGetAllProducts, 710),
		305 -> 304 (-, getAllProducts', 710),
		304 -> 306 (710, refreshProductSupplierTableModel', 710),

		306 -> 307 (710, refreshProductStockItemTableModel, 710),
		307 -> 308 (710, getProductsWithLowStock, -),
		308 -> 309 (-, getProductsWithLowStock', 710),
		308 -> 310 (-, exceptionGetProductsWithLowStock, 710),
		310 -> 309 (-, getProductsWithLowStock', 710),
		309 -> 311 (710, refreshProductStockItemTableModel', 710),

		311 -> 312 (710, refreshProductSupplierStockItemTableModel, 710),
		312 -> 313 (710, getAllProductsWithOptionalStockItem, -),
		313 -> 314 (-, getAllProductsWithOptionalStockItem', 710),
		313 -> 315 (-, exceptionGetAllProductsWithOptionalStockItem, 710),
		315 -> 314 (-, getAllProductsWithOptionalStockItem', 710),
		314 -> 316 (710, refreshProductSupplierStockItemTableModel', 710),

		316 -> 317 (710, refreshProductSupplierOrderTableModel, 710),
		317 -> 318 (710, getAllProducts, -),
		318 -> 319 (-, getAllProducts', 710),
		318 -> 320 (-, exceptionGetAllProducts, 710),
		320 -> 319 (-, getAllProducts', 710),
		319 -> 321 (710, refreshProductSupplierOrderTableModel', 710),

		321 -> 322 (710, refreshStoreDescr, 710),
		322 -> 323 (710, getStore, -),
		323 -> 324 (-, getStore', 710),
		323 -> 325 (-, exceptionGetStore, 710),
		325 -> 324 (-, getStore', 710),
		324 -> 326 (710, refreshStoreDescr', 710),

		326 -> 000 (710, btnRefresh', -),


		// btnRollIn
	    000 -> 401 (-, btnRollIn, 710),
		401 -> 402 (710, rollInReceivedOrder, -),
		402 -> 403 (-, rollInReceivedOrder', 710),
		402 -> 404 (-, exceptionRollInReceivedOrder, 710),
		404 -> 403 (-, rollInReceivedOrder', 710),
		403 -> 000 (710, btnRollIn', -),


		// enterNewPrice
		000 -> 501 (-, enterNewPrice, 710),
		501 -> 000 (710, enterNewPrice', -),
		501 -> 502 (710, changePrice, -),
		502 -> 503 (-, changePrice', 710),
		502 -> 504 (-, exceptionChangePrice, 710),
		504 -> 503 (-, changePrice', 710),
		503 -> 000 (710, enterNewPrice', -);
}





			/********** ReportingGUI **********/


automaton ReportingGUI (720) {
	state  000, 101, 102, 103, 104, 201, 202, 203, 204, 301, 302, 303, 304;
	init 000;
	trans 
		// btnMTDeliveryReport
		000 -> 101 (-, btnMTDeliveryReport, 720),
		101 -> 000 (720, btnMTDeliveryReport', -),
		101 -> 102 (720, getMeanTimeToDeliveryReport, -),
		102 -> 103 (-, getMeanTimeToDeliveryReport', 720),
		102 -> 104 (-, exceptionGetMeanTimeToDeliveryReport, 720),
		104 -> 103 (-, getMeanTimeToDeliveryReport', 720),
		103 -> 000 (720, btnMTDeliveryReport', -),

		// btnStoreStockReport
		000 -> 201 (-, btnStoreStockReport, 720),
		201 -> 000 (720, btnStoreStockReport', -),
		201 -> 202 (720, getStockReportStore, -),
		202 -> 203 (-, getStockReportStore', 720),
		202 -> 204 (-, exceptionGetStockReportStore, 720),
		204 -> 203 (-, getStockReportStore', 720),
		203 -> 000 (720, btnStoreStockReport', -),

		// btnEnterpriseStockReport
		000 -> 301 (-, btnEnterpriseStockReport, 720),
		301 -> 000 (720, btnEnterpriseStockReport', -),
		301 -> 302 (720, getStockReportEnterprise, -),
		302 -> 303 (-, getStockReportEnterprise', 720),
		302 -> 304 (-, exceptionGetStockReportEnterprise, 720),
		304 -> 303 (-, getStockReportEnterprise', 720),
		303 -> 000 (720, btnEnterpriseStockReport', -);
}





		/********** GUI **********/


composite GUI {
	StoreGUI, ReportingGUI;
}





	/********** Inventory **********/


composite Inventory {
	GUI, Application, Data;
	restrictL 
		
		// Data Persistence - 1
		(-, getPersistenceContext, 511), (511, getPersistenceContext', -),
			(-, PersistenceContextImplD, 511), (511, PersistenceContextImplD', -),
			(-, getTransactionContext, 511), (511, getTransactionContext', -),
			(-, makePersistent, 511), (511, makePersistent', -), (511, exceptionMakePersistent, -),
			(-, close, 511), (511, close', -),
		(-, TransactionContextImplD, 511), (511, TransactionContextImplD', -),
		(-, beginTransaction, 511), (511, beginTransaction', -),
		(-, commit, 511), (511, commit', -), (511, exceptionCommit, -), 
		(-, rollback, 511), (511, rollback', -), (511, exceptionRollback, -),
		(-, isActive, 511), (511, isActive', -), (511, exceptionIsActive, -),


		// Data Persistence - 2
		(-, getPersistenceContext, 512), (512, getPersistenceContext', -),
			(-, PersistenceContextImplD, 512), (512, PersistenceContextImplD', -),
			(-, getTransactionContext, 512), (512, getTransactionContext', -),
			(-, makePersistent, 512), (512, makePersistent', -), (512, exceptionMakePersistent, -),
			(-, close, 512), (512, close', -),
		(-, TransactionContextImplD, 512), (512, TransactionContextImplD', -),
		(-, beginTransaction, 512), (512, beginTransaction', -),
		(-, commit, 512), (512, commit', -), (512, exceptionCommit, -), 
		(-, rollback, 512), (512, rollback', -), (512, exceptionRollback, -),
		(-, isActive, 512), (512, isActive', -), (512, exceptionIsActive, -),


		// Data Persistence - 3
		(-, getPersistenceContext, 513), (513, getPersistenceContext', -),
			(-, PersistenceContextImplD, 513), (513, PersistenceContextImplD', -),
			(-, getTransactionContext, 513), (513, getTransactionContext', -),
			(-, makePersistent, 513), (513, makePersistent', -), (513, exceptionMakePersistent, -),
			(-, close, 513), (513, close', -),
		(-, TransactionContextImplD, 513), (513, TransactionContextImplD', -),
		(-, beginTransaction, 513), (513, beginTransaction', -),
		(-, commit, 513), (513, commit', -), (513, exceptionCommit, -), 
		(-, rollback, 513), (513, rollback', -), (513, exceptionRollback, -),
		(-, isActive, 513), (513, isActive', -), (513, exceptionIsActive, -),


		// Data Enterprise - 1
		(-, queryEnterpriseById, 531), (531, queryEnterpriseById', -), (531, exceptionQueryEnterpriseById, -), 
		(-, getMeanTimeToDelivery, 531), (531, getMeanTimeToDelivery', -),


		// Data Enterprise - 2
		(-, queryEnterpriseById, 532), (532, queryEnterpriseById', -), (532, exceptionQueryEnterpriseById, -), 
		(-, getMeanTimeToDelivery, 532), (532, getMeanTimeToDelivery', -),


		// Data Enterprise - 3
		(-, queryEnterpriseById, 533), (533, queryEnterpriseById', -), (533, exceptionQueryEnterpriseById, -), 
		(-, getMeanTimeToDelivery, 533), (533, getMeanTimeToDelivery', -),


		// Data Store - 1
		(-, queryLowStockItems, 521), (521, queryLowStockItems', -), (521, exceptionQueryLowStockItems, -),
		(-, queryAllStockItems, 521), (521, queryAllStockItems', -), (521, exceptionQueryAllStockItems, -),
		(-, queryOrderById, 521), (521, queryOrderById', -),
		(-, queryStoreById, 521), (521, queryStoreById', -),
		(-, queryProducts, 521), (521, queryProducts', -), (521, exceptionQueryProducts, -),
		(-, queryStockItem, 521), (521, queryStockItem', -), (521, exceptionQueryStockItem, -),
		(-, queryStockItemById, 521), (521, queryStockItemById', -), (521, exceptionQueryStockItemById, -),
		(-, queryProductById, 521), (521, queryProductById', -), (521, exceptionQueryProductById, -),
		(-, queryStockItems, 521), (521, queryStockItems', -), (521, exceptionQueryStockItems, -),


		// Data Store - 2
		(-, queryLowStockItems, 522), (522, queryLowStockItems', -), (522, exceptionQueryLowStockItems, -),
		(-, queryAllStockItems, 522), (522, queryAllStockItems', -), (522, exceptionQueryAllStockItems, -),
		(-, queryOrderById, 522), (522, queryOrderById', -),
		(-, queryStoreById, 522), (522, queryStoreById', -),
		(-, queryProducts, 522), (522, queryProducts', -), (522, exceptionQueryProducts, -),
		(-, queryStockItem, 522), (522, queryStockItem', -), (522, exceptionQueryStockItem, -),
		(-, queryStockItemById, 522), (522, queryStockItemById', -), (522, exceptionQueryStockItemById, -),
		(-, queryProductById, 522), (522, queryProductById', -), (522, exceptionQueryProductById, -),
		(-, queryStockItems, 522), (522, queryStockItems', -), (522, exceptionQueryStockItems, -),


		// Data Store - 3
		(-, queryLowStockItems, 523), (523, queryLowStockItems', -), (523, exceptionQueryLowStockItems, -),
		(-, queryAllStockItems, 523), (523, queryAllStockItems', -), (523, exceptionQueryAllStockItems, -),
		(-, queryOrderById, 523), (523, queryOrderById', -),
		(-, queryStoreById, 523), (523, queryStoreById', -),
		(-, queryProducts, 523), (523, queryProducts', -), (523, exceptionQueryProducts, -),
		(-, queryStockItem, 523), (523, queryStockItem', -), (523, exceptionQueryStockItem, -),
		(-, queryStockItemById, 523), (523, queryStockItemById', -), (523, exceptionQueryStockItemById, -),
		(-, queryProductById, 523), (523, queryProductById', -), (523, exceptionQueryProductById, -),
		(-, queryStockItems, 523), (523, queryStockItems', -), (523, exceptionQueryStockItems, -),
	

		// Application Store
										// provides
		(-, changePrice, 610), (610, changePrice', -), (610, exceptionChangePrice, -),
		(-, getAllProducts, 610), (610, getAllProducts', -), (610, exceptionGetAllProducts, -),
		(-, getAllProductsWithOptionalStockItem, 610), (610, getAllProductsWithOptionalStockItem', -), (610, exceptionGetAllProductsWithOptionalStockItem, -),
		(-, getOrder, 610), (610, getOrder', -), (610, exceptionGetOrder, -),
		(-, getProductsWithLowStock, 610), (610, getProductsWithLowStock', -), (610, exceptionGetProductsWithLowStock, -),
		(-, getStore, 610), (610, getStore', -), (610, exceptionGetStore, -),
		(-, orderProducts, 610), (610, orderProducts', -), (610, exceptionOrderProducts, -),
		(-, rollInReceivedOrder, 610), (610, rollInReceivedOrder', -), (610, exceptionRollInReceivedOrder, -),
		(-, getStockItems, 610), (610, getStockItems', -), (610, exceptionGetStockItems, -),
		(-, markProductsUnavailableInStock, 610), (610, markProductsUnavailableInStock', -), (610, exceptionMarkProductsUnavailableInStock, -),
										
										// requires from Persistence
		(610, getPersistenceContext, -), (-, getPersistenceContext', 610),
			(610, PersistenceContextImplD, -), (-, PersistenceContextImplD', 610),
			(610, makePersistent, -), (-, makePersistent', 610), (-, exceptionMakePersistent, 610), 
			(610, close, -), (-, close', 610),
			(610, getTransactionContext, -), (-, getTransactionContext', 610),
		(610, TransactionContextImplD, -), (-, TransactionContextImplD', 610),
		(610, beginTransaction, -), (-, beginTransaction', 610),
		(610, commit, -), (-, commit', 610), (-, exceptionCommit, 610), 
		(610, isActive, -), (-, isActive', 610), (-, exceptionIsActive, 610),
		(610, rollback, -), (-, rollback', 610), (-, exceptionRollback, 610),

		(610, getPersistenceContext, 512), (512, getPersistenceContext', 610),
			(610, PersistenceContextImplD, 512), (512, PersistenceContextImplD', 610),
			(610, makePersistent, 512), (512, makePersistent', 610), (512, exceptionMakePersistent, 610), 
			(610, close, 512), (512, close', 610),
			(610, getTransactionContext, 512), (512, getTransactionContext', 610),
		(610, TransactionContextImplD, 512), (512, TransactionContextImplD', 610),
		(610, beginTransaction, 512), (512, beginTransaction', 610),
		(610, commit, 512), (512, commit', 610), (512, exceptionCommit, 610), 
		(610, isActive, 512), (512, isActive', 610), (512, exceptionIsActive, 610),
		(610, rollback, 512), (512, rollback', 610), (512, exceptionRollback, 610),

		(610, getPersistenceContext, 513), (513, getPersistenceContext', 610),
			(610, PersistenceContextImplD, 513), (513, PersistenceContextImplD', 610),
			(610, makePersistent, 513), (513, makePersistent', 610), (513, exceptionMakePersistent, 610), 
			(610, close, 513), (513, close', 610),
			(610, getTransactionContext, 513), (513, getTransactionContext', 610),
		(610, TransactionContextImplD, 513), (513, TransactionContextImplD', 610),
		(610, beginTransaction, 513), (513, beginTransaction', 610),
		(610, commit, 513), (513, commit', 610), (513, exceptionCommit, 610), 
		(610, isActive, 513), (513, isActive', 610), (513, exceptionIsActive, 610),
		(610, rollback, 513), (513, rollback', 610), (513, exceptionRollback, 610),
										
										// requires from Store
		(610, queryStockItem, -), (-, queryStockItem', 610), (-, exceptionQueryStockItem, 610),
		(610, queryStockItemById, -), (-, queryStockItemById', 610), (-, exceptionQueryStockItemById, 610), 
		(610, queryProducts, -), (-, queryProducts', 610), (-, exceptionQueryProducts, 610),
		(610, queryOrderById, -), (-, queryOrderById', 610),
		(610, queryLowStockItems, -), (-, queryLowStockItems', 610), (-, exceptionQueryLowStockItems, 610), 
		(610, queryStoreById, -), (-, queryStoreById', 610),
		(610, queryProductById, -), (-, queryProductById', 610), (-, exceptionQueryProductById, 610), 

		(610, queryStockItem, 522), (522, queryStockItem', 610), (522, exceptionQueryStockItem, 610),
		(610, queryStockItemById, 522), (522, queryStockItemById', 610), (522, exceptionQueryStockItemById, 610), 
		(610, queryProducts, 522), (522, queryProducts', 610), (522, exceptionQueryProducts, 610),
		(610, queryOrderById, 522), (522, queryOrderById', 610),
		(610, queryLowStockItems, 522), (522, queryLowStockItems', 610), (522, exceptionQueryLowStockItems, 610), 
		(610, queryStoreById, 522), (522, queryStoreById', 610),
		(610, queryProductById, 522), (522, queryProductById', 610), (522, exceptionQueryProductById, 610), 

		(610, queryStockItem, 523), (523, queryStockItem', 610), (523, exceptionQueryStockItem, 610),
		(610, queryStockItemById, 523), (523, queryStockItemById', 610), (523, exceptionQueryStockItemById, 610), 
		(610, queryProducts, 523), (523, queryProducts', 610), (523, exceptionQueryProducts, 610),
		(610, queryOrderById, 523), (523, queryOrderById', 610),
		(610, queryLowStockItems, 523), (523, queryLowStockItems', 610), (523, exceptionQueryLowStockItems, 610), 
		(610, queryStoreById, 523), (523, queryStoreById', 610),
		(610, queryProductById, 523), (523, queryProductById', 610), (523, exceptionQueryProductById, 610), 


		// Application Reporting
										// provides
		(-, getMeanTimeToDeliveryReport, 620), (620, getMeanTimeToDeliveryReport', -), (620, exceptionGetMeanTimeToDeliveryReport, -),
		(-, getStockReportStore, 620), (620, getStockReportStore', -), (620, exceptionGetStockReportStore, -),
		(-, getStockReportEnterprise, 620), (620, getStockReportEnterprise', -), (620, exceptionGetStockReportEnterprise, -),

										// requires from Persistence
		(620, getPersistenceContext, -), (-, getPersistenceContext', 620),
			(620, PersistenceContextImplD, -), (-, PersistenceContextImplD', 620),
			(620, close, -), (-, close', 620),
			(620, getTransactionContext, -), (-, getTransactionContext', 620),
		(620, TransactionContextImplD, -), (-, TransactionContextImplD', 620),
		(620, beginTransaction, -), (-, beginTransaction', 620),
		(620, commit, -), (-, commit', 620), (-, exceptionCommit, 620), 
		(620, isActive, -), (-, isActive', 620), (-, exceptionIsActive, 620),
		(620, rollback, -), (-, rollback', 620), (-, exceptionRollback, 620),

		(620, getPersistenceContext, 511), (511, getPersistenceContext', 620),
			(620, PersistenceContextImplD, 511), (511, PersistenceContextImplD', 620),
			(620, close, 511), (511, close', 620),
			(620, getTransactionContext, 511), (511, getTransactionContext', 620),
		(620, TransactionContextImplD, 511), (511, TransactionContextImplD', 620),
		(620, beginTransaction, 511), (511, beginTransaction', 620),
		(620, commit, 511), (511, commit', 620), (511, exceptionCommit, 620), 
		(620, isActive, 511), (511, isActive', 620), (511, exceptionIsActive, 620),
		(620, rollback, 511), (511, rollback', 620), (511, exceptionRollback, 620),

		(620, getPersistenceContext, 513), (513, getPersistenceContext', 620),
			(620, PersistenceContextImplD, 513), (513, PersistenceContextImplD', 620),
			(620, close, 513), (513, close', 620),
			(620, getTransactionContext, 513), (513, getTransactionContext', 620),
		(620, TransactionContextImplD, 513), (513, TransactionContextImplD', 620),
		(620, beginTransaction, 513), (513, beginTransaction', 620),
		(620, commit, 513), (513, commit', 620), (513, exceptionCommit, 620), 
		(620, isActive, 513), (513, isActive', 620), (513, exceptionIsActive, 620),
		(620, rollback, 513), (513, rollback', 620), (513, exceptionRollback, 620),

										// requires from Store
		(620, queryStoreById, -), (-, queryStoreById', 620),
		(620, queryAllStockItems, -), (-, queryAllStockItems', 620), (-, exceptionQueryAllStockItems, 620),

		(620, queryStoreById, 521), (521, queryStoreById', 620),
		(620, queryAllStockItems, 521), (521, queryAllStockItems', 620), (521, exceptionQueryAllStockItems, 620),

		(620, queryStoreById, 523), (523, queryStoreById', 620),
		(620, queryAllStockItems, 523), (523, queryAllStockItems', 620), (523, exceptionQueryAllStockItems, 620),

										// requires from Enterprise
		(620, queryEnterpriseById, -), (-, queryEnterpriseById', 620), (-, exceptionQueryEnterpriseById, 620), 
		(620, getMeanTimeToDelivery, -), (-, getMeanTimeToDelivery', 620),

		(620, queryEnterpriseById, 531), (531, queryEnterpriseById', 620), (531, exceptionQueryEnterpriseById, 620), 
		(620, getMeanTimeToDelivery, 531), (531, getMeanTimeToDelivery', 620),

		(620, queryEnterpriseById, 533), (533, queryEnterpriseById', 620), (533, exceptionQueryEnterpriseById, 620), 
		(620, getMeanTimeToDelivery, 533), (533, getMeanTimeToDelivery', 620),


		// ProductDispatcher
		(630, markProductsUnavailableInStock, -), (-, markProductsUnavailableInStock', 630), (-, exceptionMarkProductsUnavailableInStock, 630),

		(630, getPersistenceContext, -), (-, getPersistenceContext', 630),
		(630, PersistenceContextImplD, -), (-, PersistenceContextImplD', 630),
			(630, queryStockItems, -), (-, queryStockItems', 630), (-, exceptionQueryStockItems, 630),
			(630, queryStoreById, -), (-, queryStoreById', 630),
			(630, queryProductById, -), (-, queryProductById', 630), (-, exceptionQueryProductById, 630),
		(630, queryEnterpriseById, -), (-, queryEnterpriseById', 630), (-, exceptionQueryEnterpriseById, 630),

		(630, getPersistenceContext, 511), (511, getPersistenceContext', 630),
		(630, PersistenceContextImplD, 511), (511, PersistenceContextImplD', 630),
			(630, queryStockItems, 521), (521, queryStockItems', 630), (521, exceptionQueryStockItems, 630),
			(630, queryStoreById, 521), (521, queryStoreById', 630),
			(630, queryProductById, 521), (521, queryProductById', 630), (521, exceptionQueryProductById, 630),
		(630, queryEnterpriseById, 531), (531, queryEnterpriseById', 630), (531, exceptionQueryEnterpriseById, 630),

		(630, getPersistenceContext, 512), (512, getPersistenceContext', 630),
		(630, PersistenceContextImplD, 512), (512, PersistenceContextImplD', 630),
			(630, queryStockItems, 522), (522, queryStockItems', 630), (522, exceptionQueryStockItems, 630),
			(630, queryStoreById, 522), (522, queryStoreById', 630),
			(630, queryProductById, 522), (522, queryProductById', 630), (522, exceptionQueryProductById, 630),
		(630, queryEnterpriseById, 532), (532, queryEnterpriseById', 630), (532, exceptionQueryEnterpriseById, 630),


		// GUI Store
		(710, orderProducts, -), (-, orderProducts', 710), (-, exceptionOrderProducts, 710),
		(710, rollInReceivedOrder, -), (-, rollInReceivedOrder', 710), (-, exceptionRollInReceivedOrder, 710),
		(710, changePrice, -), (-, changePrice', 710), (-, exceptionChangePrice, 710), 
		(710, getStore, -), (-, getStore', 710), (-, exceptionGetStore, 710), 
		(710, getAllProducts, -), (-, getAllProducts', 710), (-, exceptionGetAllProducts, 710), 
		(710, getProductsWithLowStock, -), (-, getProductsWithLowStock', 710), (-, exceptionGetProductsWithLowStock, 710), 
		(710, getAllProductsWithOptionalStockItem, -), (-, getAllProductsWithOptionalStockItem', 710), (-, exceptionGetAllProductsWithOptionalStockItem, 710),


		// GUI Reporting
		(720, getMeanTimeToDeliveryReport, -), (-, getMeanTimeToDeliveryReport', 720), (-, exceptionGetMeanTimeToDeliveryReport, 720),
		(720, getStockReportStore, -), (-, getStockReportStore', 720), (-, exceptionGetStockReportStore, 720),
		(720, getStockReportEnterprise, -), (-, getStockReportEnterprise', 720), (-, exceptionGetStockReportEnterprise, 720);
}





/********** TradingSystem **********/


composite TradingSystem {
	CashDeskLine, Inventory;
	restrictL 
		// CashDeskLine : CashDeskApplication
		(100, getProductWithStockItem, -), (-, getProductWithStockItem', 100), (-, exceptionGetProductWithStockItem, 100),

		// CashDeskLine : ExtCommChannel
		(300, onEventExtAccountSale, -), (-, onEventExtAccountSale', 300),

		// Inventory : Application Store
		(-, getProductWithStockItem, 610), (610, getProductWithStockItem', -), (610, exceptionGetProductWithStockItem, -),
		(-, onEventExtAccountSale, 610), (610, onEventExtAccountSale', -);
}


/********** User **********/

automaton SimpleCashier (910) {
  state 00, 01, 02;
  init 00;
  trans
    00 -> 01 (910, btnClose, -),
    01 -> 02 (-, btnClose', 910),

    02 -> 02 (910, sleep, 910);

}

/********** SystemAndUser **********/

composite SystemAndUser {
        TradingSystem,
SimpleCashier;

	restrictL 
		// CashDeskLine : CashBoxController
		(-, btn0, 111), (111, btn0', -), 
		(-, btn1, 111), (111, btn1', -), 
		(-, btn2, 111), (111, btn2', -), 
		(-, btn3, 111), (111, btn3', -), 
		(-, btn4, 111), (111, btn4', -), 
		(-, btn5, 111), (111, btn5', -), 
		(-, btn6, 111), (111, btn6', -), 
		(-, btn7, 111), (111, btn7', -), 
		(-, btn8, 111), (111, btn8', -), 
		(-, btn9, 111), (111, btn9', -), 
		(-, btnComma, 111), (111, btnComma', -), 
		(-, btnEnter, 111), (111, btnEnter', -), 
		(-, btnClose, 111), (111, btnClose', -), 
		(-, btnStartNewSale, 111), (111, btnStartNewSale', -), 
		(-, btnSaleFinished, 111), (111, btnSaleFinished', -), 
		(-, btnBarPayment, 111), (111, btnBarPayment', -), 
		(-, btnCardPayment, 111), (111, btnCardPayment', -), 
		(-, btnExpressMode, 111), (111, btnExpressMode', -), 

		// CashDeskLine : ScannerController
		(-, btnScanItem, 121), (121, btnScanItem', -),

		// CashDeskLine : CardReaderController
		(-, btnScanCard, 131), (131, btnScanCard', -), 
		(-, btnEnterPIN, 131), (131, btnEnterPIN', -), 

		// Inventory : GUI Store
		(-, createAndShowGUI, 710), (710, createAndShowGUI', -),
		(-, btnOrder, 710), (710, btnOrder', -),									// UC 3
		(-, btnRefresh, 710), (710, btnRefresh', -),
		(-, btnRollIn, 710), (710, btnRollIn', -),									// UC 4
		(-, enterNewPrice, 710), (710, enterNewPrice', -),							// UC 7

		// Inventory : GUI Reporting
		(-, btnMTDeliveryReport, 720), (720, btnMTDeliveryReport', -),				// UC 6
		(-, btnStoreStockReport, 720), (720, btnStoreStockReport', -),				// UC 5
		(-, btnEnterpriseStockReport, 720), (720, btnEnterpriseStockReport', -),

(910, btnClose, -), (-, btnClose', 910);
}

system SystemAndUser;
 property {
   state 0, 1, 2, 3, 4, 5, 6;
   init 0;
   accept 6;
   trans
     0 -> 0 { * -  (112, publishSaleSuccessEvent, 200) } { },
     0 -> 1 { (112, publishSaleSuccessEvent, 200) } { },
     1 -> 1 { * - (112, publishSaleSuccessEvent, 200), (200, exceptionPublishSaleSuccessEvent, 112), (200, onEventSaleSuccess, 162), (200, onEventSaleSuccess, 142) } { },
     1 -> 2 { (200, exceptionPublishSaleSuccessEvent, 112) } { },
     1 -> 3 { (200, onEventSaleSuccess, 162) } { },
     1 -> 4 { (200, onEventSaleSuccess, 142) } { },
     1 -> 6 { (112, publishSaleSuccessEvent, 200) } { },
     2 -> 1 { (112, publishSaleSuccessEvent, 200) } { },
     2 -> 2 { * - (112, publishSaleSuccessEvent, 200), (200, onEventSaleSuccess, 162), (200, onEventSaleSuccess, 142) } { },
     2 -> 6 { (200, onEventSaleSuccess, 162) } { },
     2 -> 6 { (200, onEventSaleSuccess, 142) } { },
     3 -> 3 { * - (112, publishSaleSuccessEvent, 200), (200, exceptionPublishSaleSuccessEvent, 112), (200, onEventSaleSuccess, 142) } { },
     3 -> 5 { (200, onEventSaleSuccess, 142) } { },
     3 -> 6 { (200, exceptionPublishSaleSuccessEvent, 112) } { },
     3 -> 6 { (112, publishSaleSuccessEvent, 200) } { },
     4 -> 4 { * - (112, publishSaleSuccessEvent, 200), (200, exceptionPublishSaleSuccessEvent, 112), (200, onEventSaleSuccess, 162) } { },
     4 -> 5 { (200, onEventSaleSuccess, 162) } { },
     4 -> 6 { (200, exceptionPublishSaleSuccessEvent, 112) } { },
     4 -> 6 { (112, publishSaleSuccessEvent, 200) } { },
     5 -> 1 { (112, publishSaleSuccessEvent, 200) } { },
     5 -> 6 { (200, exceptionPublishSaleSuccessEvent, 112) } { },
     5 -> 5 { * - (200, onEventSaleSuccess, 162), (200, onEventSaleSuccess, 142) } { },
     6 -> 6 { * } { };
 }

