|
Home > Archive > BizTalk Server General > April 2004 > HWS Register Action question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
HWS Register Action question
|
|
|
| Hi all!
I 'm debug small action. I do it in following manner : Build action orchestration, deploy, bind,start, after this register action and create constraint. Finally i go on HAT and see my variabes in debug mode. If i want to change my action, than i do all in back order, change repeat all in new version. My PC is PIV1800 with 512 Mb RAM, but work it very slowly. SQL work at my PC too.
1. Maybe anyone know better way to debug actions ?
2. Should i every time register/unregister action in the HWS admin utility?
Thank for your answer,
Pashchenko Max | |
| Gilles [MSFT] 2004-04-30, 12:37 pm |
| Hello,
>I 'm debug small action. I do it in following manner : Build action
>orchestration, deploy, bind,start, after this register action and
>create constraint. Finally i go on HAT and see my variabes in debug
>mode. If i want to change my action, than i do all in back order,
>change repeat all in new version. My PC is PIV1800 with 512 Mb RAM, but
>work it very slowly. SQL work at my PC too.
>1. Maybe anyone know better way to debug actions ?
There is one trick that you can use to ease the debugging of actions.
Observe that from your orchestration, you can always call
any method in an external assembly. This assembly must have been granted
full trust. The simplest way to do so is to GAC it.
So one way is to separate the business logic from the send/receive/long
running transaction in your orchestration. You can receive the message,
then call a function of your own in your own external assembly, passing the
message (and/or other relevant data). Now, the only thing you change is the
external assembly. Between debug sessions, you have just to make sure that
there is no instance of action running
and that you stop and restart the BizTalk processing host (assemblies
cannot be unloaded, they are only when the application domain
is, so hence restarting the host).
To debug, just attach to btssvc.exe in select Managed code. Put breakpoints
as you would normally in your assembly.
Ah, one thing. If you return objects to the orchestration from your
assembly, those must be serializable or you will receive a serialization
exception when the orchestration is dehydrated.
This approach is not always the best from a design point of view (i.e. it
hides logic in another satellite artifact) but you can move the code back
into the expression shape that used to call your assembly when the
debugging is done.
>2. Should i every time register/unregister action in the HWS admin
utility?
If you do not change the namespacesof the orchestration and/or the schemas
(only the logic inside the orchestration), you do not need
to unregister/register the action again between tries.
Personally, I have a pre-buld script setup in Visual Studio. Every time I
build the solution (in debug mode), it first terminates all instances
of the orchestration using WMI called by a JScript. Then it undeploys the
orchestration. VS then builds the orchestration. On successful build, I
have another script that deploys the orchestration, binds it and starts it.
My script has many hardcoded things in it so sending it to you would be
counter productive.
However, it is close to the SDK batch file (and its associated vbscript)
used to "install" the sample.
You can easily inspire yourself fomr it and build your own version of the
pre-post build scripts I described before.
Thanks.
-Gilles.
|
|
|
|
|