Random Compiler errors "The expression that you have entered is not valid."

Random Compiler errors "The expression that you have entered is not valid."

  • Comments 4

This was a very interesting bug that came up during the holidays; yeap we were busy troubleshooting over Christmas :).

The issue was very intermittant and hard to repro (as always) and we had to resort to multiple iterations with the customer and support team just to get a complete understanding of the problem.  The OD throws compile errors randomly and a error {!} sign is shown next to the expression shape. When you open the Expression shape, you find that parts of some messages are underlined by red marks to indicate that the parts are missing type references.

Let’s say there are two orchestrations inside the same project with namespaces as “A.B” and “A.B.C”. OD (Orchestration designer) adds these as the modules (BTSModule) to the XLANG compiler. Each module is supposed to create a scope so BTSModule creates a new scope symbol for the last name of the namespace and replaces the existing ones if any with the new one.

So now consider a scenario where “A.B.C” is added first, so the symbol table is populated with a tree which looks like A -> B -> C (-> is used for better presentation). Where ‘C’ is a scope symbol. Now if OD adds “A.B”, then the compiler replaces the existing namespace symbol “B” by new scope symbol B”, while doing so the references to “C” is gone. So now the tree looks like A->B.

But later when we are adding the message types in “A.B.C” namespace are succeeding why? BTSModule also in-turn holds the root of the module and uses it while adding the parts. So the types are added to a local symbol not to the one A->B… But later when the expressions are evaluated the actual symbol tree is used causing the failure.

Root cause: It’s to do with the order in which the modules are added to the compiler.
Solution: Modified the OD (Orchestration designer) to create the BTS modules in a sorted manner.

This fix is being released as KB979153 and should be available soon.

- Guru

  • Is there a supported fix for BizTalk 2006 R2? We have been dealing with this issue for quite some time now.

    Thanks

  • Thanks. This post helped me get rid of my compile error. But the error was due to my own reference not a BTSModule.

  • I had this issue and solved it in below ways.

    Open that particular expression shape and go to last line of each statement and press the delete button until it won’t affect the next line code.

    Now close the visual studio and reopen again and try to build the application.

  • Hi Raja,

    I Just did how u said, It worked fine. Thanks a lot. You are always best.

Page 1 of 1 (4 items)
Leave a Comment
  • Please add 3 and 7 and type the answer here:
  • Post