Tech-Love

Wednesday, January 10, 2007

How to run WPF applications from Apache Server

Please follow the steps :

Step 1: Install Apache server

Step 2: Go to Start -> Programs -> Apache -> Control Apache Server -> Start Apache in Console

Step 3: Test your apache by typing the following: http://localhost:8080/

Step 4: Go to Start -> Programs -> Apache ->Configure Apache Server -> Edit the apache httpd.conf configuration file.

Step 5: Add the following in Virtual Host Section of httpd.conf file

[Add the following]
AddType application/manifest .manifest
AddType application/xaml+xml .xaml
AddType application/x-ms-application .application
AddType application/x-ms-xbap .xbap
AddType application/octet-stream .deploy
[/Add the following]

Step 6: Copy the .XBAP file from the bin folder of your .Net application and paste it in
[Installed Drive]:\Program Files\Apache Group\Apache2\htdocs
Step 7: Open IE and key in the url http://localhost:8080/TestApp.xbap [Make sure Apache is still running]. You can see your .Net browser application running in Apache server.

Tuesday, September 12, 2006

BizTalk Questions and Answers

What is BizTalk?

BizTalk is a messaging based integration tool. It solves common problems that many businesses encounter while automating business processes, integrating multiple heterogeneous systems and communicating with business partners.

It provides a standard for efficient business process development and deployment by providing an internal architecture with deep integration between messaging and orchestration as well as scalable publish and subscribe messaging infrastructure

Explain how BizTalk works ?

BizTalk architecture mainly works on 2 ideas. a) Messaging b) Orchestration

Messaging is a low-level concept involving the exchange of structured data
Orchestration is the high-level view of a sequence of messaging exchanges

A message arrives at a receive location from an application or business partner. The receive location is a particular URL that is being actively monitored by a listener for the protocol involved. The listener is the component that grabs the message and introduces it into the BizTalk runtime environment. Some postreceipt processing occurs in the form of a receive pipeline. The incoming message might be encrypted and signed, for example, in which case the pipeline is responsible for decrypting it and verifying the signature. If the actions in the receive pipeline are successful, the message is entered into the BizTalk MessageBox.
The MessageBox is the heart of BizTalk messaging. It is a SQL Server database that allows for reliable messaging and simple clustering for scalability
Messages are stored with identifying properties, such as the type of message and the originating source of the message. These properties are known as the context of a message.
Applications subscribe to messages based on their context


What is the purpose of message box database?

1) To store inbound messages
2) To store orchestrations subscriptions
3) To coordinate the delivery of messages to orchestrations and send ports

What is required for including BAS in BizTalk installation

Business Activity services require windows SharePoint services which require IIS 6.0 [Available only in win 2003 server].

What is schema in BizTalk?

All messages processed by BizTalk should be represented by schema definitions. It describes the data type of each record and field contained in the message.

What are the two types of schemas supported by BizTalk?

1) Xml Schemas

Xml schema defines the structure of xml messages. Xml messages are arranged in a hierarchical format that is defined by the schema. Messages are identified and validated against their associated schema.

2) Flat File Schemas

Flat File schema defines the structure of messages that use a flat file format. It can be either delimited or positional.

What is default data type used in schemas?

String

What is the difference between property promotions and distinguished fields?
Property promotions are used in routing. It requires property schema
Distinguished fields can only be used in orchestrations. No need for property schema.

What is the purpose of DistinguishedFieldAttribute?

This attribute causes our properties to be emitted as distinguished fields in the message so that we will have access to them in the orchestration.

Note: We need to refer Microsoft.XLang.BaseTypes.dll for this special attribute.

What are the different types of functoid groups available in BizTalk 2006?

String Functoids
Mathematical Functoids
Logical Functoids
Data/Time Functoids
Conversion Functoids
Scientific Functoids
Cumulative Functoids
DataBase Functoids
Advanced Functoids

What is difference between Looping Functoids and Iteration Functoids

The Looping functoid combines multiple records or fields in the source schema into a single record in the destination schema.

The Iteration functoid outputs the index of the current record in a looping structure, beginning at 1 for the first record, 2 for the second record, and so on. It is equivalent to For Loop. An Iteration functoid combined with a Greater Than or Equal To functoid, a Less Than or Equal To functoid, and an And functoid to create the equivalent of a For loop.

