none
writing managed code app without the workflow RRS feed

  • Question

  • Is it possible to write a speech app using the managed code API, but not 
    using the workflow stuff; that is all the activities and graphical designer 
    stuff? "But why don't you want to use the workflow" you might ask. Well, 
    there are too many restrictions and there is too much that has to be specifed 
    at compile time. What you can actually goto in the GoTo Activity is still 
    largely a mystery and extremely frustrating. So we would like to generate our 
    own code, and not use the workflow. I see some log level API calls that seems 
    like they might work for us, but a big question would be around initializing 
    an application. I bet the workflow stuff does a lot of initialization under 
    the covers that we would have to do. Would you recommend maybe just using a 
    workflow to start the app and then run it all from our generated code? I 
    would appreciate any insight into what we are attempting to do. Is it even 
    possible? If you had a hello world app that didn't use the workflow, that 
    would be perfect.
    Regards,
    Mike
    
    Thursday, April 24, 2008 6:07 AM

Answers

  • It certainly is possible. Take class1.cs from a workflow app and IHostedSpeechApplication.Start is your entry point.  Remove the workflow related stuff & put in your own code.  The Core API hangs off the IApplicationHost passed into this method. There's a basic outbound application shown here: http://forums.microsoft.com/unifiedcommunications/ShowPost.aspx?PostID=1666392&SiteID=57 - this shows how to establish a call, then you fill in TelephonySession_OpenCompleted for what happens next.

     

    The Core API is event driven; you start some method (e.g. AcceptAsync, SpeakAsync etc) having 1st subscribed to the corresponding completion event and return, then your application resumes when the completed event fires.  You will need to structure your code very carefully to keep it maintainable.

    Thursday, April 24, 2008 9:27 AM

All replies

  • It certainly is possible. Take class1.cs from a workflow app and IHostedSpeechApplication.Start is your entry point.  Remove the workflow related stuff & put in your own code.  The Core API hangs off the IApplicationHost passed into this method. There's a basic outbound application shown here: http://forums.microsoft.com/unifiedcommunications/ShowPost.aspx?PostID=1666392&SiteID=57 - this shows how to establish a call, then you fill in TelephonySession_OpenCompleted for what happens next.

     

    The Core API is event driven; you start some method (e.g. AcceptAsync, SpeakAsync etc) having 1st subscribed to the corresponding completion event and return, then your application resumes when the completed event fires.  You will need to structure your code very carefully to keep it maintainable.

    Thursday, April 24, 2008 9:27 AM
  • Thanks Anthony. That was very helpful. I'll play around with it.

    One followup question would be is there an easy way to identify classes that are part of the core api and have no workflow dependencies in the speech server/development/technical reference section of the OCS SS help file? I thought I remember in the early days the core stuff was moved out separately.

    Thanks,

    Mike

     

    Thursday, April 24, 2008 3:31 PM
  • All the workflow stuff should be under the namespace Microsoft.SpeechServer.Dialog.

    Thursday, April 24, 2008 4:09 PM