Exhibit 10.4

October 19, 2007

Andrew Dahlkemper

Dear
Andrew:

I am happy to extend the following offer of employment to you with an anticipated start date of November 5, 2007 or earlier. This letter will
confirm the terms of your offer of employment with BEA Systems, Inc. (the Company).



| | 1. | Position and Responsibilities. You will report to Alfred Chuang, CEO and President, and serve in the position of Executive Vice President, Human Resources. You will assume
and discharge such responsibilities as are commensurate with such a position, for which we believe you are well qualified.
| | -- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | 2. | Compensation.
| | -- | -------------



| | a) | Salary. In consideration of your services, you will be paid a base salary of $13,958.33 per pay period (annualized base salary of $335,000), subject to withholding taxes. The
salary will be payable semi-monthly in accordance with the Companys standard payroll practices. Your base salary will be reviewed annually by the Compensation Committee and the CEO of the Company in accordance with our review guidelines.
| | -- | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | b) | Bonuses.In your role as Executive Vice President, Human Resources, you will be eligible to participate in the Companys Fiscal Year 2008 Executive Staff Bonus Plan (the
Plan) with a target bonus of 75% of your base salary, subject to pro-ration as provided below. Under this Plan, bonuses are generally based on the achievement of certain corporate goals and are subject to withholding tax. The Plan
document containing the terms and conditions of the Plan will be made available to you after you join the Company. Bonus eligibility is dependent upon your start date. To be eligible for a pro-rated bonus for this fiscal year, your first day at
the Company must be on or before November 5, 2007.
| | -- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

In addition, if you are still employed at the Company when bonuses
are paid under the Plan, you will be granted an additional bonus of $72,000 (subject to withholding taxes) as consideration for mid-cycle bonus forfeiture from your prior employer.



| | c) | Signing Bonus. Contingent upon your agreement to all of the terms of this letter, and your reporting for duty at a mutually agreeable date, you will be paid a $45,000 signing
bonus (subject to withholding taxes), payable within 30 days of your hire date.
| | -- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



---

| | 3. | Benefits. You will be entitled to receive employee benefits made available by the Company to similarly situated employees to the extent of your eligibility. The details of
our medical, dental, paid time off, and 401(k) programs will be discussed in our Orientation Program.
| | -- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | 4. | Severance. In the event of involuntary termination without Cause (as defined below), and provided you sign a general release of claims against the Company and its
directors, officers, employees, shareholders, agents, successors and assigns (in a form acceptable to the Company):
| | -- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | a) | if involuntary termination without Cause occurs within the first year of your employment at the Company, you will be provided a lump sum payment equal to six (6) months of base
salary and accelerated vesting of all outstanding equity awards that would have otherwise vested as of the one-year anniversary of your hire date; or
| | -- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | b) | if involuntary termination without Cause occurs on or after your first year of employment at the Company, you will be provided with a lump sum payment equal to six (6) months
of base salary.
| | -- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

In the event of either voluntary termination or involuntary termination with Cause, you will not
be entitled to any severance.

For purposes of this paragraph 4, the Company may terminate your employment for Cause if:
(i) you are convicted of, or plead no contest to, a crime of moral turpitude, or a fraud, felony or criminal act against the Company or any affiliated entity thereof or any of the assets of any of them; (ii) you engage in material
misconduct or dishonest conduct that is detrimental to the Company (or any affiliated entity); (iii) you breach your Employee Proprietary Information and Inventions Agreement with the Company; (iv) you demonstrate material unfitness or
unavailability for service or persistent unsatisfactory performance, which you fail to cure to the satisfaction of the Company for a period of (30) days following notice to you by the Company; or (v) your breach of the representations
contained in paragraph 9 herein that your employment with the Company will not breach any contract or agreement with any former or existing employer, which shall include but not be limited to you being enjoined or prohibited, by a preliminary
injunction of any court of competent jurisdiction, from performing all or a substantial portion of the duties which, in the Companys sole discretion, are critical to the position of Executive Vice President, Human Resources.



| | 5. | Continuity and Indemnification Agreements. Consistent with what has been provided to other executive officers of the Company, the Company is providing a Change in
Control agreement under separate cover that addresses specific severance and trigger events in the event of a change in control. If you receive any severance benefits under paragraph 4 above, those severance benefits shall offset and reduce
any severance payments or benefits that you may be entitled to under the terms of the Change of Control Agreement. As an executive officer of the Company, you will receive the Companys standard Indemnification Agreement for its executive
officers.
| | -- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | 6. | Stock Options. Under the terms and conditions of the Companys 2006 Stock Incentive Plan (the 2006 Plan), you will be recommended to receive
an option to purchase 175,000 shares of common stock of the Company. This recommendation will be considered for approval by the Companys Board of Directors or its authorized delegate (collectively, the Board) following your
commencement of employment with the Company in accordance with the Companys standard equity granting practices. Your
| | -- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



Page 2 of 5



---

| | entitlement to any stock option that may be approved is conditioned upon your signing the Companys stock option agreement and corresponding notice, and
is subject to their respective terms and the terms of the 2006 Plan. The 2006 Plan, including the stock option agreement and corresponding notice, will be provided to you separately.
| | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

