S & H Contractors (S & H) appeals judgments entered, in two separate cases, by the District Court for the Northern District of Alabama and by the District Court for the Northern District of Georgia. The district court, in the first case, granted summary judgment in favor of A.J. Taft Coal Company (Taft) in a suit by S & H against Taft on a contract between those two parties. S & H appealed that judgment, but the appeal was stayed pending arbitration of the parties' dispute. The district court, in the second case, enjoined the arbitration proceedings, and S & H again appealed. The separate appeals were consolidated. We affirm both judgments.
I.
On May 23, 1984, Taft, an Alabama corporation, entered into a contract with Bucy-rus-Erie Company, a Delaware corporation with its principal place of business in Wisconsin, for the purchase of a disassembled “walking dragline” — a large excavating machine used in the coal mining industry. Bucyrus-Erie agreed to transport the drag-line parts to Alabama and to send several of its engineers to the assembly site to supervise the machine’s assembly, but Taft remained primarily responsible for assembling the dragline.
After entering into the contract with Bu-cyrus-Erie for the purchase of the drag-line, Taft decided to hire a contractor to assemble the dragline and entered into negotiations with S & H, a Kentucky corporation with its primary place of business in Kentucky. The negotiations culminated in a contract signed on December 6, 1984,1 under which S & H agreed to assemble the dragline under the supervision of the Bucy-rus-Erie engineers. At the time of the contract’s formation, S & H had not been qualified by Alabama’s secretary of state to do business in Alabama. In fact, S & H did not qualify to do business in Alabama until February 3, 1986.
On March 12, 1986, S & H filed a complaint in the United States District Court for the Northern District of Alabama, alleging inter alia that it had substantially performed its responsibilities under the contract and that Taft had breached the contract by failing to pay the amounts due for substantial performance and for extra work done by S & H. On March 31, 1986, Taft moved to dismiss the complaint on the ground that, because S & H failed to qualify to do business in Alabama before entering into its contract with Taft, the contract was unenforceable under Alabama’s forum-*1509closing laws. See Ala. Const, art. XII, § 232; Ala.Code § 10-2A-247 (1975). The district court took no action on the motion to dismiss for several months, and, during that period, S & H engaged in fairly extensive pretrial discovery. Then, on November 14, 1986, S & H demanded that Taft arbitrate the dispute under the auspices of the American Arbitration Association as required by an arbitration clause in the contract. On December 12, 1986, the district court converted Taft’s motion to dismiss to a motion for summary judgment and granted the motion, holding that S & H’s failure to qualify to do business made its contract with Taft unenforceable under Alabama’s forum-closing laws. The court therefore dismissed S & H’s complaint with prejudice. S & H appealed, but the appeal (No. 87-7028) was stayed pending the outcome of arbitration.
On February 3, 1987, Taft filed suit in the Northern District of Alabama to enjoin arbitration proceedings, arguing that the court had declared the entire contract void in its order dismissing S & H’s suit on the contract. On April 17, 1987, the court granted Taft’s prayer for relief and enjoined arbitration proceedings in Alabama. The court reasoned that, if the arbitration proceedings were conducted in Alabama, a federal district court in Alabama might be required to enforce the arbitrator’s award and, in effect, to enforce the underlying contract.2 In the court’s view, such a result would undermine Alabama’s public policy as expressed in its forum-closing laws.
S & H then petitioned the American Arbitration Association to transfer the arbitration proceedings to Atlanta, and the Association granted the petition. On March 29, 1988, Taft filed a complaint in the United States District Court for the Northern District of Georgia, requesting that court to enjoin the arbitration proceedings. Taft argued that the proceedings should be enjoined for two reasons: first, according to Taft, its contract with S & H was void for all purposes, and S & H could not demand arbitration under a void contract. Second, Taft argued that, by bringing suit on the contract in federal district court before demanding arbitration, S & H waived its right to demand arbitration. Taft then moved for summary judgment. The district court granted the motion and enjoined the arbitration proceedings. The court held that the contract was both unenforceable and void and thus the parties never agreed to submit to arbitration. The court declined to address the waiver issue. S & H again appealed, and that appeal (No. 88-8829) was consolidated with S & H’s earlier appeal from the district court’s dismissal of the contract action. We address each appeal in order.
II. S & H’s Suit on the Contract
Alabama’s constitution provides that, “[n]o foreign corporation shall do any business in this state without ... filing with the secretary of state a certified copy of its articles of incorporation or association.” Ala. Const, art. XII, § 232. This provision is enforced through the operation of Alabama’s forum-closing statute, which states that
[a]ll contracts or agreements made or entered into in this state by foreign corporations which have not obtained a certificate of authority to transact business in this state shall be held void at the action of such foreign corporation or any person claiming through or under such foreign corporation by virtue of said void contract or agreement; but nothing in this section shall abrogate the equitable rule that he who seeks equity must do equity....
Ala.Code § 10-2A-247(a) (1975).
In diversity cases, we apply a two-step analysis to determine whether Alabama’s forum-closing statute bars a foreign corporation’s contract claim. First, we determine whether Alabama courts, applying the statute, would refuse the foreign corporation’s request to enforce the contract. See Aim Leasing Corp. v. Heli*1510copter Medical Evacuation, Inc., 687 F.2d 354, 357 (11th Cir.1982). If we conclude that Alabama courts would close their doors to the foreign corporation, then we must examine the burden such a closing would place on interstate commerce: we will not enforce the forum-closing statute if its enforcement in a particular case would unduly burden interstate commerce in violation of the federal commerce clause. Id. We address the state law and federal law questions in turn and hold that the district court properly refused to enforce S & H’s contract with Taft.
A.
Alabama courts will not enforce a foreign corporation’s contract if (1) at the time the contract was entered into, the foreign corporation had not been qualified by the secretary of state to do business in Alabama, and (2) the foreign corporation was doing business of an intrastate nature in Alabama pursuant to the contract. See Sanwa Business Credit Corp. v. G.B. “Boots"Smith Corp., 548 So.2d 1336, 1337 (Ala.1989). S & H does not dispute that it had failed to qualify to do business in Alabama at the time it entered into the contract with Taft. It does argue, however, that the district court erred in holding that S & H was doing intrastate business in Alabama. We consider the district court’s holding on this issue to be sound.
The Alabama Supreme Court has held that a foreign corporation does business in Alabama, within the meaning of the forum-closing provisions, when the contract at issue must be performed by the foreign corporation in Alabama and the contract does not involve interstate commerce. See Sanjay, Inc. v. Duncan Constr. Co., 445 So.2d 876, 880 (Ala.1983). In other words, the foreign corporation’s activities must be “ ‘intrastate in nature.’ ” Sanwa, 548 So.2d at 1337 (quoting Johnson v. MPL Leasing Corp., 441 So.2d 904, 905 (Ala.1983)). Thus, Alabama courts generally hold that a foreign corporation’s sale and delivery of out-of-state goods is a transaction involving interstate commerce and enforce the contract underlying such a trans action. See, e.g., Loudonville Milling Co. v. Davis, 37 So.2d 659, 661 (Ala.1948).
The contract in this case, however, is not for the sale and delivery of goods; it is solely for the assembly of machinery in Alabama. The contract expressly provides that S & H must “completely erect and deliver [the dragline] to Taft ... at the place hereinafter called the ‘erection site’ ” in Alabama. We conclude that this contract clearly provides for a transaction of an intrastate nature.
S & H would have us believe that, merely because the sale and delivery of the disassembled dragline was a transaction involving interstate commerce, the erection of the dragline must also be a transaction involving interstate commerce. S & H argues that its construction services were “incidental” to the primary interstate transaction. The Alabama Supreme Court, however, has considered and rejected such an argument. The court has repeatedly held that “ ‘a foreign corporation doing construction work within a state is held to be doing business in that state and is not exempted from local regulation by the fact that it brings materials or laborers into the state.’ ” Sanwa, 548 So.2d at 1339 (quoting Computaflor Co. v. N.L. Blaum Constr. Co., 265 So.2d 850, 852 (Ala.1972)). For example, in Calvert Iron Works, Inc. v. Algernon Blair, Inc., 227 So.2d 424 (Ala.1969), a foreign corporation contracted to “furnish and erect [in Alabama] certain steel for a specified price.” Id. at 425. Thus, the contract provided for the sale and delivery of out-of-state goods but also required the foreign corporation to assemble those goods in Alabama. The Alabama Supreme Court held this transaction to be intrastate in nature and refused to enforce the contract. Id. at 425-26.
In the present ease, because S & H did not contract to supply the out-of-state materials to be assembled, the transaction at issue is even further removed from interstate commerce than the transactions at issue in Sanwa, Computaflor, and Calvert. We therefore hold that S & H was doing business in Alabama without having been qualified to do so and that Alabama *1511courts would refuse to enforce S & H’s contract with Taft.
B.
We now must examine the burden placed on interstate commerce by enforcing Alabama’s forum-closing statute in this case. Our analysis of this issue is guided, solely by federal constitutional law; therefore, our previous holding that, under state law, this transaction is intrastate in nature, does not affect our analysis of the constitutionality of enforcing the forum-closing statute in this case. The district court failed to address this federal constitutional question, apparently operating under the misconception that the federal commerce clause issue and the state law “doing business” issue are identical. The two inquiries are distinct, but we think, nevertheless, that the district court would have reached the same result had it considered the federal commerce clause question separately.
The transaction at issue has both interstate and intrastate aspects. Indeed, if we were inquiring into the constitutionality of federal regulation of this transaction, we would likely hold that the transaction involves “commerce which concerns more states than one,” see Gibbons v. Ogden, 22 U.S. (9 Wheat.) 1, 194, 6 L.Ed. 23 (1824), and would be properly subject to congressional regulation. When we are faced with state regulation of such a transaction, however, we ask a different question: Does the regulation, as applied to the transaction at issue, unduly burden interstate commerce? The Supreme Court has held that a state’s forum-closing statute does not unduly burden interstate commerce when the foreign corporation has “ ‘localized its business’ ” in the state and when it is not entering the state “ ‘to contribute to or to conclude a unitary interstate transaction.’ ” Allenberg Cotton Co. v. Pittman, 419 U.S. 20, 32-33, 95 S.Ct. 260, 267, 42 L.Ed.2d 195 (1974) (quoting Union Brokerage Co. v. Jensen, 322 U.S. 202, 210, 64 S.Ct. 967, 972, 88 L.Ed. 1227 (1944)).
Although the question of localization calls for an ad hoc inquiry into the facts of each case, we have canvassed the Supreme Court’s and this court’s relevant cases and have distilled two factors that consistently guide the courts’ decisions. First, the courts often focus on the permanence and scope of relationships between the foreign corporation and the forum state. See, e.g., Eli Lilly & Co. v. Sav-on-Drugs, Inc., 366 U.S. 276, 280-82, 81 S.Ct. 1316, 1319-20, 6 L.Ed.2d 288 (1961); Union Brokerage, 322 U.S. at 210, 64 S.Ct. at 972; SAR Mfg. Co. v. Dumas Bros. Mfg. Co., 526 F.2d 1283, 1284-86 (5th Cir.1976).3 Second, the courts frequently ask whether the intrastate transaction is an essential element of an interstate transaction. See, e.g., Allenberg Cotton Co. v. Pittman, 419 U.S. 20, 30, 95 S.Ct. 260, 266, 42 L.Ed.2d 195 (1974); York Mfg. Co. v. Colley, 247 U.S. 21, 24-26, 38 S.Ct. 430, 431-32, 62 L.Ed. 963 (1918); Diversacon Indus., Inc. v. National Bank of Commerce, 629 F.2d 1030, 1033 (5th Cir.1980). In our view, both factors weigh in favor of holding the transaction at issue here to be sufficiently localized to permit enforcement of Alabama’s forum-closing statute without violating the federal commerce clause.
Our analysis of the permanence and scope of S & H’s relations with Alabama begins with the Supreme Court’s decision in Eli Lilly, 366 U.S. at 276, 81 S.Ct. at 1316. Eli Lilly sought to enforce a contract in New Jersey against a New Jersey corporation, but a state court, relying on the state’s forum-closing statute, dismissed the complaint. Eli Lilly, an Indiana corporation, was actively engaged in the sale and delivery of goods in interstate commerce but had established a permanent branch office in New Jersey. Eli Lilly leased office space in the state and maintained a staff of approximately eighteen employees who were in frequent contact with the company's New Jersey customers. Id. at 279-81, 81 S.Ct. at 1319. The Supreme Court held that, given this degree of contact with *1512the State of New Jersey, the federal commerce clause would not be violated by enforcement of the state’s forum-closing statute against Eli Lilly. Id. at 280-82, 81 S.Ct. at 1319-20.
This court reached the same conclusion in SAR Manufacturing, 526 F.2d at 1283. In that case, a Texas corporation, prior to the transaction at issue, leased a warehouse in Alabama for the purpose of temporarily storing goods shipped from Texas to the corporation's Alabama customers. The foreign corporation employed several full- and part-time employees at the Alabama warehouse. Id. at 1284. All of the corporation’s business in Alabama was transacted out of the Alabama warehouse, with the exception of the actual manufacturing of the goods in Texas. This court found the facts of the case to be substantially similar to the facts of Eli Lilly and held that enforcement of the Alabama forum-closing statute was constitutional. Id. at 1285-86.
While the facts of the case at hand are not identical to the facts of either Eli Lilly or SAR, we think the facts are similar in many important respects. Although S & H apparently did not maintain a permanent presence in Alabama, the record indicates that assembly of the dragline, with no delays, would require almost one year. Furthermore, S & H had been engaged in similar projects in Alabama on at least four other occasions. To complete the dragline at issue here, S & H sent four or five part-time employees and one full-time employee to the erection site, leased apartments in the area for those employees, transported a substantial amount of equipment to the site, maintained a telephone system in a trailer on the site, and hired numerous other union employees for the job. In light of these facts, we have no difficulty in finding S & H’s relations with Alabama to be substantial and relatively permanent.
We also think that the transaction at issue here was not an essential or necessary element of an interstate transaction. We have compared this case with other cases in which the intrastate transaction was found to be a necessary element of an interstate transaction, and we think those cases are easily distinguishable from the present case. For example, in York Manufacturing, 247 U.S. at 21, 38 S.Ct. at 430, the transaction involved an interstate sale and delivery of a disassembled ice machine to be assembled in the forum state under the supervision of the manufacturer/seller’s engineer. Apparently, the machine was so complex that the engineer’s services were required to assemble the machine properly. Id. at 22, 38 S.Ct. at 431. The Court held that the forum-closing statute could not be enforced in that case because “the service to be done in [the forum] state as the result of an interstate commerce sale was essentially connected with the subject-matter of the sale, that is, might be made to appropriately inhere in the duty of performance.” Id. at 24, 38 S.Ct. at 431. The Court went on to distinguish those cases in which an “inherently intrastate [transaction] did not lose its essential nature because it formed part of an interstate commerce contract to which it had no necessary relation.” Id. at 26, 38 S.Ct. at 432 (emphasis added).
The Supreme Court returned to the subject in Allenberg Cotton, 419 U.S. at 20, 95 S.Ct. at 260. The underlying transaction in Allenberg involved a contract for the sale and delivery of cotton. The buyer, a foreign corporation, maintained a warehouse in the forum state and entered into contracts with local cotton farmers. Under the contract, which was a typical “forward” contract, the farmer promised to deliver a certain amount of cotton, grown during the next season, to the foreign corporation’s warehouse in the forum state. The foreign corporation then sorted the cotton at the warehouse and sold the cotton to buyers outside the forum state. The Court considered the importance of this type of contract to middlemen, such as the foreign corporation, who needed forward contracts to cover their expenses. See id. at 26, 95 S.Ct. at 264. The Court held that “[d]elivery of the cotton to a warehouse, taken in isolation, is an intrastate transaction. But that delivery is also essential for the completion of the interstate transac-*1513tion_” Id. at 30, 95 S.Ct. at 266. Therefore, the Court refused to enforce the state’s forum-closing statute. Id. at 34, 95 S.Ct. at 267; see also Diversacon, 629 F.2d at 1033 (forum-closing statute not enforced when intrastate transaction is “an integral part of an overall interstate pattern or transaction”).
Two key facts distinguish this case from Allenberg, York, and Diversacon. First, Taft did not even begin seeking a company to assemble the dragline until after it had entered into the contract to purchase the dragline from Bucyrus-Erie. Second, other companies, including an Alabama corporation and Taft itself, could have assembled the dragline. We would be ignoring reality if we concluded on these facts that the erection contract constituted a “necessary,” “essential,” or “integral” part of the interstate sale of the dragline.4 Indeed, entering into the erection contract might be better characterized as an afterthought— something that was not a precondition of the interstate sale and that Taft did not have to do in order to utilize the machine.
S & H’s relations with Alabama were significant and lengthy; furthermore, the erection contract was not an essential element of an interstate transaction. We therefore hold that S & H’s operations were sufficiently localized in Alabama to allow Alabama courts to enforce the forum-closing statute against S & H without offending the federal commerce clause. Thus, we affirm the district court’s order dismissing S & H’s suit on the contract.5
*1514III. Taft’s Suit to Enjoin Arbitration
As we note above, the District Court for the Northern District of Georgia granted Taft’s motion for summary judgment and enjoined arbitration on the ground that the contract between S & H and Taft was void for all purposes. The court refrained from addressing Taft’s argument that S & H, by bringing suit on the contract, waived its right to arbitrate under the contract. We affirm the district court’s order enjoining arbitration, but we do it for a different reason. We think that the issue whether the contract, and hence the arbitration clause, is void for all purposes presents extremely difficult questions of state law that we should avoid if possible. Indeed, in this case, there is no need to resolve these difficult questions of state law since, even if the arbitration clause is enforceable, S & H waived its right to arbitrate. Our determination of whether S & H waived its right to arbitration, as opposed to whether the contract is void under Alabama law, is controlled solely by federal law. See Huber, Hunt & Nichols, Inc. v. Architectural Stone Co., 625 F.2d 22, 25 & n. 8 (5th Cir.1980); E.C. Ernst, Inc. v. Manhattan Constr. Co., 551 F.2d 1026, 1040 (5th Cir.1977), cert. denied sub nom. Providence Hosp. v. Manhattan Constr. Co., 434 U.S. 1067, 98 S.Ct. 1246, 55 L.Ed.2d 769 (1978).
We have held that, despite the strong policy in favor of arbitration, see Moses H. Cone Memorial Hosp. v. Mercury Constr. Corp., 460 U.S. 1, 22-23, 103 S.Ct. 927, 940-41, 74 L.Ed.2d 765 (1983), a party may, by its conduct, waive its right to arbitration. See E.C. Ernst, Inc. v. Manhattan Constr. Co., 559 F.2d 268, 269 (5th Cir.1977). Thus, a party that “[s]ubstantially invok[es] the litigation machinery” prior to demanding arbitration may waive its right to arbitrate. Id. A party has waived its right to arbitrate if, “under the totality of the circumstances, the ... party has acted inconsistently with the arbitration right,” National Found. for Cancer Research v. A. G. Edwards & Sons, 821 F.2d 772, 774 (D.C.Cir.1987), and, in so acting, has in some way prejudiced the other party, Miller Brewing Co. v. Fort Worth Distrib. Co., 781 F.2d 494, 497 (5th Cir.1986). When determining whether the other party has been prejudiced, we may consider the length of delay in demanding arbitration and the expense incurred by that party from participating in the litigation process. See Frye v. Paine, Webber, Jackson & Curtis, Inc., 877 F.2d 396, 399 (5th Cir.1989), cert. denied, — U.S. -, 110 S.Ct. 1318, 108 L.Ed.2d 493 (1990).
In this case, S & H waited eight months from the time it filed its complaint to the time it demanded arbitration. See Miller Brewing, 781 F.2d at 497 (plaintiff waited eight months after filing suit in state court to announce intention to arbitrate). During that time, Taft filed two motions — a motion to dismiss and an opposition to S & H’s motion for discovery. Additionally, S & H took the depositions of five Taft employees (totalling approximately 430 pages) prior to demanding arbitration. We conclude from these facts that, as a matter of law, Taft was prejudiced by 5 & H’s delay in demanding arbitration and by its invocation of the litigation process. Furthermore, we find that S & H acted inconsistently with its arbitration right. S 6 H, therefore, has waived its right to arbitrate, and we affirm, on that ground, the district court’s order enjoining the arbitration proceedings.
IV.
For the foregoing reasons, we affirm both the judgment of the District Court for the Northern District of Alabama dismissing S & H’s suit on the contract and the judgment of the District Court for the Northern District of Georgia enjoining the arbitration proceedings.
AFFIRMED.
. There is some dispute over whether the contract was entered into in Alabama or Kentucky, but that dispute is irrelevant to our disposition of these appeals.
. The court rejected Taft’s characterization of its prior ruling as declaring the contract void for all purposes. Rather, the court explained that it had held the contract to be unenforceable in Alabama courts by the foreign corporation,
. In Bonner v. City of Prichard, 661 F.2d 1206, 1209 (11th Cir.1981) (en banc), this court adopted as binding precedent all decisions of the former Fifth Circuit handed down prior to October 1, 1981.
. In concluding that this case is controlled by York, the dissent fundamentally misreads that case. In York, the Court determined whether the state’s forum-closing statute could operate to preclude enforcement of the contract to supervise construction of the ice machine. The seller’s contract in York was much like the seller’s contract in this case. The York contract provided that the seller would ship the parts and would send an engineer to supervise assembly, but that the buyer would be responsible for providing mechanics to assemble the machine. See 247 U.S. at 22, 38 S.Ct. at 431. The Court, however, did not address the enforceability of the mechanics' contract; rather, it considered whether the seller’s contract to provide a supervisor could be enforced. Id. at 22-23, 38 S.Ct. at 431.
In this case, we are not asked to enforce Alabama’s forum-closing statute against Bucy-rus-Erie in a suit to recover payment for the services of Bucyrus-Erie’s engineer. That case would be controlled by York, and we would undoubtedly not enforce Alabama’s forum-closing statute. What we are asked to do is enforce the forum-closing statute against a party providing local construction services. Thus, the question is not, as the dissent maintains, whether assembly of the machine was complex and required supervision, but whether the service at issue "was essentially connected with the subject-matter of the sale, that is, might be made to appropriately inhere in the duty of performance." Id. at 24, 38 S.Ct. at 431 (emphasis added). Certainly, Bucyrus-Erie’s promise to send an engineer to supervise assembly was so essential to the sale that it could be considered part of Bucyrus-Erie’s "duty of performance.” In essence, that is what the dissent is arguing— unfortunately, the dissent is arguing about the wrong case. Since we are concerned only about S & H’s contract to provide construction services in Alabama, we must ask whether those services were so "essentially connected” to the sale of the dragline parts that they could be considered part of the seller’s (i.e. Bucyrus-Erie’s) “duty of performance." The facts clearly show that S & H’s services were not so connected to the sale.
Finally, the dissent seems to imply that if the machine (which has been sold in interstate commerce) is useless unless it is assembled, then assembling the machine is essentially connected to the sale. While this argument has some logical appeal, it completely rejects the teaching of Browning v. City of Waycross, 233 U.S. 16, 34 S.Ct. 578, 58 L.Ed. 828 (1914). In Waycross, which the York Court cited extensively and eventually distinguished, the Court held that the assembly of light poles, which had been shipped in interstate commerce, was a local activity. Id. at 22-23, 34 S.Ct. at 580. Obviously, light poles are useless unless assembled. Thus, while a "uselessness” test is appealing because of its easy application, the Supreme Court has indicated that something more than uselessness is needed to show an essential connection to an interstate sale.
. In its amended complaint, S & H also sought relief based on a theory of quantum meruit and requested the court to establish a lien on the dragline in favor of S & H. We note that S & H’s request for relief based on quantum meruit might have raised the difficult question of whether such a suit constitutes a suit on the contract within the meaning of the forum-closing statute. See First Bank v. Wells, 358 So.2d 435, 437 (Ala.1978) (forum-closing statute bars only suit on contract, not suits based on “equitable rights long recognized by our jurisprudence"). This question, however, has not been presented on appeal, and we therefore have no occasion to address it.