locked
Send data from Console App to a Workflow .NET 4.5 RRS feed

  • Question

  • VS 2012, .NET 4.5

    I have a console app. This is monitoring an AD server. Data gets into the console app when AD is modified. All that works fine.

    Now, I need to create a Workflow, send the data received from AD to workflow, write to a DB.

    I am doing this to understand WF.

    Questions:

    1. What kind of workflow should I have ?

    2. HandleExternalActivity is depricated. What comes in lieu of this?

    3. Can you please give me the complete code when you suggest your design?

    Thank you very much.


    • Edited by Subu Mysore Friday, August 24, 2012 10:24 PM Environment
    Friday, August 24, 2012 10:23 PM

All replies

  • Hi Subu,

    1. Procedural workflow applies to your scenario

    http://msdn.microsoft.com/en-us/library/dd489427

    2. Message activities come in here

    http://msdn.microsoft.com/en-us/library/ee358739

    3. You can refer to following samples:

    http://msdn.microsoft.com/en-us/library/dd699765

    If you need more detailed information, 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.

    Tuesday, August 28, 2012 2:44 AM
  • Yes, Please, I do need FURTHER information. I took time to learn as much, but, am heading in circles.
    Wednesday, August 29, 2012 5:42 PM
  • Hi,

    I'd suggest you start with a basic workflow service sample and a custom activity sample.

    http://msdn.microsoft.com/en-us/library/dd6997

    In your case, you can create a workflow service, call the service operation exposed by message activities to send the data received from AD to workflow, and place a custom activity behind message activity, pass the received data into your custom activity by using InArguemnt. Finally, write the received data to DB in your custom activity.


    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.

    Monday, September 3, 2012 8:08 AM
  • Hi,

    You can try this  e information.

    Thanks,

    Madhur


    MB

    Tuesday, September 4, 2012 5:32 AM
  • Thank you both of you.
    Here is where I stand...

    1. Created custom activities in Project 1

    2. Added new Project (2) for DeclarativeServiceLibrary and added a new Service.xamlx

    3. Built the solution, checked the browser and it says, YOU HAVE CREATED A NEW SERVICE. (Using IIS)

    4. Added the third project (WorkflowConsole). Here, I tried to add a SERVICE REFERENCE to the service.

    But, it is failing...says, end point was not defined. So, I went to the second project tried to edit the Web.config file. But, it is failing...says, the CONTRACT cannot be found...

    QUESTION: Should there not be a default endpoint created while hosting in IIS? What should be the CONTRACT name?...I know it should be an interface name...but, when I try IService1 or Project2.IService1 as the CONTRACT, it is failing...please help. Thank you.

    Tuesday, September 4, 2012 8:48 PM
  • Hi,

    Yes, it will create default endpoint. What is the address you specified when add service reference, have checked the address in browser?

    The contract name is IService by default, you can check the properties of Receive Activity to find the contract name.

    You can also upload your projects to SkyDrive, then we will be able to check your code.


    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, September 6, 2012 6:09 AM