0

I was wondering if anybody ran into the same issue as I am facing now.

What I'm trying to do is have a workflow that checks the condition of a field (optionset) of a form. If the field has option 1, 2 or 3 then create new record with certain shared attributes, otherwise start a child workflow. The child workflow is a "Dialog" process, not a "workflow" process which informs the user that the record was not created and why. For some reason I cannot select the dialog workflow from the dropdown list of available child workflows...

Both the parent workflow and the "dialog" workflow process are based on the same entity.

If anybody has any ideas on how I could debug this or any clues in general I would greatly appreciate your feedback.

Thanks for taking the time to read this post!

4

1 回答 1

0

It is not possible to call a dialog from a workflow (see here).

Workflows are generally triggered by events.
Imagine the ramifications - which user would receive the dialog and what if no-one was logged in?

One option is to drive everything with JavaScript

  • Trigger on change of the option set
  • Create the records
  • Start the workflow
  • Start the dialog
    • See the section under the heading "Opening a Dialog Process by Using a URL" on MSDN here
    • Rather use the URL than showModalDialog or showModelessDialog.

What might work even better is to call an Action from JavaScript. The Action can run synchronously and create all records, start child workflows and dialogs.

A synchronous workflow can stop an event and return an error message to the user, but cannot return success messages - it look like this will not meet your requirements, but Gareth Tucker has an example here.

于 2014-02-04T18:02:10.477 回答