Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 893469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:13:38+00:00 2026-05-15T14:13:38+00:00

This is proof of concept project – The goal is to create an application

  • 0

This is proof of concept project – The goal is to create an application that receive some system wide events and based on some business rules invokes a specific workflow.

The workflows are created separately and the xaml source is stored in a database.

Following is the code that used to invoke the workflow:

public void RaiseEvent(IEvent e, IEventData eventData)
{ 

    var typeName = e.GetType().FullName;

    // Query Db for all workflows for the event
    var repo = new WorkflowRepository();

    var workflows = repo.GetActiveWorkflowsByEvent(typeName);

    foreach (var wf in workflows)
    {

        var condition =   
 ConditionEvaluator.PrepareCondition(wf.Condition.Expression, eventData);

        var okToStart = ConditionEvaluator.Evaluate(condition);
        if (okToStart)
        {

           // Next line is throwing an exeption
            object o = XamlServices.Parse(wf.WorkflowDefinition.Expression);


            DynamicActivity da = o as DynamicActivity;

            WorkflowInvoker.Invoke(da,  
                   new Dictionary<string, object>   
                       {{ "EventData", eventData }});                   


        }

    }

We have created very simple workflow that runs without problems on its own. But when xaml is being loaded using XamlService.Parse it throw following exception:

System.Xaml.XamlObjectWriterException was unhandled
  Message='No matching constructor found on type 'System.Activities.Activity'.   
You can use the Arguments or FactoryMethod directives to construct this type.' 
Line number '1' and line position '30'.

Any idea what is wrong?
Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T14:13:38+00:00Added an answer on May 15, 2026 at 2:13 pm

    Not sure what is causing your problem, I have used XamlServices.Load() in the past without any problems, but the easiest way of loading a workflow XAML at runtime is by using the ActivityXamlServices.Load(). See here for an example.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a proof-of-concept project I'm working on, I have a generic abstract class that
I'm working on a sort of proof-of-concept for a project that approximates Firebug's inspector
I'm working on a project that's been accepted as a proof of concept and
So I have a layered ASP.NET MVC proof-of-concept application with good separation between presentation
I have some proof concept code for a HTTP module. The code checks to
I'm setting up a proof-of-concept site and it seems that standard web design software
I have a generic proof of concept WCF service that is using forms authentication
I am developing a proof-of-concept tool for an internal research project. We have specific
As a proof of concept, I'm building this extremely simple Twitter Friends crawler. Here's
Im writing a 'proof of concept' application to investigate the possibility of moving a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.