2012 Illinois Technology Association - CityLights Finalist

BLOGS

MPS Partners provides functional and technical expertise and insights into business process management trends and Microsoft technologies.

Contact Us
HOT JOBS
Interested in reviewing our current job openings or submitting a resume?
CLICK HERE
Home » Blog

Part 2 – The Solution: SharePoint 2013 Deploying List Schemas

Part 2 – The Solution: SharePoint 2013 Deploying List Schemas

To recap, in Part 1 the basic approach to deploying contents types via PowerShell in SharePoint 2010 and SharePoint 2013 was discussed. Now, that we have fields and content types in place lets go over the approach to deploying list schemas and instances.

We are going to be using Visual Studio 2012 to create the new list schemas and instances. When a new list schema is created in Visual Studio, there is a choice of what type of list your new custom list should mimic. Once this is selected Visual Studio provides the OOB schema, elements, and other associated form files for that particular list. Based on the documented Microsoft approach, the next step is to add your custom content type reference, content type field references, and custom views to the list schema. In the new approach, no modifications to the list schema is necessary! None. Ok… unless you are creating custom views, but we will discuss that in a bit, let’s start from the beginning.

Since the problem with updating lists after initial deployment was based on the content type and list association, we wanted to decouple that process. So, how do we associate content types to a list? Instead of modifying lines of xml in the list schema, add a list event receiver of the Event Type List Added to the list schema. This is very important, as other event types will cause timing issues with process completion. To associate a specific content type with a specific List ID, the first line in the event receiver should be an if statement that is checking to make sure that the list that is being created as a Type that matches your list. For example… If your list Type is 30000. Then the first line of your event receiver would be if (properties.TemplateId == 30000).

Once we know that this our list, based on the unique Type now the content type can be attached to the list programmatically. Also, any custom fields that need to be added to OOB or custom views should be done now as well because we cannot add custom fields to a list schema that does not have a reference for them so we must do it in the event receiver after the content type binding has taken place. Earlier I mentioned that you can create custom views in the list schema? You may want to do this if you are creating List View web parts in a site definition and you need to know the Base View ID of that view. You will want to create the views in the list schema with the proper type, URL, Name, and other basic settings but do not associate any fields other than say Title (or other OOB list fields) with them. Then the rest of the field additions happen in the event receiver. As for list instances, nothing has changed here. As long as your list instance is pointing to your custom List Schema Type and the Feature ID is pointed to the Feature that deploys your list schemas. Your good to go.

This approach have been tested with both SharePoint 2010 and SharePoint 2013. View Part 1 of this series to review the problem we are solving and how we deployed fields and content types.

Next blog will discuss customizing Calendars, Task Lists, and Picture Libraries.

Posted in SharePoint | Tagged , , , , , , , , | Leave a comment

Part 1 – The Problem: Deploying and Re-Deploying Content Types and Lists

​With the introduction of the Content Type Hub in SharePoint 2010, there was lots of excitement about the ease of maintaining content types in SharePoint. The ability to manage fields and content types in one place was very appealing to organizations with the large intranet redesigns and deployments. Setup is very simple, create a hub, deploy field and content type elements and we are in business. The content type hub then pushes down information to it’s consumers, sites and lists are all in synch and everything is working as expected.

So, a change comes up, and the implementation sounds simple just deploy fields, deploy content types, deploy updated list schemas, publish content types, looking good… Until, the data in a pre-existing list is reviewed and the change to the content type is not reflected. Hmmm… the content type has been published, the content type jobs have run, the site has the newly updated content type, but the pre-existing list does not. That’s a big problem when you have many lists across an enterprise implementation that all need updates and now the data is out of synch between lists created post change and the lists that existed pre-change. After lots of research, it was determined that the binding of the content type to the list schema itself (custom lists were also implemented) was the culprit of the updating problems. Once that was identified, a new solution was formed so that lists would update as expected.

Ultimately, the approach to creating and updating content types, lists, and their association with each other were all modified. Since Content Types are the basis of the solution modifications, the deployment and modification of field elements has not changed, we will start there.

