Biztalk 2010 - Problem with business rules - rules with status published instead of deployed

Topics: Bindings File, Settings Management and SSO, General Questions, Getting Started/Beginner, Server Deployment
Jul 18, 2011 at 5:25 PM

Hi all,

Recently I realiced that in some cases, when I perform a full server deploy, when the framework attempts to deploy the business rules, the resulted stae is"Published" and not "deployed",  this causes that the defined apps doesn't work properly. what could be the problem ?

Any help is welcome :)

Thanks!

Julian R Berlin

Coordinator
Jul 18, 2011 at 7:20 PM

Hi Julian,

The policies are normally deployed by BizTalk during its "start application" process.  If you are not starting the application and you still want the policies to be deployed, you can include the property <ExplicitlyDeployRulePoliciesOnDeploy>true</ExplicitlyDeployRulePoliciesOnDeploy>.

Thanks,
Tom

Jul 18, 2011 at 7:37 PM

Thank you very much Tom !!

I will follow your recomendation !!

Julian R Berlin

Jul 20, 2011 at 3:09 PM

Hi Tom

I followed your recomendation but I am getting the same, this is the LOG of the deploy:

Target UndeployVocabAndRules:
                Populating metadata in ItemGroup from policy/vocabulary files content...
                  Working on '..\BRE\Policies\Policy_Cross_Send_Email_EE.xml'...
                    Added item [PolicyName:'Send_Mail_EE'; PolicyVersion:'1.3']
                Finished populating metadata in ItemGroup from policy/vocabulary files content.
                Populating metadata in ItemGroup from policy/vocabulary files content...
                  Working on '..\BRE\Vocabularies\Vocabulary_Cross_Send_Email_EE.xml'...
                    Added item [PolicyName:'Send_Email_EE'; PolicyVersion:'1.2']
                Finished populating metadata in ItemGroup from policy/vocabulary files content.
                "H:\Projects\AdeccoWeb\Deployment\EE\BizTalk\CapGemini.Adecco.AW.Bts.EE\CapGemini.Adecco.AW.Bts.EE.Deployment\bin\Debug\Deployment\Framework\DeployTools\DeployBTRules.exe" /ruleSetName "Send_Mail_EE" /ruleSetVersion "1.3" /unpublish /undeploy
                BizTalk Rules Engine Policy/Vocabulary Deployment Tool v1.1.0.0
                Copyright (C) 2005-2010 Scott Colestock, Thomas F. Abraham
               
                Warning: Could not find a published ruleset with name 'Send_Mail_EE' and version '1.3'.
                Operation complete.
               
                "H:\Projects\AdeccoWeb\Deployment\EE\BizTalk\CapGemini.Adecco.AW.Bts.EE\CapGemini.Adecco.AW.Bts.EE.Deployment\bin\Debug\Deployment\Framework\DeployTools\DeployBTRules.exe" /vocabularyName "Send_Email_EE" /ruleSetVersion "1.2" /unpublish /undeploy
                BizTalk Rules Engine Policy/Vocabulary Deployment Tool v1.1.0.0
                Copyright (C) 2005-2010 Scott Colestock, Thomas F. Abraham
               
                Warning: Could not find a published vocabulary with name 'Send_Email_EE' and version '1.2'.
                Operation complete.
               
            Target DeployVocabAndRules:
                "H:\Projects\AdeccoWeb\Deployment\EE\BizTalk\CapGemini.Adecco.AW.Bts.EE\CapGemini.Adecco.AW.Bts.EE.Deployment\bin\Debug\Deployment\Framework\DeployTools\DeployBTRules.exe" /ruleSetFile "..\BRE\Vocabularies\Vocabulary_Cross_Send_Email_EE.xml"
                BizTalk Rules Engine Policy/Vocabulary Deployment Tool v1.1.0.0
                Copyright (C) 2005-2010 Scott Colestock, Thomas F. Abraham
               
                Importing and publishing from file '..\BRE\Vocabularies\Vocabulary_Cross_Send_Email_EE.xml'...
                Operation complete.
               
                "H:\Projects\AdeccoWeb\Deployment\EE\BizTalk\CapGemini.Adecco.AW.Bts.EE\CapGemini.Adecco.AW.Bts.EE.Deployment\bin\Debug\Deployment\Framework\DeployTools\DeployBTRules.exe" /ruleSetFile "..\BRE\Policies\Policy_Cross_Send_Email_EE.xml"
                BizTalk Rules Engine Policy/Vocabulary Deployment Tool v1.1.0.0
                Copyright (C) 2005-2010 Scott Colestock, Thomas F. Abraham
               
                Importing and publishing from file '..\BRE\Policies\Policy_Cross_Send_Email_EE.xml'...
                Operation complete.
               
                Populating metadata in ItemGroup from policy/vocabulary files content...
                  Working on '..\BRE\Policies\Policy_Cross_Send_Email_EE.xml'...
                    Added item [PolicyName:'Send_Mail_EE'; PolicyVersion:'1.3']
                Finished populating metadata in ItemGroup from policy/vocabulary files content.
                BTSTask.exe AddResource -Type:System.BizTalk:Rules -Overwrite -Name:"Send_Mail_EE" -Version:"1.3" -ApplicationName:"CapGemini.Adecco.AW.Bts.EE"
                Microsoft (R) BizTalk Application Deployment Utility Version 3.9.469.0
                Copyright (c) 2010 Microsoft Corporation. All rights reserved.
               
                Information: Adding resource (-Type="System.BizTalk:Rules" -Luid="RULE/Send_Mail_EE/1.3") to application "CapGemini.Adecco.AW.Bts.EE"...
                Information: Validating resources (count=1)...
                * Validating resource (-Type="System.BizTalk:Rules" -Luid="RULE/Send_Mail_EE/1.3")...
                Information: Found the rules store SERVER="CAPADW028A.aw.capade.capgemini.es" and DATABASE="BizTalkRuleEngineDb_jberlin".
                Information: Finding the rule set name="Send_Mail_EE" and version="1.3"...
                Information: Performing change requests...
                Information: Calling BeginTypeChangeRequest for all selected resource types...
                PerformingBeginChangeRequest
                Updating resource (-Type="System.BizTalk:Rules" -Luid="RULE/Send_Mail_EE/1.3") in store.
                Information: * Performing change request on type "System.BizTalk:Rules" (count=1)...
                Information: Found the rules store SERVER="CAPADW028A.aw.capade.capgemini.es" and DATABASE="BizTalkRuleEngineDb_jberlin".
                Information: Commit the change requests...
                * Performing EndTypeChangeRequest for resource type "System.BizTalk:Rules".
               
                Command succeeded with 0 errors, 0 warnings.

