How to wrap an ActivityAction in a composite activity RRS feed

  • Question

  • Hi

    I have an activity that has an ActivityFunc<> delegate. I have hooked this up to the designer using WorkflowItemPresenter and configured it in CacheMetaData and it is all working great.

    Now I need to create a composite activity that uses this activity plus a few others. I have no problem with setting up variables to chain them together and configuring them in CacheMetadata as AddImplementationChild() etc. But I don't know how to expose the ActivityFunc<> from the child activity up into the composite activity or create a new ActivityFunc<> in the composite activity and then somehow pass it into the child activity at execution time.

    Should I be using implementation variables? inarguments?  - is there a built in activity that follows this pattern?


    T Rex

    Tuesday, June 7, 2011 1:20 PM


  • I found a workaround but it does not for pretty code:

    I exposed the child activities property as a property of the parent:


        public ActivityFunc<FileInfobool> ReceivedFileValidator 
            return this._getFilesInDirectory.FileValidator;
            this._getFilesInDirectory.FileValidator = value;

    By doing this I need to create more class level variables then I would like but it does execute OK.

    • Marked as answer by Andrew_Zhu Tuesday, June 14, 2011 6:50 AM
    Tuesday, June 7, 2011 2:44 PM