Changing the way content types are deployed…
The documented Microsoft approach to creating and deploying content types, regardless of whether The Hub is being utilized, is to create an elements file with a Content Type element and the appropriate Field References including removing any unnecessary inherited fields. The content types get their own GUID, internal name, and other attributes can be specified at this time. Instead of deploying content types with an elements file, the new approach is strictly PowerShell. A parent content type can still be specified within PowerShell to maintain the hierarchy. All modifications to content types should be handled via PowerShell just as the creation was to maintain consistency throughout environments. Publishing after creation via script is still necessary. If you are using The Hub, the PowerShell script should only be run on the URL where the content type hub is created, just as if you were activating a feature in the old approach.

In the next blog we will discuss list schemas and their association to custom content types.

Posted in SharePoint | Tagged , , , , , , | Leave a comment

Business Critical Line-Of-Business (LOB) Data in SharePoint 2013 – Simplifying Access to SAP ERP

Many organizations face the challenge today that most of their users don’t have easy access to the business critical data hidden in their line-of-business (LOB) systems such as SAP ERP or Oracle Financials.  Users are often presented with a complex user interface (UI) or inflexible business processes.    This problem is enhanced by the fact that these systems are usually deployed to a limited number of users.  The reality is that business users at every level of an organization need access to important data and related processes to enable them to support operations and make sound decisions.

Users who need access to the data that reside in these LOB systems often need to reach out to IT to provide this information and organize it in a particular manner.   This keeps IT busy with daily mundane tasks rather then spending their energy on more strategic initiatives.

Managers in these organizations are then faced with the challenge of how to get more value out of their LOB systems by extending the reach of important business data thus improving business processes.  There is a growing trend to look for collaborative solutions such as using Microsoft SharePoint instead of the complex generic interface that the LOB system might provide.

Microsoft SharePoint 2013 is a business collaboration platform of choice for many companies and provides the capabilities necessary to achieve business innovation with one unified platform that can be used for intranet, extranet as well as internet sites.  This enables an organization to significantly cut costs by streamlining and improving internal processes.   Having a unified platform speeds up time to market around new initiatives by allowing users to share resources, ideas, and expertise and plan projects effectively.

When it comes to LOB data from systems such as SAP ERP, SharePoint 2013 can increase the visibility of critical, accurate, and real-time business data.   SharePoint 2013 also offers a number of ways to surface LOB data.  Once the data is surfaced in SharePoint, Search and BI capabilities can be used to provide wider end-user functionality.

The rest of this blog and the subsequent blogs in this series will focus on the different ways to integrate SharePoint with SAP ERP, and in particular SAP HCM.

I have learned from experience that no two SAP Integration projects are the same.  When working on an SAP-SharePoint Integration project, there a few key principles that we have to keep in mind.

First and foremost, we need to fully understand the business process that needs integration with SharePoint.  We need to make sure that project objectives are well defined before we embark on recommending a solution.   High level functional requirements as well as non-functional requirements such as security, performance requirements, supportability should be defined.  User Interface (UI) requirements and the data that needs to be brought to SharePoint should be clearly defined in order to surface only the data that is needed to complete a particular process. Any workflow requirements and how users want to interact with the data (BI dashboards, etc.) should be defined as well.    Last but not least, we also need to keep in mind what is the organization’s overall  SAP/Microsoft roadmap.  Is it going to be just a one-off project or does the architecture need to be scalable to support any future projects?

Once we understand the requirements, we need to understand the current IT landscape and infrastructure.   For example in the case of SAP HCM, a customer might have a need to automate the Personnel Change Notification (PCN) process.   We need to understand the current architecture to see what are the components (Standard BAPIs etc.) that might be reused. Understanding the skill set of existing IT staff (SAP resources vs. Microsoft resources) will help narrow down the correct integration mechanism.    You don’t want to recommend a solution that requires heavy custom BAPI development if the organizations does not have any SAP developers in house that can support that.  On the other hand, you have to be careful recommending a complete Microsoft solution if the company IT staff only has SAP resources.  Having said that, at the end of the day, the integration strategy should be driven by User Interface Design and User Experience requirements.

