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

  • SEARCH
  • Home
  • 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 950693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:36:31+00:00 2026-05-15T23:36:31+00:00

Is this possible? I know it is for MS since they have WF activity

  • 0

Is this possible? I know it is for MS since they have WF activity packs but I’m not sure how it’s done. It would be nice to be able to have Activities with Body blocks to insert other activities, buttons, etc. If not too much trouble and/or time consuming that is.

  • 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-15T23:36:31+00:00Added an answer on May 15, 2026 at 11:36 pm

    Its easy enough if you follow a few rules. Here’s an example of a NativeActivity that has a child:

    [Designer(typeof(MyActivityDesigner)), ContentProperty("Child")]
    public sealed class MyActivity : 
        NativeActivity, IActivityTemplateFactory
    {
        // this "activity delegate" holds our child activity
        public ActivityAction Child { get; set; }
    
        // may be necessary to do this
        protected override void 
            CacheMetadata(NativeActivityMetadata metadata)
        {
            metadata.AddDelegate(Child);
        }
    
        protected override void 
            Execute(NativeActivityContext context)
        {
            // do some work here, then
            context.ScheduleAction(Child);
        }
    
        // better to use a template factory than a constructor to do this!
        Activity IActivityTemplateFactory
            .Create(System.Windows.DependencyObject target)
        {
            return new MyActivity
            {
                // HAVE to have this set, or it fails in the designer!
                Child = new ActivityAction()
            };
        }
    }
    

    Note a few things: We use an Activity Delegate type to hold our child. Second, we implement IActivityTemplateFactory to configure our activity for the designer. Its always better/more stable to do this than set stuff up in the constructor. We will be binding to a property of the delegate, so we have to set an instance; otherwise the binding will fail.

    When we execute, all you have to do is schedule your child when appropriate and return. You shouldn’t block, of course.

    Then, in the designer, you’d bind to Child like this:

    <sap:WorkflowItemPresenter
        HintText="Add children here!"
        Item="{Binding Path=ModelItem.Child.Handler}" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Whether this is possible I don't know, but it would mighty useful! I have
I'm not entirely sure if this is possible, but does anyone know how, or
I'm not sure if what I'm asking is possible at all, but since python
I don't know if this is possible or not, or if my limited knowledge
I know this rather goes against the idea of enums, but is it possible
Is this possible? I had troubles with SVN clients not being able to access
I know how to do this using for loops. Is it possible to do
I don't know if this is too specific a question, if that is possible,
Is this possible? I want to have the To:, Body, and an Attachment all
I know its probably possible, but is it practical and doable to try and

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.