What is Value Mapping Functoid ?

The Value Mapping functoid returns the value of its second parameter if its first parameter is true. A common use of the functoid is to change the attributes of a field into the attributes of a record












Answer :








What is the purpose of Value Mapping Flattening?

The Value Mapping (Flattening) functoid returns the value of its second parameter if its first parameter is true. The Value Mapping (Flattening) functoid enables you to flatten a portion of an input instance message by converting multiple records into a single record












Answer :







What is validate schema, validate instance and generate instance

Validate schema is used to validate the schema. It lists error messages or warning messages describing validation problems found in the schema by the extension.

Generate instance is used to generate an Xml or Flat File with dummy values based on the schema.

What is Test Map? What are the properties need to be set for testing a map? What is Validate map?
Test Map is used to test the map with the instance data provided in Test Map input instance filename. We need to set the Test Map input instance file and Test Input to Xml or Native [Other than xml]. Optionally we can specify the o/p file name + path also.

Validate map is used to validate message instance data against the source schema before you test the map.


How to suppress the creation of empty tags

We can use the Not Equal to Logical Functoid along with Value Mapping Functoid to suppress empty tags.

How to force the creation of empty tags

By selecting the in the value of destination field.

What is the use of Flat File Schemas

Flat file schemas serve two purposes. They define all of the same record and field characteristics (including structure) as XML schemas, and they provide a mechanism for defining all of the flat file characteristics that are required to translate a flat file instance message into an equivalent XML instance message (or vice versa). The former purpose is most useful when using the flat file schema within BizTalk Mapper to define a transformation of conforming flat file instance messages into a different, destination structure. The destination structure, defined by the destination schema in BizTalk Mapper, may or may not be governed by a flat file message schema (it could be an XML schema).

The latter purpose, that of translating between the flat file format of the document and its equivalent XML format, uses an extensive set of information that is added to the XML Schema definition (XSD) language schema using its annotation syntax.

What is the purpose of Activate Property in Receive Shape in Orchestration?

This allows the messaging system to direct the runtime engine to launch a new instance of the orchestration when a message arrives.Activate should be set to true. Default false.

What is the lifecycle of send port?. What is the purpose of enlisting send port?.

1. Specify the send port. Once specified, it is said to be bound.
2. Enlist the send port.
3. Start the send port.

Purpose of enlisting:

Enlisting is the process by which the subscription filters we specify are verified against the available receive ports and the subscriptions are created in the Message Box Database. Until the send port is enlisted, its subscription is not active and therefore it has no source of messages.


What are the default pipelines ?

There are 4 default pipelines paired into 2 [Receive/Send].
1. PassThru

The receive pass-through pipeline requires that the source and destination of the message be known and that the message is in clear-text and does not require validation. Its send counterpart, meanwhile, takes the message and sends it along to its known destination without any sort of post-processing.

2. Xml Receive

The default XML receive pipeline breaks the message down into its component parts so that it will be ready for the runtime engine. It also invokes a standard component that looks at the message and resolves the identity of the message source. The default XML send pipeline takes a message from the messaging engine, assembles it for transmission, and hands it off to the outbound adapter for transmission

What is the purpose of send port grps?

When we have multiple destination partners with same filter criteria we can configure them here. Ie when we want to send the same msg to multiple receipents.

Whether distinguished fields appear in Correlation Types?

No. Only promoted properties are available..

What are the modes available in debugging orchestration ?

1. Replay Mode [ Reporting Mode ]

It gives insight into the execution of a particular orchestration instance.

2. Live Mode [ Interactive Mode ]

The Live mode debugging allows users to debug an orchestration instance via usage of breakpoints. Breakpoints can be set at class level and instance level.

In class level every orchestration will break at the break point.
In Instance Level it’s applicable to that particular instance of the message alone.

Note :

Debugger should be attached to the instance of the orchestration

What is the purpose of tracking?

Tracking provides capabilities to understand and trouble shoot when an error occurs and save messages for further analysis. This tool will help to find messages based on schemas, promoted properties, ports and parties.