If approved by the Board, the stock option that is granted to you will vest as follows: The first
thirty-three and one-third percent (33.33%) of the stock option shall vest on the one-year anniversary of your hire date (provided you are still employed with the Company on that date), subject to applicable laws and regulations. Thereafter, an
additional 1/36thof the stock option shall vest on each subsequent monthly anniversary of your hire date over the following 24 months (so long as you are
still employed by the Company on those dates), subject to applicable laws and regulations. The grant date will be the date of the Board approval. The exercise price will be the closing market price of the Companys common stock on the date of
the Board approval.

Restricted Stock Units. Under the terms and conditions of the 2006 Plan, you will be recommended to
receive 125,000 restricted stock units of the Company. This recommendation will be considered for approval by the Board following your commencement of employment with the Company and after the Company has filed its delayed periodic reports with the
Securities and Exchange Commission, and then in accordance with the Companys standard equity granting practices. Your entitlement to any restricted stock units that may be approved is conditioned upon your signing the Companys restricted
stock unit agreement and corresponding notice, and is subject to their respective terms and the terms of the 2006 Plan. The 2006 Plan, including the restricted stock unit agreement and corresponding notice, will be provided to you separately.

If approved by the Board, the restricted stock units that are granted to you will vest as follows: the first twenty-five percent
(25%) of the restricted stock units shall vest and be converted to stock on the one-year anniversary of the grant date (provided you are still employed by the Company on that date), subject to applicable laws and regulations. Thereafter, an
additional twenty-five percent (25%) of the restricted stock units shall vest and be converted to stock on each subsequent annual anniversary of the grant date over the following three years (provided you are still employed by the Company on
those dates), subject to applicable laws and regulations.



| | 7. | Confidential Information. You agree that you will execute the Companys Employee Proprietary Information and Inventions Agreement. You further agree that, at all times
during the term of your employment and thereafter, you will abide by the terms of said agreement. You recognize that the Company desires not to improperly obtain or use any proprietary information or trade secrets of any former employer or the
person or entity, and you agree to conduct yourself accordingly.
| | -- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | 8. | Conflicting Employment. Prior to receiving this offer of employment from the Company, you may have been engaged in another employment, occupation, consulting
or other business activity related to the business in which the Company is now involved or may become involved during the term of your employment. You acknowledge that your involvement in any such business activity shall cease prior to your
employment by the Company, and that, during the term of your employment, you will not engage in any employment, occupation, consulting or other business activity that conflicts with your obligations to the Company. You further represent that you
have disclosed to the Company the nature of any contracts or agreements that you have signed with a former
| | -- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



Page 3 of 5



---

| | or current employer, client or third party that may restrict, limit or otherwise affect the scope of your employment with the Company. You represent that you
are free to accept this offer of employment, and that, by doing so and/or performing any of your obligations as an employee of the Company, you are not now, and will not in the future, be breaching any contract or agreement with any former or
existing employer, client or third party.
| | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | 9. | Term of Employment. Your employment with the Company will be at will. This means that both you and the Company have the right to terminate your employment at any
time, with or without advanced notice, and with or without cause. The terms of your employment also may be altered at any time, with or without cause, at the discretion of the Company. No one other than the Board or CEO of the Company has the
authority to alter the at-will nature of your employment, to enter into an agreement for employment for a specified period of time, or to make any agreement contrary to the Companys policy of at-will employment. Any such agreement must be in
writing and must be signed by the CEO of the Company and by the affected employee.
| | -- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

This offer of employment is contingent upon the
following:



| | (a) | Completion of the Company Employment Application and Background Investigation Release.
| | --- | --------------------------------------------------------------------------------------



| | (b) | Successful completion of a routine background check as mentioned in the release you submitted with your application.
| | --- | --------------------------------------------------------------------------------------------------------------------



| | (c) | Securing an export license from the U.S. federal government, if required (to ensure the Companys compliance with U.S. export control laws and regulations).
| | --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (d) | Your signing of the Companys Employee Proprietary Information and Inventions Agreement.
| | --- | ----------------------------------------------------------------------------------------



| | (e) | Your signing of the attached Arbitration Agreement.
| | --- | ---------------------------------------------------



| | (f) | Completion of the Online New Hire Checklist within one week of your hire date.
| | --- | ------------------------------------------------------------------------------



| | (g) | Ability to show proof of your identity and legal right to work in the United States as required by the Immigration Reform and Control Act of 1986. Enclosed with this letter is a
copy of the Employment Eligibility Verification Form (I-9) instructions required by IRCA. Please review this document and bring the appropriate original documentation on your first day of work.
| | --- | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

We are excited about having you join the Company. Please acknowledge and confirm your acceptance of this offer by October 20, 2007 at which point the offer will
expire. You can accept by signing and returning the enclosed copy of this letter along with the required documents. If you have any questions about this offer letter, please call me at (408) 570-8000.

Sincerely,

Alfred S. Chuang

Founder, Chairman, Chief Executive Officer and President



Page 4 of 5



---

I accept the terms of my employment with the Company as set forth herein. I understand and acknowledge that this offer
letter represents the entire agreement concerning the subject matter of this letter, and supersedes all prior and contemporaneous agreements and representations. I sign this offer letter voluntarily and not in reliance on any promises other than
those contained in this letter.



|                      
|----------------------
|                      
|                      
|Andrew Dahlkemper     
|                      
|                      
|Date                  
|                      
|                      
|Anticipated Start Date



Page 5 of 5