Mohammed Atef’s Technical blog

Covert Complex SQL In clause to a business rule

Suppose you have Complex SQL Stored procedure and you would like to do this Complex SQL operation into BizTalk Business Rule Engine, what can you do??

Let see Example for This…
we need to transform the below SQL script to BRE
Update a Set a.policy=150
from a
Inner join b
Where a.xx=100 and a.yy in (3,10) and b.zz=1
To solve this issue follow this steps
1- create view contain SQL join.
2- Use IF statement in Business Rule
by adding in the if condition a.xx=100 and a.yy in (3,10) and b.zz=1
and put the set action into if condition action
I Hope this Help.


July 29, 2009 Posted by | Biztalk | , , | Leave a comment

How to Setup Microsoft Dynamics CRM for Outlook

One of the most Important features for Microsoft CRM Dynamic 4.0 is integration with Microsoft Office Outlook to do this just follow the following steps

1- Go to you CRM Install Package and copy the client folder into your client machine

2- run the setup file named SetupClient.exe

3- make sure you have installed the .net framework 3.0 or later and Microsoft Visual c++ runtime 8.0 or later.

4- important note the i have write this post for it

if you do not have Microsoft Visual C++ runtime installed download it and put it in folder named VcRedist then copy this folder beside the EXE file mention in step 2

5- after the installation finished go to Microsoft Office Outlook you will find big link in the top of you personal outlook named configure CRM Dynamic just click this link and follow the wizard till you finish.

6- now you can find all activities you authorized to access from Microsoft Dynamics SRM 4.0 available into you Microsoft Office Outlook….. Good Luck.

I hope this help.

July 29, 2009 Posted by | CRM Dynamics 4.0 | , , | Leave a comment

IIS 7.0 Web Deployment Tools

Today i am going to talk about IIS 7.0 new feature in deployment and packaging.First you must know that all the new extension for IIS 7.0 are found in Microsoft Web Platform Installer you can download it from here, this is a free tool that makes it simple to download, install and keep up-to-date with the latest components of the Microsoft Web Platform, including Internet Information Services (IIS), SQL Server Express, .NET Framework and Visual Web Developer.

so to do our new features of deployment please download and install it.

Now let’s take a look for the new deployment feature found in IIS 7.0

1- Synchronize web application

I think all of you was trying to move his web application from QC or Dev environment to production server and was a lot of time for build the new package and deploy it, but now using IIS 7.0 you do this stuff in few seconds by one line of dos command.

just go to dos command window and write the below line
C:\program Files\IIs\Microsoft web deploy>msdeploy –verb:sync –source:apphostconfig=[webapplicationname] –dest:auto,computername=[destination server name]

assume the following
[webapplicationname] is the web application name that you are trying to move it from on server to another.
[destination server name] is the destination server name.

after writing this line of command press Enter Key then you can find the new web application found into your IIs destination server.

2- Package

IIS 7.0 has also nice feature for package you web site in easy and quick way you need to follow this steps only

Right click->Package and Install->Package Sites and Applications
after that just follow the wizard to finish this stuff.

3- Deploy

After creating the package you need to deploy it to another server…yeah IIS 7.0 also doing this step for you in the below few steps

Right click->Package and Install->install sites and applications

I think you are happy now you can do many tasks in few minute using IIS 7.0 .. Good Luck but for you information IIS 7.0 has more and more new feature try to learn it.

I Hope this Help.

July 27, 2009 Posted by | .Net 2010 | , , | Leave a comment

IIS 7.0 Configuration Settings

Dears, today i am going to talk about IIS 7.0 configuration and delegate IIS 7.0 Configuration. i think all of you know that IIS 6.0 settings control hosted in the metabase but now IIS 7.0 has
changed the configuration storage from the metabase to a series of cleartext XML files. These files provide for a distributed hierarchy in which the configuration is shared among the machine-level configuration files and may optionally be set at the directory level along with the web content. This allows the system administrator to delegate control to the site or application administrators.

By default, IIS 7.0 is locked down to allow only the system administrator access to modify the server, site, or application settings.
As with most systems, the configuration files in IIS 7.0 are read and applied in a hierarchical order. The following three files are at the heart of the system:

  • The applicationHost.config file.
  • The machine.config file.
  • The root web.config file.

