locked
Return Values from Child Dialogs-can it be done? RRS feed

  • Question

  • Hello,

    I have a moderately involved dialog workflow. I launch a child dialog if a certain condition evaluates to true. I have no difficulty passing input values to the child dialog......what I want is return values. See this dialog will NOT be updating any records and instead is purely for capturing some user input then returning those values back to the parent dialog flow.

    I don't see an obvious way to do it?

    So I have thought of some alternatives.

    1. Instead of launching a child dialog just have a page nested in the conditional branch so that it shows if the conditions are met. This is OK but does not allow me to have the information gathering process available to other dialogs and that would be nice. Regardless this is my first choice.

    2. Create a "temp" DataGathering entity, create a record, then exit. The parent workflow would then read this "temp" record and get the values needed. This allows my information gathering dialog to be available to other processes but seems like I'm using virtual duct tape and bailing wire.

    3. Create a custom object that has properties to hold the gathered values. The child dialog would populate these properties and the parent would also have access to this object and thus the properties. This allows my information gathering dialog to be used by others. It is not as cobbled together as option 2...but custom code...really? I do have several other custom objects in this implementation so it wouldn't be that big a deal.

    Thoughts? Ideas?

    Thursday, January 16, 2014 1:53 AM

Answers

All replies

  • Hi,

    Gathering data from other workflows or dialog sessions could not be done. So, instead of your solutions, I suggest to create a custom workflow activity for you requirement. It does not need any custom entity or other things. Have a look at this MSDN article or a guide from Mahender Pal.

    Thursday, January 16, 2014 6:18 AM
    Moderator
  • Hello,

    Thank you for confirming that data can't be made available between dialog workflows. Your above proposed solutions are very similar to my option 3 only I do have one question....I need the dialogs for user interactions...the above referenced link are merely custom workflows. How do I implement a custom workflow yet maintain the dialog sessions for user interactions?

    Thursday, January 16, 2014 2:17 PM
  • You could use your developed workflow activity in both workflows and dialogs, same as other built-in activities.
    Thursday, January 16, 2014 2:51 PM
    Moderator