Re: Transactional Adapter and Orchestration



WenJen -

You've pretty much outlined my scenario with the crux of my problem being
addressed in point 5: "...but the SQL connection isn't lost...". Handling the
loss of the database connection during orchestration processing is my
greatest challenge. Since I have no way to revert the database field value
back to the original value because I've lost the database connection, I'm
handling this by wrapping the database call (which is called from an
expression shape) inside a scope shape and suspending the orchestration when
the database call fails (a caught exception). This is within a loop so that
when the orchestration resumes, the expression shape is revisited, the
database call can be made again, and the value updated. This approach is
functional, but I don't like it because it requires an operator to manually
resume the orchestration after the database connection is restored. In our
application, this could be tens or hundreds of suspended orchestrations.

I just can't think of another way. If there are other options to handling
this, I'm all ears! Thanks for your help.
--
-mustang


""WenJun Zhang[msft]"" wrote:

Hi Mustang

I have the similar thought with Tomas. If what you have done is marking a
flag in the database field to record the status of the processing, why not
use multiple flags in the field to represent the process stages instead of
reverting the field's value? As a rough example of mine:

1. The default value of the field is 0 Not received before it's retrieved
by the receive adapter.
2. After the receive adapter successfully polling/sending a record to
MessageBox, let's mark the field with status 1 Received sucessfully.
3. After an orchestration instance is initialized to handle this message,
change the field to 2 for Pending on orchestration process.
4. If the workflow is smoothly finished, your orchestraion updates the
field with 3 Finished processing or just deleting the record, which is up
to your real scenario.
5. If the workflow hits any exception and needs termination but the SQL
connection isn't lost, mark the field as 4 Failure in process and call
compensation flow to revert anything else.

In this case, your receive adapter can listen on records with status 0 (new
records) and 4 (failed records need retrying again). For record with status
2, it indicates there is an orchestration instance still pending on process
the record and may be in a retry stage due to SQL connectivity issue.
Status 1 will only appear when the message volume is large and biztalk
server is under a high stress - messages sent to MessageBox database >
messages concurrently being processed.

I think probably this kind of design is more flexible and with better
tracking/fail-over expansibility than simply reverting a True/False field.
And disabling receive location may not be required. According to
compensation, you can implement your own compensation workflow and perform
any specific process with custom compensation:

How to Add Custom Compensation to an Orchestration
http://msdn2.microsoft.com/en-us/library/aa578536.aspx

Compensation (BizTalk Server Sample)
http://msdn2.microsoft.com/en-us/library/aa577575.aspx

Thanks.

Sincerely,

WenJun Zhang

Microsoft Online Community Support

==================================================

Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at:

http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.


.



Relevant Pages

  • Re: Transactional Adapter and Orchestration
    ... Handling the ... loss of the database connection during orchestration processing is my ... Since I have no way to revert the database field value ... back to the original value because I've lost the database connection, ...
    (microsoft.public.biztalk.general)
  • RE: BizTalk 2004 Event View Error BAM EventBus Service
    ... My question is are still seeing the Event bus warning/error? ... the orchestration, I haven't been able to delete the assembly. ... BAMPrimaryImport database and the BiztalkDta database. ... Mubarak Elamin, BPI Business User Services ...
    (microsoft.public.biztalk.general)
  • RE: System.OutOfMemoryException was thrown
    ... You are calling a stored procedure from an orchestration via the sql ... location using the Sql Adapter that will poll the database, ... Additional error information: ... Exception type: PersistenceItemException ...
    (microsoft.public.biztalk.general)
  • RE: determing message counts without using XPATH
    ... I think XMLdoc usage outside the ... handle it better outside the orchestration. ... processed before entering each record within the database. ... If you are not using orchestration you would need to write a custom pipeline ...
    (microsoft.public.biztalk.general)
  • RE: BizTalk 2004 Event View Error BAM EventBus Service
    ... BAMPrimaryImport database and the BiztalkDta database. ... I have a Project with a Orchestration that uses two SQL Adapters to write ... data in a SQL Server database. ...
    (microsoft.public.biztalk.general)

Loading