GithubHelp home page GithubHelp logo

DynamicActivity about corewf HOT 11 CLOSED

ewinnington avatar ewinnington commented on August 19, 2024
DynamicActivity

from corewf.

Comments (11)

dmetzgar avatar dmetzgar commented on August 19, 2024 1

Looks like .NET Standard 2.0 is planning to have PropertyDescriptor and TypeDescriptor. Those are key for porting dynamicactivity and automatic cachemetadata.

from corewf.

ewinnington avatar ewinnington commented on August 19, 2024 1

DynamicActivity declared in Imperative code works.

That's enough for tonight. Tomorrow, I'll attack XAML Loading.

from corewf.

dmetzgar avatar dmetzgar commented on August 19, 2024

DynamicActivity takes a heavy dependency on System.ComponentModel, most of which is not ported to Core. There are some parts of componentmodel, but not enough to cover WF scenarios. It would have to be evaluated to see if regular reflection could be used instead.

from corewf.

ewinnington avatar ewinnington commented on August 19, 2024

With 2.0 arriving soon, is there something external contributors could do to help port coreWF?

from corewf.

dmetzgar avatar dmetzgar commented on August 19, 2024

I updated the readme with a bit more details. Would you mind having a look?

from corewf.

ewinnington avatar ewinnington commented on August 19, 2024

Thanks for the update. So if I understand correctly, we can fork your repo and start bringing in the DynamicActivity and the ActivityXamlServices from the MIT licensed ReferenceSource, get that to compile with NetStandard 2.0, add PortableXAML for the parsing and we are off to the races?

Thank you again for that update.

from corewf.

dmetzgar avatar dmetzgar commented on August 19, 2024

Yes, that's right! I'll be helping out here and there but all of this work is definitely up for grabs.

from corewf.

ewinnington avatar ewinnington commented on August 19, 2024

I've started going through adding DynamicActivity and re-enabling attributes such as [Ambient] through pulling in PortableXAML.

Was there any documentation or porting information in the move to net core?
A list of the remappping of the namespaces perhaps? Microsoft.Activities to CoreWf.

I'll diff with the reference source to try and understand the changes.

from corewf.

ewinnington avatar ewinnington commented on August 19, 2024

I've brought DynamicActivity without any XAML namespace into coreWF. It compiles, but does not work for the simple example of "To create an activity at runtime using imperative code" .

I'm getting this exception:

Unhandled Exception: CoreWf.InvalidWorkflowException: The following errors were encountered while processing the workflow tree:
'DynamicActivity': The private implementation of activity '1: DynamicActivity' has the following validation error: An error occurred while attempting to extract the target object of type 'CoreWf.InArgument1[System.String]' from the method call expression 'value(DynamicConsoleApp.DynamicDemo+<>c__DisplayClass0_0).textOut.Get(env)'. Note that the expression determining the object of type 'CoreWf.InArgument1[System.String]' must not require the runtime context. Error: The sub-expression for the object of type 'CoreWf.InArgument1[System.String]' resulted in a location reference that is not visible at this scope. at CoreWf.Validation.ActivityValidationServices.ThrowIfViolationsExist(IList1 validationErrors, ExceptionReason reason) in corewf\src\CoreWf\Validation\ActivityValidationServices.cs:line 64
at CoreWf.Hosting.WorkflowInstance.ValidateWorkflow(WorkflowInstanceExtensionManager extensionManager) in corewf\src\CoreWf\Hosting\WorkflowInstance.cs:line 359
at CoreWf.Hosting.WorkflowInstance.RegisterExtensionManager(WorkflowInstanceExtensionManager extensionManager) in corewf\src\CoreWf\Hosting\WorkflowInstance.cs:line 184
at CoreWf.WorkflowApplication.EnsureInitialized() in corewf\src\CoreWf\WorkflowApplication.cs:line 615
at CoreWf.WorkflowApplication.RunInstance(WorkflowApplication instance) in corewf\src\CoreWf\WorkflowApplication.cs:line 1220
at CoreWf.WorkflowApplication.Invoke(Activity activity, IDictionary2 inputs, WorkflowInstanceExtensionManager extensions, TimeSpan timeout) in corewf\src\CoreWf\WorkflowApplication.cs:line 1250 at CoreWf.WorkflowInvoker.Invoke(Activity workflow, IDictionary2 inputs, TimeSpan timeout, WorkflowInstanceExtensionManager extensions) in corewf\src\CoreWf\WorkflowInvoker.cs:line 331
at CoreWf.WorkflowInvoker.Invoke(Activity workflow, IDictionary`2 inputs) in corewf\src\CoreWf\WorkflowInvoker.cs:line 97
at DynamicConsoleApp.DynamicDemo.RunDynamicWriteLine() in corewf\test\DynamicConsoleApp\DynamicConsoleApp.cs:line 43
at DynamicConsoleApp.DynamicDemo.Main(String[] args) in corewf\test\DynamicConsoleApp\DynamicConsoleApp.cs:line 48

Update: A DynamicActivity without Properties (DynamicActivityProperty) works.

Update2: Seems the error for the DynamicActivity properties is connected to the CacheMetadata. I can follow the track down to ExpressionUtilities from the Activity.InternalCacheMetadata.

Update3: The fork has been updated with DynamicActivity inside.

from corewf.

dmetzgar avatar dmetzgar commented on August 19, 2024

Great work!

from corewf.

github-actions avatar github-actions commented on August 19, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from corewf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.