Now there are basically two different types of integration projects in MS/SAP space.  One that requires little to no coding and the one that requires heavy customization using custom development.  In my next blog I’ll discuss the reasoning behind selecting a particular strategy as well as pros and cons of each strategy.

Posted in Integration | 2 Comments

SharePoint 2010 Lookup Column Limit causes Filtering Problems

​Managed metadata plays a big part in knowledge management and search.  Managed metadata provides support for two main features, Content Type Publishing and Taxonomy.

Content Type Publishing    The sharing of content types across site collections and Web applications. For more information about content type publishing.

Taxonomies    The creation and management of hierarchical collections of centrally managed terms (called term sets) that can be used as attributes for items in SharePoint sites. These term sets can be shared across site collections and Web applications. Term sets can be created and managed through a feature called the Term Store Management Tool.

In SharePoint 2010 Lists and Libraries utilize this feature to provide centralized metadata terms located in the term store to create easier maintained taxonomies and content types.  A main issue with these single select value lookup fields that is not always apparent to identify is the limit of single select value lookup fields that are supported in SharePoint 2010 List and Libraries.  When exceeding the limit, the OOB column filtering functionality fails to function for those single select value lookup fields that exceed the limit thus resulting in an empty results set.  SharePoint 2010 allows for a maximum of 16 single select value lookup fields per list or library.  Additional single select value lookup fields may be added beyond the 16 but for the 17th single select value lookup field and beyond, filtering on that column will return zero items.

Technically, for each field, a RowOrdinal property is set which describes the row that the field data is written to in the content database.  By default the the RowOrdinal is set to "0".  Filtering will work for these fields on the first row.  When another lookup field is added to the list or library that exceeds the limit of lookup fields, the field’s RowOrdinal property is incremented to "1" since the first row has been fully occupied in the database table.  Column filtering will not function correctly for those fields placed in RowOrdinal = "1" or higher.  This issue is described as "SQL Row Wrapping" feature.  For a lookup type in a list, SQL Server row wrapping occurs after each 16 columns in a SharePoint list.  The default row wrapping value of 6 allows for the maximum of 96 lookup columns per SharePoint list (6 * 16 = 96). The same can be said for any other columns exceeding the allowable limits as designed by SQL Server.  The following illustrates this concept.

A1 (ColName = "int1" RowOrdinal=0)
A2 (ColName = "int2" RowOrdinal=0)
A3 (ColName = "int3" RowOrdinal=0)
A4 (ColName = "int4" RowOrdinal=0)
A5 (ColName = "int5" RowOrdinal=0)
A6 (ColName = "int6" RowOrdinal=0)
A7 (ColName = "int7" RowOrdinal=0)
A8 (ColName = "int8" RowOrdinal=0)
A9 (ColName = "int9" RowOrdinal=0)
A10 (ColName = "int10" RowOrdinal=0)
A11 (ColName = "int11" RowOrdinal=0)
A12 (ColName = "int12" RowOrdinal=0)
A13 (ColName = "int13" RowOrdinal=0)
A14 (ColName = "int14" RowOrdinal=0)
A15 (ColName = "int15" RowOrdinal=0)
A16 (ColName = "int16" RowOrdinal=0)
B1 (ColName = "int1" RowOrdinal=1)

screenshotSPFilter.png

Possible Workarounds

  • Reduce the number of lookup fields defined in the content type for the taxonomy
  • Change some fields to choice fields 
  • Change the single select value lookup fields to Multi select lookup fields
Additional Info on column limits on SharePoint Lists and Libraries

Posted in SharePoint | Leave a comment

Using the TransitionFrame and Fast Resume together

Introduction

When using shipping versions of the Windows Phone Toolkit’s TransitionFrame together with the new  Windows Phone 8 fast app resume feature, application transitions get confused.