What are the default events tracked?

1. Service start and stop events
2. Orchestration events required by debugger
3. Message send and receive events


Where is the tracking information stored in sql database?

BizTalkDTADb

What is Facts in Rules Architecture?

Fact is the elementary component in rules architecture. A fact can be a field in an xml document, a property in .Net object or the value of a column in a relational data.

What is BRE?

Using BRE users can create dynamic rules to reflect changing conditions without the need of recoding/modifying orchestration.

Each rule will consist of a IF clause nad then clause.

What is Vocabularies in BRE?

Vocabularies are user defined names for the facts used in rules and conditions. It increases the readability.

What is Policies?

Policies are nothing but logical grouping of rules. Policies are versioned and becomes immutable once deployed.
These rules can be exported as XML also.


What are the important things to take care while calling rules from Orchestration?

Orchestration should be configured to Long Running Transaction
Call Rules shape should be configured to Atomic Transaction.

Why should we publish Facts and Policies in Business Rules Composer?
When we save it is just stored in sql rules database. To submit these policies and facts to BRE we need to publish it.


How to subscribe a message ?
How to inherit schemas?
Steps for creating a Custom Functoid and a real time example.
Dynamic Ports

Dynamic send ports do not contain a fixed destination address, only a pipeline. The destination address is determined at run time from the value of the OutboundTransportLocation message context property

We can also make use of OutboundTransportType to specify the transport protocol type

What are the different types of transactions available for orchestration

LongRunning and Atomic

Atomic supports ACID
LongRunning supports Consistency and Durability

Diff stages in Receive and Send

Receive Pipeline Stages

1. Decode
2. Disassemble
3. Validate
4. Resolve Party

Send Pipeline Stages

1. Pre Assemble
2. Assemble
3. encode

What is the purpose of Flat File Disassembler ?

The Flat File Disassembler component parses delimited and positional flat file format messages and converts them into an XML representation.

What is dehydrating and rehydrating?

Dehydration is the process of serializing the state of an orchestration into a SQL Server database. Rehydration is the reverse of this process: de-serializing the last running state of an orchestration from the database. Dehydration is used to minimize the use of system resources by reducing the number of orchestrations that have to be instantiated in memory at one time.

How to map messages without orchestration?

In the configuration dialog box of Send Port ,Select Fileters and Maps -> OutBoundMaps

Monday, May 29, 2006

SSIS Package Restartability:

Introduction :

Package Restartability is nothing but starting a package from a point where it has failed.

Let’s assume that in company X, a DBA has been assigned to perform certain DB tasks, say three tasks namely A, B and C. These tasks have to run in a sequential order. DBA starts the task in night and leaves the company thinking that work will be completed the next day, if all is well fine. Assume that task B failed for some reason and next day the DBA has to start all the work again right from scratch. In case if task A is very costly in terms of resource and time required, DBA will be in trouble.

SSIS comes handy for these kinds of situations. Using SSIS checkpoints DBA can start running the task B and then task C instead of running task A again.


How to achieve this in SSIS:

We have to write the state information of each tasks in a file after each tasks complete. This is very simple in SSIS. We have to just set four properties. Three in package properties and one in task properties.


Following table will explain what are these properties and how to use it:

Package Properties

CheckPointFileName - File path to store the state information of the tasks e.g.: D:\name.chk
CheckPointUsage - User can select one out of three values available. These values tell us how to use checkpointfile in the package execution

1) Never - Tells the package not to use a checkpointfile

2) If exists - If the checkpointfile exists, it will be used and the package will be restarted according to the information stored.

3) Always - Always use a checkpointfile. If you have not specified any value in checkpointfilename property, package will fail.

SaveCheckPoints - Boolean value to indicate whether checkpoints are to be written.

Task Properties:

FailPackageonFailure - This must be set for each task that we want to be the point for a checkpoint and restart.

Note:

Checkpoints can be used only on control flow and not on dataflow.

Summary:

In this article we learnt about restarting the SSIS package from the point it has failed using checkpoints. We need to just remember the four important properties we have to set for achieving the same. For containers and transactions, we have to adjust or set little more properties. I will try to cover this in next article.