none
Need the way RRS feed

  • Question

  • Hi,
    Is there one tutorial/sample, in which we from time to time, check the database to retrieve one recordset, and then further perform 2 actions in the server machine, like
    1. Move the relevant flat file from one place to another based on the given value of the file name of the record in the recordset
    2. Update the status of the relevant record in (1), to 'Completed'

    Many Thanks & Best Regards, Hua Min

    Thursday, November 15, 2012 2:41 AM

All replies

  • Hi,

    You can check the sample here:

    How to poll database using WCF-SQL adapter

    http://www.enterpriseapplicationsdevelopment.com/2010/02/how-to-pull-database-using-wcf-sql.html

    To further actions, you can make a .NET call via expression shape, or construct a message to update the record.

    Using Expressions in Orchestrations

    http://msdn.microsoft.com/en-us/library/aa995543(v=bts.10).aspx


    Leo Tang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Jackson_1990 Friday, November 23, 2012 4:48 AM
    • Unmarked as answer by Jackson_1990 Friday, November 23, 2012 4:53 AM
    Friday, November 16, 2012 11:24 AM
    Moderator
  • Many thanks. According to your link for the steps provide, in the following, where can I put this "Poll data available statement: select top(1) * from MainData"?

    And I've got the following once I clicked 'OK' to go above.
    Microsoft.ServiceModel.Channels.Common.MetadataException: Retrieval of Operation Metadata has failed while building WSDL at 'TypedPolling' ---> Microsoft.ServiceModel.Channels.Common.MetadataException: The value "" for the property PollingStatement is invalid.
       at Microsoft.Adapters.Sql.SqlAdapterMetadataResolverHandler.ResolveOperationMetadata(SqlAdapterConnection sqlAdapterConnection, MetadataLookup metadataLookup, String operationId, ISqlAdapterBindingProperties bindingProperties, TimeSpan timeout)
       at Microsoft.Adapters.Sql.ASDKConnectionHandler.Microsoft.ServiceModel.Channels.Common.IMetadataResolverHandler.ResolveOperationMetadata(String operationId, TimeSpan timeout, TypeMetadataCollection& extraTypeMetadataResolved)
       at Microsoft.ServiceModel.Channels.Common.Design.MetadataCache.GetOperationMetadata(String uniqueId, Guid clientId, TimeSpan timeout)
       at Microsoft.ServiceModel.Channels.Common.Design.WsdlBuilder.SearchBrowseNodes(MetadataRetrievalNode[] nodes, WsdlBuilderHelper helper, TimeoutHelper timeoutHelper)
       --- End of inner exception stack trace ---

    Server stack trace:
       at Microsoft.ServiceModel.Channels.Common.Design.AdapterExceptions.ThrowMetadataException(String errorMessage, Object arg, Object source, Exception innerException)
       at Microsoft.ServiceModel.Channels.Common.Design.WsdlBuilder.SearchBrowseNodes(MetadataRetrievalNode[] nodes, WsdlBuilderHelper helper, TimeoutHelper timeoutHelper)
       at Microsoft.ServiceModel.Channels.Common.Design.WsdlBuilder.GenerateOperationSchemas(WsdlBuilderHelper helper, MetadataRetrievalNode[] nodes, TimeSpan timeout)
       at Microsoft.ServiceModel.Channels.Common.Design.WsdlBuilder.GetWsdl(MetadataRetrievalNode[] nodes, Uri uri, TimeSpan timeout)
       at Microsoft.Adapters.Sql.SqlAdapterWsdlRetrieval.Microsoft.ServiceModel.Channels.Common.IWsdlRetrieval.GetWsdl(MetadataRetrievalNode[] nodes, Uri uri, TimeSpan timeout)
       at Microsoft.ServiceModel.Channels.Common.Design.MetadataExchanger.ProcessMetadataGet(Message message, Uri target, TimeSpan timeout, MetadataLookup metadataLookup)
       at Microsoft.ServiceModel.Channels.Common.Design.MetadataExchanger.ProcessMetadataMessage(Message message, Uri target, TimeSpan timeout, MetadataLookup metadataLookup, Message& replyMessage)
       at Microsoft.ServiceModel.Channels.Common.Channels.AdapterRequestChannel.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.ServiceModel.Channels.IMetadataRetrievalContract.GetMetadata(MetadataRetrievalNode[] nodes)
       at Microsoft.ServiceModel.Channels.Tools.MetadataSearchBrowse.MetadataPanel.GetWsdl(MetadataRetrievalNode[] nodes)
       at Microsoft.ServiceModel.Channels.Tools.MetadataSearchBrowse.MetadataUserControl.GetWsdl()

    BTW, how about the steps that at the end of the project, I want to call one other SP to perfrom some other update/insert in the DB?


    Many Thanks & Best Regards, Hua Min



    Monday, November 19, 2012 6:28 AM
  • Hi,

    ->According to your link for the steps provide, in the following, where can I put this "Poll data available statement: select top(1) * from MainData"?

    You need to put the statement before connect to the database. When you press the config button, you can find the property of Poll data available statement in the binding tab.

    ->BTW, how about the steps that at the end of the project, I want to call one other SP to perfrom some other update/insert in the DB?

    You can construct a new message in orchestration, then send it to DB.


    Leo Tang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, November 20, 2012 2:49 AM
    Moderator
  • Hi,
    I followed the link you provided and before this I created this SP
    CREATE PROCEDURE dbo.PollData
    AS
    select *
    from dbo.statustab
    where status='RecOK'
    GO

    But here after I've put 'TypedPolling' in Category, that 'Add' button is not available below. Why?

    Could you please provide the full steps instead of the above tutorial (from the link)?
    ->You can construct a new message in orchestration, then send it to DB.
    Can I have the detailed steps as well?

    By the way, where can we request to have the detailed steps of the relevant sample/tutorials we need, from Microsoft?


    Many Thanks & Best Regards, Hua Min





    Tuesday, November 20, 2012 3:20 AM
  • Hi,

    Firstly, you type the Polling statement

    Then, you add the TypedPolling:

    Finally, click OK.

    To create a new message in orchestration, you can refer to:

    What is the best way to create a new message within a BizTalk Orchestration?

    http://stackoverflow.com/questions/313269/what-is-the-best-way-to-create-a-new-message-within-a-biztalk-orchestration

    To request a sample from Microsoft, you can try All-In-One free code sample request service.

    Thanks.


    Leo Tang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, November 21, 2012 8:55 AM
    Moderator
  • Yes, here are what I selected

    and here is the SP which does exist in the DB

    CREATE PROCEDURE dbo.PollData
    AS
    select *
    from dbo.statustab
    where status='RecOK'
    GO

    After I've clicked 'OK' above to go, the 'Add' button is not available as I mentioned yesterday.


    Many Thanks & Best Regards, Hua Min

    Wednesday, November 21, 2012 9:48 AM
  • Hi,

    The store procedure won't show as an available categories, you'll need to select "Service(Inbound operations)", then click "....../" to select a category, then high-light "TypedPolling" in textbox for Available categories and operations.

    If I misunderstood you, please let me know. Thanks.


    Leo Tang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, November 22, 2012 9:17 AM
    Moderator
  • I followed this link
    http://www.enterpriseapplicationsdevelopment.com/2010/02/how-to-pull-database-using-wcf-sql.html

    when adding adapter metadata, we have to click 'Configure' and then put these
    Inbound operation type: TypedPolling
    Poll data available statement: select top(1) * from MainData
    ...

    if not, where should we put the above ones in italic?

    Many Thanks & Best Regards, Hua Min

    Thursday, November 22, 2012 9:28 AM
  • Hi,

    Yes, we put the above one in italic when adding adapter metadata. Then, click "OK", click "Connect", select "Service(Inbound operations)", click "....../", chose "TypedPolling" , click "Add", click "OK".

    I hope this information make it more clear, thanks.


    Leo Tang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, November 23, 2012 3:50 AM
    Moderator
  • But the problem is, after I put those inside 'Configure' and then return to 'Consume adapter service', the 'Add' button there is not available, like what I mentioned 2 days ago!

    Here is what I've got (you see it is connected),

    after I've put all these inside 'Configure':

    Client Credential Type: Windows
    URI properties
    InboundID: ID1
    Server: localhost
    Initial catalog: TestWCFSQL
    Binding properties
    Inbound operation type: TypedPolling
    Poll data available statement: select top(1) * from MainData
    Polling statement: exec dbo.PollData


    Many Thanks & Best Regards, Hua Min


    Friday, November 23, 2012 3:56 AM
  • Hi,

    Have you clicked the "....../" in the textbox which under the label "Select a category"?


    Leo Tang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Jackson_1990 Friday, November 23, 2012 4:48 AM
    • Unmarked as answer by Jackson_1990 Friday, November 23, 2012 4:53 AM
    Friday, November 23, 2012 4:43 AM
    Moderator
  • Thanks a lot. I can further go now and am able to generate odx, xsd and etc.

    For this,

    In orchestration create message, name it SQLPoll

    Set message type: To multipart message type which was auto created

    what message type should be selected?


    Many Thanks & Best Regards, Hua Min

    Friday, November 23, 2012 4:54 AM