The Windows Phone Toolkit gives us easy intra-app transitions. Windows Phone 8 includes an easy-to-implement fast resume feature along with its own ‘application suspending’ and ‘application resuming’ transitions which are similar to full-page Turnstile animations. Using both of these already-written-and-tested features makes our development lives much easier, so what can we do to get them working together?

Let’s review how each of these components work on their own.

TransitionFrame

Before we get to transitions, let’s check out the base class implementation. The process for navigating between pages within a PhoneApplicationFrame is as follows:

1.      Frame.Navigate(NewUri) is called

2.      Frame.Navigating event is fired

a.       NavigatingCancelEventArgs.Uri: NewUri

b.      NavigatingCancelEventArgs.NavigationMode: NavigationMode.New

c.       Frame.Source: OldUri

3.      Unless Canceled, Frame.Navigated event is fired

a.       NavigationEventArgs.Uri: NewUri

b.      NavigationEventArgs.NavigationMode: NavigationMode.New

The TransitionFrame component lets us assign TransitionIn and TransitionOut transitions for both back and forward navigation. These are executed by the TransitionFrame via the  Frame.Navigating event.

The TransitionFrame augments the PhoneApplicationFrame as such:

1.      Frame.Navigate(NewUri) is called

2.      Frame.Navigating event is fired

a.       TransitionFrame starts playing transition but does not block;

3.      Unless Canceled, Frame.Navigated event is fired

a.       TransitionFrame is not equipped to handle Canceled Navigations.

Fast App Resume

Before fast app resume, Windows Phone would just fire PhoneApplicationService.Launching, usually sending the user into the app as if it had just been opened, unless complicated custom resume functionality had been implemented.

With fast app resume, we just add an ActiviationPolicy to our WMAppManifest.xml file…

<DefaultTask Name=_default ActivationPolicy=Resume />

And we get pretty easy, free resume logic.

On suspend, Windows Phone will store the current Uri of the root frame (referred to later as SuspendUri).

On resume, Windows Phone will:

​1.      Fire the Frame.Navigating event

a.       NavigatingCancelEventArgs.Uri: SuspendUri

b.      NavigatingCancelEventArgs.NavigationMode: NavigationMode.Reset

c.       Frame.Source: SuspendUri

2.      Fire the Frame.Navigated event

a.       NavigationEventArgs.Uri: SuspendUri

b.      NavigationEventArgs.NavigationMode: NavigationMode.Reset

3.      Fire the Frame.Navigated event a second time

a.       NavigationEventArgs.Uri: SuspendUri

b.      NavigationEventArgs.NavigationMode: NavigationMode.Refresh

Perfect, right?

The Problem

All this ‘free’ functionality from any major player within the mobile space, especially one trying to catch up to the pack. As an application developer, I’ll take any shortcuts I can get for my app to have a great native user experience. What do we get for trying to have all our cake and eat it too? Unfortunately, Bad news. The TransitionFrame and fast app resume have clearly been written without any consideration for the other and obviously weren’t tested together. I will cut TransitionFrame some slack as it is somewhat old. So all fingers point to fast app resume.

Let’s review the combined chronology of TransitionFrame and fast app resume:

1.      (Our application is in foreground at SuspendUri and user presses Windows button on phone)

2.      Concurrently:

a.       Windows Phone 8 built-in full-page out-of-process TransitionOut Forward Turnstile transition on application being suspended

b.      Our application:

i.      Frame.Navigating fired: NavigationMode.New from SuspendUri to app://external/ (our application is suspended before TransitionFrame gets to start the transition associated with this event)

ii.      Frame.Navigated fired: NavigationMode.New to app://external/

3.      (User selects suspended application from home screen or all applications list)

4.      Windows Phone 8 built-in full-page out-of-process TransitionIn Forward Turnstile transition on application being resumed

5.    TransitionFrame starts playing transition for (2.b.i)

6.      Frame.Navigating fired: NavigationMode.Reset from SuspendUri to SuspendUri

