简体   繁体   中英

Viewing Generated Workflow in Designer

I am building up a workflow using the ActivityBuilder and ActivityXamlServices class. When I try to view the outputted XAML in Workflow Designer, I get the following error: ArgumentNullException (errors in SetFlowElementModelItem). It seems as though the workflow designer is having trouble parsing the XAML. If I hand edit the XAML (comparing it to a manually created workflow), I can get it to display. There are some minor differeces such as:

The generated XAML uses the StartNode Attribute (ie StartNode="{x:Reference __ReferenceID5}") whereas the manually created workflow's XAML uses a StartNode element (ie ...)

Also, the generated XAML does not have any elements.

I find it odd that a workflow created by .NET cannot be loaded by .NET.

Has anyone encountered this issue before?

It turns out it was an issue with the FlowSwitch activity. We were not adding an activity to its list of nodes. Also, we were not setting the class name.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM