none
MDS SQL Server 2012 RC0 Sharepoint Workflow

    Dotaz

  • Hi,

    At first my configuration is, SQL Server 2012 RC0 & Sharepoint Foundation 2010. The Sharepoint Databases are on the same SQL Server Instance as the MDS Database.

    I made a sequential Site-Workflow in Visual Studio 2010 (it just creates a task).

    My Microsoft.MasterDataServices.Worfkflow.exe.config looks like:

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
        <configSections>
            <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
                <section name="Microsoft.MasterDataServices.Workflow.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
            </sectionGroup>
        </configSections>
        <applicationSettings>
            <Microsoft.MasterDataServices.Workflow.Properties.Settings>
                <setting name="ConnectionString" serializeAs="String">
                    <value>Server=.;Database=MDS_Test;Integrated Security=False;User Id=mdsworkflow;Password=****</value>
                </setting>
            </Microsoft.MasterDataServices.Workflow.Properties.Settings>
        </applicationSettings>
    </configuration>

    My call for the Sharepoint Workflow looks like:

    I started in the command prompt the statement Microsoft.MasterDataServices.Workflow.exe -console.  Every time i start a validation i get the error "Could not dispatch due to missing extender: SPWF". The ServiceBroker is on, the Queues are gonna be filled and cleared. To my knowledge, when i say its a SPWF, then MDS knows that its a Sharepoint Workflow, isn't it? And in the Sharepoint History i didn't see an entry. If the Workflow fails, then i must see at least a failure entry in the Workflow History.

    I sought-after the last 2 days at Mrs. Bing and Mr. Google, but i didn't find a answer to my Problem and i hope thats here anybody that can help me.

    17. února 2012 7:21

Všechny reakce

  • I was able to setup the sharepoint workflow with no problem, and here is a copy of the config file:

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    	<configSections>
    		<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
    			<section name="Microsoft.MasterDataServices.Workflow.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    		</sectionGroup>
    	</configSections>
    	<applicationSettings>
    		<Microsoft.MasterDataServices.Workflow.Properties.Settings>
    			<setting name="ConnectionString" serializeAs="String">
    				<value>Server=i000173;Database=MDM;Integrated Security=SSPI</value>
    			</setting>
    		</Microsoft.MasterDataServices.Workflow.Properties.Settings>
    	</applicationSettings>
    </configuration>

    The only thing I see different is the connection string.  I found the example in the book Microsoft SQL Server 2008 R2 Master Data Services very helpful.  The only thing it missed mentioning is the config change.  I had the wrong config so the workflow was not processed by the service.  Hope it helps.

    17. února 2012 23:26
  • What do you mean with "config change"?

    Is there any known issue with MDS 2012 RC0 and Sharepoint 2010? Does anyone has this setup with a working sharepoint workflow?

    20. února 2012 7:12
  • As I mentioned before, I setup the sharepoint workflow succesfully, however I had to change the config settings to the one I sent you.  It wasn't setup initially when I installed the MDM workflow integration service, so the sharepoint work flow didn't get kicked off correctly.  It might be something I missed. The book I mentioned above has the step to step instructions of how to setup the Sharepoint work flow. 

    21. února 2012 23:14
  • I copied your config and changed the server and database, but I get the same error again. Wenn I start the -console it writes 

    Do you get the same message? Do I get maybe a corrupt .exe?

    22. února 2012 8:22
  • I have exactly the same Issue

    Any help would be appreciated

    Sebastien


    Sébastien Pertus. Bewise

    12. července 2012 14:45
  • Big big fail from Master Data Services Team ...

    I reflected the Microsoft.MasterDataServices.Workflow.exe and here is the difference beetween 2008 R2 version and 2012 :

    2008 R2 :

      private static bool DispatchExternalActions()
        {
            // Nothing interesting here
    
            while (!WorkflowService.stopEvent.WaitOne(0))
            {
                SqlDataReader sqlDataReader = sqlCommand.ExecuteReader();
                while (sqlDataReader.Read())
                {
                    SqlXml sqlXml = sqlDataReader.GetSqlXml(0);
                    @value.InnerXml = sqlXml.Value;
                    foreach (XmlNode childNode in @value.ChildNodes)
                    {
                        string upperInvariant = childNode["Type"].InnerText.ToUpperInvariant();
                        string innerText = childNode["Server_URL"].InnerText;
                        string str = childNode["Action_ID"].InnerText;
                        object[] objArray = new object[3];
                        DateTime now = DateTime.Now;
                        objArray[0] = now.ToString();
                        objArray[1] = str;
                        objArray[2] = innerText;
                        Program.WriteLine(string.Format(CultureInfo.InvariantCulture, "[{0}] Workflow {1} on {2}", objArray));
                        try
                        {
                            if (upperInvariant == "SPWF")
                            {
                                WorkflowService.DispatchSPWorkflow(innerText, str, childNode, strs);
                            }
                            else
                            {
                                IWorkflowTypeExtender workflowTypeExtender = null;
                                if (WorkflowService.extenders != null)
                                {
                                    WorkflowService.extenders.TryGetValue(upperInvariant, out workflowTypeExtender);
                                }
                                if (workflowTypeExtender == null)
                                {
                                    Program.WriteLine(string.Concat("Could not dispatch due to missing extender: ", upperInvariant));
                                }
                                else
                                {
                                    Program.WriteLine(string.Concat("Dispatching using extender: ", upperInvariant));
                                    workflowTypeExtender.StartWorkflow(upperInvariant, (XmlElement)childNode);
                                }
                            }
                        }
                        catch (Exception exception1)
                        {
                            Exception exception = exception1;
                            object[] str1 = new object[1];
                            str1[0] = exception.ToString();
                            Program.WriteLine(string.Format(CultureInfo.InvariantCulture, "Error starting workflow:\n{0}\n", str1));
                            ExceptionInspector.RethrowCriticalException(exception);
                        }
                    }
                }
                sqlDataReader.Close();
                sqlDataReader.Dispose();
            }
            return false;
        }

    And this is the 2012 version :

                      Program.WriteLine(string.Format(CultureInfo.InvariantCulture, "[{0}] Workflow {1} on {2}", now), EventLogEntryType.Information);
                        try
                        {
                            IWorkflowTypeExtender workflowTypeExtender = null;
                            if (WorkflowService.ExtenderCache != null)
                            {
                                WorkflowService.ExtenderCache.TryGetValue(upperInvariant, out workflowTypeExtender);
                            }
                            if (workflowTypeExtender == null)
                            {
                                object[] objArray = new object[1];
                                objArray[0] = upperInvariant;
                                Program.WriteLine(string.Format(CultureInfo.InvariantCulture, "Could not dispatch due to missing extender: {0}", objArray), EventLogEntryType.Error);
                            }
                            else
                            {
                                object[] objArray1 = new object[1];
                                objArray1[0] = upperInvariant;
                                Program.WriteLine(string.Format(CultureInfo.InvariantCulture, "Dispatching using extender: {0}", objArray1), EventLogEntryType.Information);
                                workflowTypeExtender.StartWorkflow(upperInvariant, (XmlElement)childNode);
                            }
                        }
                        catch (Exception exception1)
                        {
                            Exception exception = exception1;
                            object[] objArray2 = new object[1];
                            objArray2[0] = exception;
                            Program.WriteLine(string.Format(CultureInfo.InvariantCulture, "Error starting workflow:\n{0}\n", objArray2), EventLogEntryType.Error);
                            WorkflowService.RethrowCriticalException(exception);
                        }

    So no specific code for launching Sharepoint Workflow for 2012 ..

    You have to create an extender ..

    I will develop one if i have time

    Stay tuned

    (Seriously SQL SERVER 2012 IS RTM ...)

     

    Sébastien Pertus. Bewise

    12. července 2012 15:24
  • You will have a complete solution explained here : http://social.msdn.microsoft.com/Forums/en-US/sqlmds/thread/a31769eb-948c-4bb2-844d-72d70e34292b


    Sébastien Pertus. Bewise

    17. července 2012 15:30