7.      TransitionFrame starts playing transition into OldUri

8.      Frame.Navigated fired: NavigationMode.Reset to SuspendUri

9.      Frame.Navigated fired: NavigationMode.Refresh to SuspendUri

Which to the user looks like:

Video of the Problem

Not good.

The Solution

We need a way to prevent the TransitionFrame from playing these extra transitions.

My first thought: There must be some property or event I can hook into and attempt to cancel or bypass the animations. This was a quick no-go. TransitionFrame is functionally bare. How about fast app resume? Same situation: no flexibility at all.

My second thought: Subclass TransitionFrame! This quickly leads to a brick wall: practically everything is internal or private, especially the stuff we care about.

My third thought: To my surprise, TransitionFrame is actually open source! We can grab a copy and make some modifications!

After you copy the file in, change the namespace, and compile we are dealt our first hurdle: OnBeginTransition and OnEndTransition are both private. Reflection to the rescue!

Make the following code substitutions:

//navigationTransition.OnBeginTransition();               

MethodInfo dynMethod
= navigationTransition.GetType().GetMethod(
“OnBeginTransition”,

BindingFlags.NonPublic | BindingFlags.Instance);

dynMethod.Invoke(navigationTransition,
new object[] {
});

//navigationTransition.OnEndTransition();

MethodInfo dynMethod
= navigationTransition.GetType().GetMethod(
“OnEndTransition”,

BindingFlags.NonPublic | BindingFlags.Instance);

dynMethod.Invoke(navigationTransition,
new object[] {
});

Let’s now set App.xaml.cs to use our new TransitionFrame inside InitializePhoneApplication.

It builds! But does it run? Yes, with a huge caveat: the transitions don’t play. It turns out we also need a style from Themes\Generic.xml:

<Style TargetType=”transition:TransitionFrame”>

    <Setter Property=”Background” Value=

“{StaticResource PhoneBackgroundBrush}”/>

    <Setter Property=”BorderBrush” Value=”Transparent”/>

    <Setter Property=”BorderThickness” Value=”0″/>

    <Setter Property=”HorizontalContentAlignment” Value=”Stretch”/>

    <Setter Property=”VerticalContentAlignment” Value=”Stretch”/>

    <Setter Property=”Template”>

   
    
<Setter.Value>

   
        
<ControlTemplate TargetType=”transition:TransitionFrame”>

   
            
<Border

   
                
x:Name=”ClientArea”

                 
 
 Background=”{TemplateBinding Background}”

   
               
 BorderBrush=”{TemplateBindingBorderBrush}”

   
               
 BorderThickness=”{TemplateBindingBorderThickness}”

   
               
 Margin=”{TemplateBinding Margin}”>

   
                
<Grid>

   
                   
<ContentPresenter

   
                       
 x:Name=”FirstContentPresenter”

   
                       
 HorizontalAlignment=

“{TemplateBindingHorizontalContentAlignment}”

   
                       
 VerticalAlignment=

“{TemplateBindingVerticalContentAlignment}”/>

   
                    
<ContentPresenter

   
                       
 x:Name=”SecondContentPresenter”

   
                       
 HorizontalAlignment=

“{TemplateBindingHorizontalContentAlignment}”

   
                       
 VerticalAlignment=

“{TemplateBindingVerticalContentAlignment}”/>

   
                
</Grid>

   
            
</Border>

   
        
</ControlTemplate>

   
    
</Setter.Value>

  
 
</Setter>

</Style>

I added a copy of this to my ApplicationStyleDictionary.xaml.

Okay, now we can move onto actually fixing the problem. Because Windows Phone 8 plays its own transitions in and out of our application on resume and suspend respectively, the transitions our application plays in and out of the active frame are redundant; we need to prevent one pair from playing. Windows Phone 8 gives us no control over the animations it’s playing, so that leaves our own transitions to deal with.