the rules are deployed.....but the resulted status is "Published" instead of "Deployed"  this is the part of the XML of my btdfproj file:

 

 <PropertyGroup>
    <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
    <Platform Condition="'$(Platform)' == ''">x86</Platform>
    <SchemaVersion>1.0</SchemaVersion>
    <ProjectName>CapGemini.Adecco.AW.Bts.EE</ProjectName>
    <ProjectVersion>7.0.4</ProjectVersion>
    <IncludeComponents>false</IncludeComponents>
    <IncludeSSO>false</IncludeSSO>
    <IncludeBam>true</IncludeBam>
    <IncludeMessagingBindings>true</IncludeMessagingBindings>
    <IncludeVocabAndRules>true</IncludeVocabAndRules>
    <StartApplicationOnDeploy>true</StartApplicationOnDeploy>
    <SkipIISReset>true</SkipIISReset>
    <!-- IMPORTANT: Since Orchestration, schemas and transforms are on the same BZ Assembly, only one of
                    the following 3 items can be enabled. Otherwise you would get the following error:
                    Error: Failed to add resource(s). Resource (...) already in store.
                    For each enabled item the next command is executed:
                    BTSTask.exe AddResource -Type:BizTalkAssembly -Source:"CapGemini.Adecco.AW.Bts.BE.dll" -ApplicationName:"CapGemini.Adecco.AW.Bts.BE" -Options:GacOnAdd,GacOnImport,GacOnInstall
    -->
    <IncludeOrchestrations>true</IncludeOrchestrations>
    <IncludeSchemas>false</IncludeSchemas>
    <IncludeTransforms>false</IncludeTransforms>
    <!--Used to replace environment related variables while deploying-->
    <UsingMasterBindings>true</UsingMasterBindings>
    <ApplyXmlEscape>true</ApplyXmlEscape>

    <!-- To Explicitly deploy the business rules regardless the status of the application-->
    <ExplicitlyDeployRulePoliciesOnDeploy>true</ExplicitlyDeployRulePoliciesOnDeploy>

  </PropertyGroup>

and this is the section where we define the rule set files:

 <!-- add vocabolaries and rules -->
  <ItemGroup>
    <RulePolicies Include="Policy_Cross_Send_Email_EE.xml">
      <LocationPath>..\$(ProjectName)\Business Policies\</LocationPath>
    </RulePolicies>
  </ItemGroup>
  <ItemGroup>
    <RuleVocabularies Include="Vocabulary_Cross_Send_Email_EE.xml">
      <LocationPath>..\$(ProjectName)\Business Policies\</LocationPath>
    </RuleVocabularies>
  </ItemGroup>

 

The order of the items could be the problem ? this problem is very hard to reproduce..I was lucky

Thanks you very much

Julian R Berlin

Coordinator
Jul 20, 2011 at 4:02 PM

Hi Julian,

Are you certain that you're using the latest Deployment Framework?  You can search your \Program Files\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets to be certain that it contains ExplicitlyDeployRulePoliciesOnDeploy.

Thanks,
Tom

Jul 20, 2011 at 6:21 PM

Hi tom

I think I modified and I performed the deploy from VS2010 without saving it.....that was the problem !! I hope !!

Yes I have the latest version, if it occurs again I'll let you know !! thank you very much for you help !!

Julian R. Berlin