The applicationHost.config file is located at %systemroot%\system32\inetsrv\config. The
machine.config and root web.config files are both currently located in the %systemroot%\
Microsoft.NET\Framework\v2.0.50727\CONFIG folder. The applicationHost.config file contains the IIS server settings. The machine.config and root web.config files contain the global default values for the .NET Framework settings. Along with the three primary files, additional web.config files may be located in the content directories of individual web sites or applications to control their behavior.
The configuration file inheritance hierarchy begins with the machine.config file then the root web.config, the applicationHost.config file, and then the web.config files that may be in the web-site or application can understand configuration hierarchy throw the following diagram.


IIS 7.0 give users two types of administration One is for the server administrator
using IIS Manager to control access for the site administrator. The other is for the site administrator doing what they have been granted to do. Now Administrators can decide what can or can not be override for Site Administrators.
The Feature Delegation tool allows you to lock or unlock sections for examples include Error
Handling, Compression, Authentication, and many others as shown in below image.

Within the Feature Delegation tool, you can change the Delegation setting, depending on the following list(Read/Write, Read Only, Not Delegated, Reset to Inherited, Configuration , Read/Write, Configuration Read Only).
In our new IIS 7.0 Administration window you will find two types for feature delegation one we have seen before the feature delegation and another is custom site delegation which found in the top right side in your IIS 7.0 Manager from this form you can define you web site settings by override the global IIS 7.0 setting manually.

Hope this help.

July 26, 2009 Posted by | .Net 2010 | , , | 2 Comments

Using NinTex Workflow with Microsoft SharePoint Server 2007

All developer spent more times for developing Workflow with SharePoint and end users can’t update or build them business. Now using NinTex Workflow 2007 you can build advanced Workflow in few minutes.
In this post I would like to introduce NinTex for you and how to install, configure, build new one, manage and use Tools for NinTex.
Using NinTex you have the following benefits

1- Easy way to use NinTex Workflow and build complete workflow in few minute

2- Huge integration features like Query SQL, XML, Excel services and SharePoint Lists and calling web services.

3- Extend MOSS with advanced workflow capabilities all within a web-based GUI embedded within SharePoint


For installing NinTex Workflow 2007 just follow this Installation Guide
If you are lazy and don’t like to read it just do this steps Run the Installer, Deploy NinTex Workflow solution for all web application, Import license, configure database and Email and Activate NinTex Workflow in Office Administration site , you web application, site collection and you Site.

Configure or update NinTex Configuration
To configure you NinTex Workflow go to Site Action->site settings then you will see NinTex Workflow section as shown
you can click the option you would like to configure it.

Creating Workflow
there are two ways to create a workflow. First, navigate to a library or list then click the “Settings” button. Then do one of the following steps

1- Select the “Create Workflow” option. The Workflow Designer page will load with the Workflow Template picker at the front.

2- Select the “Manage Workflows” option. The Workflow Gallery page will load. You can then select “Create” from near the top of the page.

Creating Variables
Using NinTex Workflow 2007 you can define new variable and use it into your Workflow. To define variables you need to open work flow variable screen as shown
from this screen just click Create new button to define new variable.

Workflow Actions Groups
NinTex Workflow 2007 has a lot of tools and actions shapes I will give you screen shot for each one and simple description for each one let’s start.

These Actions group contains all common actions that most users need and usually using it.
Set a Condition: used to set conditions in work flow
Request approval: used for asking some user to approve some actions
Send a notification: used for sending notification after approving or denying any request approval action.


These Action group contain all actions shapes for integrate NinTex Workflow with other tools like SQL, Excel, Web Services, XML, MOSS Search Query, BizTalk.
So it gives you full functionality to integrate your workflow with a lot of tools.

These Actions group used for using SharePoint lists and library and allow you to control some process in your NinTex Work Flow.


Logic and flow Actions Group used for doing logical operation like for each, loop, run if statement, run parallel actions, set some conditions, do state machine and change state machine state using action set shape.

Operation Actions group used for doing Workflow operation like build sting, calculate date, set or get collection operation, set variable, delay workflow for specific period of time, end workflow, doing math operation, run custom regular expression.


The publishing actions group contains only one action shape as shown which responsible for copying or publishing your NinTex Workflow into you share point.

The SharePoint Profile Actions doing some operation into you SharePoint server.

Sites and workspaces actions used for create or delete specific site into SharePoint.