If we look back at our review of the combined chronology of TransitionFrame and fast app resume, we can see we have no choice but to keep (2.a) and (4), and we want to prevent (5) and (7). Our next step is to figure out where TransitionFrame is starting transitions so that we may prevent the ones in question from occurring.

The only time the TransitionFrame starts transitions is within the Frame.Navigating event handler private void OnNavigating(objectsender, NavigatingCancelEventArgs e) so let’s start investigating there. If we look back at our chronology again, we can figure out what sets the OnNavigating invocations we are interested in apart from the others. The cause of transition (5) is the invocation (2.b.i) and the cause for transition (7) is invocation (6). Invocation (2.b.i) is unique in that the NavigatingCancelEventArgs.Uri is equal to app://external/ and (6) is unique in that NavigatingCancelEventArgs.NavigationMode is equal to NavigationMode.Reset. Now that we have our two special conditions, let’s skip execution of OnNavigating when they are true:

private void
OnNavigating(object sender, NavigatingCancelEventArgs e)

{

    if (e.NavigationMode == NavigationMode.Reset
|| e.Uri.OriginalString == “app://external/”)

        return;

   

}

Problem solved? Let’s build, run, and test the solution.

Video of the Solution

Success!

Conclusion

After coercing a copy of the open-source TransitionFrame class into our project and making a single minor change, we can now use fast app resume with our transitions intact!

Implications

I’m guessing distributing our modified copy of TransitionFrame.cs and Generic.xaml requires us to also include some mention of the fact that part of our application is Copyright Microsoft under the terms of the Microsoft Public License (Ms-PL).

Posted in .NET Development | 1 Comment

Migrating Classic Mode Authentication web application to SharePoint 2013

​SharePoint 2013 no longer supports classic mode authentication.  After attaching a content database that contains classic mode site collections users will not be able to authenticate.  If you check a users permissions in site settings you will see someting like this: i:0#.w|sprcompanies\cctest

​The solution is to migrate your web application users to with the following PowerShell command.  This should be done in an elevated (administrator) SharePoint management shell by a user who is a securityadmin in SQL and is db_owner (in SQL) for the content databases being migrated.

PS C:\> Convert-SPWebApplication -Identity https://projects.sprcompanies.com -To Claims -RetainPermissions

Posted in SharePoint | Leave a comment

Installing SQL Server 2012 for SharePoint

Windows Server 2012
Installed in a Hyper-V virtual machine

Volumes:

C (Windows disk)
126GB NTFS

 

D (SQL Data) 200GB
NTFS

 

E Virtual DVD ROM

 

Before installing
SQL ensure that the .NET 3.5 framework is installed by running the following
command (the windows install disk should be mounted in the E drive):

dism
/online /enable-feature /all /featurename:NetFx3 /source:e:\sources\sxs

 

- Mount Installer ISO
in Hyper-V console for SQL install and double click on ‘setup.exe’

- Chose ‘New
Installation’ and click thru entering key if necessary and accept any updates

- Correct any
deficiencies flagged by the installer (if necessary) and click thru to ‘Setup
Role’

- Select ‘SQL Server
Feature Installation’ and  Check the
boxes for ‘Database Engine Services’ and ‘Management Tools – Complete’

- Click thru and
select ‘Default Instance’, changing the Instance root directory  to the D drive (D:\Program Files\Microsoft
SQL Server\)

- Change the SQL
Server Agent and SQL Server Database Engine to run under domain accounts

- On the next screen
add at least one SQL Server administrator and confirm that the data directories
are on the D drive

- Click thru to the
‘Ready to Install’ page and confirm the installation parameters

- Click ‘Install’ -
the install will take some time (depending on server resources)

Posted in SharePoint | Leave a comment

Using Entrerprise Library In Biztalk Orchestration To Log To A File

There are time when I would like to  setup logging in my Biztalk orchestrations to be able to log to a file.  Since it is not straight forward, I would like write this to show the steps that I take to accomplish this.

1. Install Microsoft Enterprise Library 4.1 – October 2008.msi

2. Open configuration.  Start?All Programs?Microsoft patterns & practices?Enterprise Library 4.1 – October 2008?Enterprise Library Configuration

3. Right click “Enterprise Library Configuration” and select “New Application”

4. Right click “Application Configuration”, “New” and select “Logging Application Block”

5. Leave all default configurations except for the following steps.

6. Under Category Sources, General, set the property for ReferencedTraceListener to “Formatted EventLog TraceListener”

7. Under Special Sources, Logging Errors & Warnings, set the property for ReferencedTraceListener to “Rolling Flat File Trace Listener”

8. Right click “Trace Listeners”, “New” and select “Rolling Flat File Listener”.
a. Modify the following for Rolling Flat File Listener properties
- Filename:  d:\biztalk logs\biztalk.log
- Formatter:  Text FormatterFilter:  All
- RollFileExistsBehavior:  Increment
- RollInterval:  Day
- TraceOutputOption:  DateTime
- You can also modify the Formatter template to customize what you want in the log file.

9. Save your  configuration to a location you choose.  You will need this info later.  (ie C:\Program Files (x86)\Microsoft BizTalk Server 2010\EntLib.config)
10. Update the Biztalk configuration file.
a. Open C:\Program Files (x86)\Microsoft BizTalk Server 2010\BTSNTSvc64.exe.config.xml
b. Add the following code at the top right after <?xml version=”1.0″?><configuration>
  <configSections>
<section name=”enterpriseLibrary.ConfigurationSource” type=”Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection, Microsoft.Practices.EnterpriseLibrary.Common, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ />
</configSections>
<enterpriseLibrary.ConfigurationSource selectedSource=”File Configuration Source: EntLib.config”>
<sources>
<add name=”File Configuration Source: EntLib.config” type=”Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ filePath=”C:\Program Files (x86)\Microsoft BizTalk Server 2010\EntLib.config” />
</sources>
</enterpriseLibrary.ConfigurationSource>
 c. Make sure the filePath is path and file you saved in step 9 above.
d. Save the file.   You will need to restart any host instances that your orchestration runs under.

11. Setup your biztalk project to use the enterprise library
a. Open your solution with your orchestration project.
b. Add the following references to your project

Microsoft.Practices.EnterpriseLibrary.Common.dll
Microsoft.Practices.EnterpriseLibrary.Logging.dll
Microsoft.Practices.ObjectBuilder2.dll

 c. Open up your orchestration you want to setup logging to your file.
- In orchestration view, create a new variable (ie LogEntry)
- Assign the “Type” property to Microsoft.Practices.EnterpriseLibrary.Logging.LogEntry
- Add an expression shape to your orchestration and call it LogEntry
- Add the following code you your expression shape:
LogEntry = new Microsoft.Practices.EnterpriseLibrary.Logging.LogEntry();
LogEntry.Message = “Orchestration Started”;
LogEntry.ProcessName = “MyOrchestrationNameHere”;
LogEntry.Severity = System.Diagnostics.TraceEventType.Information;
Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write(LogEntry);
 d. Save, build and deploy.
e. Run the process to instantiate your orchestration to completion.
f. Open the biztlak log you setup in your configuration (d:\biztalk logs\biztalk.log).  You should see the following:
—————————————-
Timestamp: 12/5/2012 8:58:17 PM
Message: Orchestration Started
Category: General
Priority: -1
EventId: 0
Severity: Information
Title:
Machine:  BiztalkDevServer1
Application Domain: __XDomain_3.0.1.0_0
Process Id: 26868
Process Name: MyOrchestrationNameHere
Win32 Thread Id: 21408
Thread Name:
Extended Properties:
—————————————-
There you have it.   An easy way to document into a file from your Biztalk orchestration.  Happy logging!

Posted in Integration | Leave a comment

Generating a Biztalk Schema for Typed Polling

  1. Open visual studio solution and right click your project and select "Add" then "Add generated items…"
  2. Select "Consume Adapter Service" under Installed Templates pane. Select Consume Adapter Service Generated Schema Files in middle window pane and click add button (or double click it)

  3. Select the sqlBinding in drop down. Click configure button.
  4. Under security tab configure your login credentials.

  5. Under URI properties filling in the following

    Server: Name of sql server (use period for local server)

    InstanceName: Name of the instance on the sql server (blank for default instance)

    InitialCatalog: Name of the database

    InboundId: any name you want to come up with for a unique "polling id" (for example if you have 2 receive locations that are polling the same table, this will uniquely identify it other wise biztalk admin console will error out)

  6. Under the binding properties tab, filling the following

    InboundOperationType: TypePolling

    PollingStatement: exec usp_Biztalk_GetOrdersToProcess

     

  7. Go back to main window and click connect.

  8. Select service (inbound operations) under "Select Contract Type"

  9. Click the forward slash under "Select a category". This will show options under the "Available categories and opeations" window pane.

  10. Under "Available categories and opeations" window pane selct "TypedPolling" and click the Add button (or double click it)
  11. This will add "TypedPolling" under the "Added categories and operations" pane.

  12. Add a prefix if you want it added to the beginning of your schema name

  13. Click OK
  14. You should get one schema with all definitions similar to this:

  15. Now need to setup for debatching
  16. Select Schema folder, and in properties, set Envelope property to "Yes"

  17. Select TypedPolling and in the properties window, set the BodyXpath property by clicking the button with three periods

  18. In the BodyXpath window, select the node highlighted in picture (TypedPollingResultSet0 under TypedPolling).

  19. Finally select the child TypedPollingResultSet0 (Under the TypedPollingResultSet0 you just set as the BodyXpath) and change the Max Occurs from unbounded to 1
  20. Save your changes.

     

 

 

Posted in Integration | Leave a comment

Generating a Biztalk Schema for Typed Polling

 
1.      Open visual studio solution and right click your project and select “Add” then “Add generated items…”
2.      Select “Consume Adapter Service” under Installed Templates pane.  Select Consume Adapter Service Generated Schema Files in middle window pane and click add button (or double click it)
 
3.      Select the sqlBinding in drop down.  Click configure button.
4.      Under security tab configure your login credentials. 
 
5.      Under URI properties filling in the following
Server:  Name of sql server (use period for local server)
InstanceName:  Name of the instance on the sql server (blank for default instance)
InitialCatalog:  Name of the database
InboundId:  any name you want to come up with for a unique “polling id” (for example if you have 2 receive locations that are polling the same table, this will uniquely identify it other wise biztalk admin console will error out)
 
6.       Under the binding properties tab, filling the following
InboundOperationType:  TypePolling
PollingStatement:  exec usp_Biztalk_GetOrdersToProcess
 
7.      Go back to main window and click connect.
 
8.      Select service (inbound operations) under “Select Contract Type”
 
9.      Click the forward slash under “Select a category”.  This will show options under the “Available categories and opeations” window pane.
 
10.   Under “Available categories and opeations” window pane selct “TypedPolling” and click the Add button (or double click it)
11.   This will add “TypedPolling” under the “Added categories and operations” pane.
 
12.   Add a prefix if you want it added to the beginning of your schema name
 
13.   Click OK
14.   You should get one schema with all definitions similar to this:
 
15.   Now need to setup for debatching
16.   Select Schema folder, and in properties, set Envelope property to “Yes”
 
17.   Select TypedPolling and in the properties window, set the BodyXpath property by clicking the button with three periods
 
18.   In the BodyXpath window, select the node highlighted in picture (TypedPollingResultSet0 under TypedPolling).
 
19.   Finally select the child TypedPollingResultSet0 (Under the TypedPollingResultSet0 you just set as the BodyXpath) and change the Max Occurs from unbounded to 1
20.    
21.   Save your changes.
 
 
 
1 Comment
 
View By Author
  • View By Category
View By Date
Part Of SPR COMPANIES
© 2013 SPR Companies. All rights reserved. About | Competencies | Products | Solutions | Clients | Events & Resources | Careers | Site Map | Legal/Privacy