How do I add new code activities to rehosted workflow in WF4.5? - workflow-foundation-4

How do I add code activies to my hosted workflows in WF4.5? I know that when I create a new workflow application in VS, then hit F6 to compile it, it shows up in the toolbox. But with out creating an assembly that one of my users would have to import, how do I create a toolbox [code] activity in WF4.5?

Here's an article that discusses loading custom activities into the toolbox on a rehosted WF4 application: http://msmvps.com/blogs/theproblemsolver/archive/2009/12/23/rehosting-the-workflow-designer-in-wf4.aspx

Related

Extensible application using Qt

I am working on an application which interact with a database and construct reports, I want this application to be extensible and I can in the future to integrate custom report builders to the application as plugins.
I have some question about the plugin architecture supported by Qt:
Can I load the plugins in there own processes ?
How could I send some custom QML type from the plugin to main application and hook some event handlers on it.
Another question: is there any framework to develop service based qt application ?
Can I load the plugins in there own processes ?
Not with the plugin mechanism (QPluginLoader). The plugin mechanism dynamically loads libraries (different threads are possible). However, your plugins can be a normal application, that gets started by your main application via QProcess, and exchange data via stdin/stdout (or other IPC mechanisms)
How could I send some custom QML type from the plugin to main application and hook some event handlers on it.
In case you use normal plugins, simply add method that returns the created QML object. Have a look at:https://doc.qt.io/qt-5/qtqml-cppintegration-interactqmlfromcpp.html#loading-qml-objects-from-c
In case you want to use the multi process version, it gets slightly more complicated. Pass the QML code via stdout and create it in your main application. Pass some "communicator" object to this created QML object, so that the QML type can send back data via that communicator to it's original process.

how to create a custom windows workflow activity using wire to connect its sub-activities

I can create custom activities with a custom activity designer using WorkItemsPresenter. Sub-activities can be drag into my custom activity. But each of sub-activities sit side by side.
Is there a way to connect those sub-activities using wire like Flowchart or StateMachine activity?
Thanks
In Visual Studio, you add a new Activity (.xaml file). Then use the toolbox to add a container (you can add sequence, flowchart, state machine) There is some basic tutorials for each on MSDN.
Then you add your custom activities from the toolbox (if you just added the custom activity, make sure that dll is referenced and that you have performed a build to see it)

Workflow implementation

Where I can find example for workflow implementation? Actually we are not able to attach workflow definition to a Page or Component. We have created new Workflow definition for Page and Component when we open a page and go to Workflow tab it is showing "Approval Status: Undefined"
We recently upgraded from Tridion 5.3 to Tridion 2011 SP1, we have executed the step mentioned in Upgrade manual "Upgrading existing default Workflow Process
Definitions"
As per my understanding under workflow tab we should be able to select workflow definition to be followed by Page or Component
For Pages, Workflow Processes are attached to Structure Groups (you'll be able to select the Process Definition in the Workflow Tab of the Structure Group). When attached to a SG, any page that you create or edit in that SG will start the workflow for that item. Note that Structure Group's do not inherit this setting, so every SG you'll have to attach the process to.
For Components, Workflow Processes are attached to the Schema (you'll be able to select the Process Definition in the Workflow Tab of the Schema). When a Schema has a workflow, any Component that is created or edited using that schema will be put into a workflow.
Note that child Publications won't automatically have Components and Pages kick into workflow. For example, if your schemas with attached Process Definitions are at the 010 level, and your components are at the 020 level, you'll have to go to the Workflow Tab in the Publication properties of your 020 level and make sure to check "Enable Workflow Process Associations in Shared Schemas and Structure Groups".
Hope that helps!

Track compilation time of user controls and pages

Using pre and post build tasks in Visual Studio 2010, I can record compilation time through the day. I'd like to do the same with dynamically compiled user controls and pages, to monitor what happens in Temporary ASP.NET.
Should I create a custom C# compiler that calls the "real" compiler, with log output before/after?
Creating a "custom" compiler and referencing it from the web.config seems to be a way.
I'm now stuck with weird behavior: LINQ-related error when using simple CSharpCodeProvider in ASP.NET

Event handler for Tridion workflow automatic decision

Having trouble with automatic decisions in Tridion 2011 SP1.
I have an auto-decision item that go down one of two paths (one to a manual decision and the other to a manual activity). Screenshot attached.
What I need to do is analyse the permissions of the user that submits the first step in the workflow and automatically move the workflow down the correct path.
I am using an event handler for the AutomaticAssignActivity (tested successfully with event log writes) and have found in the API how to finish the activity but there's not overload for assigning the next activity.
I found this post an interesting read and tried to implement the CoreServiceSession and SessionAwareCoreServiceClient but each time the code tries to load the core service I receive the following error: Could not load file or assembly 'Tridion.ContentManager.CoreService.Client, Version=6.1.0.996, Culture=neutral, PublicKeyToken=ddfc895746e5ee6b' or one of its dependencies. The system cannot find the file specified.
I am using the core service in my web layer for some minor content generation but it doesn't want to work from within the events system. What am I doing wrong? My events system DLL is in the Tridion bin folder where Tridion.ContentManager.CoreService.Client.dll sits.
Any help appreciated :)
Note that if you are developing an Event handler, you should better use the TOM.NET API (it is the preferred API for Event System and templating developments)
For all the rest, use Core Service
If you want to use core service, you can create a .NET DLL and then call it from your automated activity. This thread has some good information about it:
Which API can I use for writing SDL Tridion workflow activities?

Resources