User Interaction actions related to use operations like complete task, delegate task, requesting data, sends notifications and task reminders.

All NinTex Workflow actions are simple to configure just I was trying to give you quick and easy introduction if you need any help for any action shape don’t hesitate to send me mail or write comment here.

Hope this helped.

July 16, 2009 Posted by | Developement | , , | 4 Comments

Exposing WCF services from orchestrations using BizTalk 2009

Today i am trying to make simple BizTalk application for exposing WCF service from Orchestration.
i will explain this example from A to Z and you can download full BizTalk solution by click here .

Problem definition
Our application is used for receive xml file for customer and send this xml file to output folder by updating the customer status to received.

Solution composed from Three parts as follows :
Part one: Develop Schema and Orchestration and testing it
This part is direct and simple for all BizTalk developer. first i will create new BizTalk project and select add new file after that select schema file and build schema like the following image

then build the solution by specifying strong key and application deployment project attributes.
now we can build the orchestration project.
like the first project select new BizTalk Project and add new item but this time select new Orchestration then build the new orchestration like the below image
all this shapes is very sample and i am sure you can do it but to update the status for customer double click in the MessageAssignment shape and add this two lines of code

//assume the input message called InMsg and output message is OutMsg

now build the solution by specifying the strong key and application name like the previous project and deploy the solution.

finally go to the BizTalk server application console and extract applications you will find the new application. just you need to define receive and send port and bind these to the generated Orchestration and test you application.

Part Two : Generating Orchestration WCF

Now we are going to generate WCF for our Orchestration so kindly follow this steps

1- select Tools –>BizTalk WCF Service Publish wizard and press next

2- select Service Endpoint radio button and check the below two check boxes

3- select public BizTalk Orchestration as WCF Service

4- press next for all the incoming screens till you reach the finish screen.

now go to IIS you will find new WCF service found named by the orchestration name.

try to browse it now…ohhhh……..not work!!!!!!

to fix this issue go to the BizTalk Application console and open our application you will find new receive location with transport type WCF-WShttp disabled just enable it and go to the orchestration binding screen and select the new generated receive port in it is receive port.

Important note make sure that the application pool user account  for the WCF Service found  in BizTalk Isolated Host Users group.

Now i am sure if you browse this WCF service it will work.

Part three: Consume the WCF Orchestration

lets finish this project it over now. just add console windows project and right click the project name then select add service reference and put the WCF orchestration URL.

open the program.cs file code and add the following code

WCFSOAClient.SOAWCF_soawcf_Port_1Client client = new WCFClient.WCFSOAClient.SOAWCF_soawcf_Port_1Client();
WCFSOAClient.Customer cust = new WCFClient.WCFSOAClient.Customer();
cust.Address = "salmia";
Console.WriteLine("begin call wcf orchestration");
Console.WriteLine("done! check the output folder");

now run this console project you will see begin call WCF Orchestration and done! check the output folder and new fill dropped to the out folder contain the following xml.

<?xml version="1.0" encoding="utf-8"?>
<Customer xmlns="http://schema.Schema1" xmlns:xsi="" xmlns:xsd="">
<FName xmlns="">Mohammed</FName>
<LName xmlns="">Atef</LName>
<Address xmlns="">salmia</Address>
<Status xmlns="">Received</Status>

I Hope This Help.

July 8, 2009 Posted by | Biztalk, SOA | , , , | Leave a comment

Configure DB2 adapter in BizTalk 2009

Problem definition

I was trying to build new BizTalk application to retrieve data from DB2 and insert it into SQL DB or
Oracle DB by applying some Business Rules.

First i have installed Db2 client into BizTalk 2009 server Machine then i have installed
BizTalk Server 2009 Adapters for Host Systems 2.0 Developer Edition
but after installing this tools i can’t found my db2 adapter :(!!!!!!!.
i have search for this issue in many places but i didn’t found solution.

finally i went to my lovely forum MicroSoft BizTalk Forum and submit new question.
after few hours i get a lot of answers one of the effective answer was from Eliasen.

you can find his answer here
after that i download this tool BizTalk Server 2009 Adapters for Host Systems 2.0 Enterprise Edition and installed it.
Finally i found the DB2 adapter in BizTalk 2009 server administration Adapters list.

Thank you Eliasen.

I hope this help

July 7, 2009 Posted by | Biztalk | , , , , , | Leave a comment