Rehosting Windows Workflow Foundation Usage - workflow-foundation-4

I need to create an application to auto generate C code. ie. User can design the logic from the G-UI using basic blocks from C. This is similar to Matlab Code Generation. I need to do this using .net framework. When I search for the samples, I've seen about rehosting workflow foundation. I don't have any idea about WF4. Can you please anybody tell me is it possible to do the designer(Design is like flowchart) using WF4? And also I have seen some samples using MFC? I'm not sure which one can be applicable for my situation..

I think you are confusing the Flowchart and Rehosted Workflow designer in WF as some kind of UI to draw the flowcharts.
Workflows are meant for executing business process and the different blocks like If-Else
While etc help to implement a business logic.
Workflow Designer just provides a visual way of representing those if else / whiles etc so that developers and possible super users of the application can modify the business logic in a more visual manner instead of writing them using code.

Related

How to Design a UI to enter Business Rules

In my current Project we have a UI, where Business analysts write down rules to transform database columns, which Programmers pick up and then code it using COBOL.
I'm working with my team to transform this UI so that we can automate this process so that we can minimize most of the coding exercise as most of the rules are pretty simple, for ex: Mapping values based on another column, Date Formatting, CASE/IF-THEN-ELSE types.
Before building something from scratch I wanted to make sure that there isn't something which can help us, (tool/framework).
Please suggest
Details: We are trying to develop as a desktop application, Windows Standalone application, using c# or Dot net.
There are things called rules engine. You can check out for something like Dro

Workflow Foundation 4 - How to create a web based representation of the workflow?

We have to write a ASP.NET site based on a workflow.
The client wants to see a graphical representation of the workflow. In addition (let's say it is a workflow for processing orders), the client wants to see at what point in the workflow any given order is, indicated on the graphical workflow representation by a highlighted node or some visual queue.
All of this must be available via a web interface.
Was hoping somebody had some bright ideas for how to achieve this without writing extensive custom controls.
Does Workflow Foundation 4 offer anything itself that would assist toward this end?
There are ways to use the WorkflowDesigner and issue the save image command through code but as it's a WPF control it needs to be hosted on a WPF form. I have tried to do this from a webpage but as the form isn't visible it has a size of 0. I didn't spend a lot of time in this so it might be possible.
See this for details on how to do so.

Help choose a code generation tools for ASP.NET

I am new to the code generation tools and I would like to know how does a tool like LLBGen Pro compares with the Entity Framework?
On top of that my boos is really looking into a tool called CodeOnTime http://codeontime.com/default.aspx because he likes their good UI support.
I am asking here because I really want an unbiased opinion.
I am not sure if LLBGen can also generate the UI. So far all the development in the house we do it the classic way coding each layer manually. However we are in need of a fast prototyping tool.
Any advice to help me choose wisely will be much appreciated
thanks in advance.
Have you taken a look at CodeSmith Generator? It's a template based generation tool with Visual Studio integration, so by definition all templates are open source, and it has advanced features such as generate on build that keep your project up to date with your data source at all times.
Also, the CodeSmith team is about to start working on an official set of EF templates, but for now they offer several different ORM options including LINQ to SQL, NHibernate, .netTiers, CLSA, etc.
The thing is that there are code generators and object relational mappers (ORM) and code generators that do object relational mapping.
Something like NHibernate is a pure (ORM) and doesn't generate any code, it just provides you with an object persistence layer.
Llblgen is a code generator that generates code that performs the functions of an ORM but you can actually see the code and can override it with custom behaviour. Llblgen won't generate your UI for you and it isn't designed to. It's heavily focused around data access.
Then you have tools like CodeSmith or the built in T4 generator that comes with visual studio which you can use to create templates and then they will generate anything you want, provided you write your own templates. I've worked for companies that have invested thousands into writing their own templates.
Finally there are complete tools like CodeOnTime or IronSpeed which generate entire applications for you. This sounds good in theory, and is great for small CRUD type applications, but you lose a lot of flexibility with tools like these as they often have conventions which you are required to work around and once you start getting into heavy customization, tend to get in your way.
You should ask yourself:
Do I just need something for accessing my data? if so, you could use an ORM
Do I need to generate a highly customized UI? if so, you'd probably be best avoiding the tool like CodeOnTime and IronSpeed
I've used both LLBLGen and Entity Framework. In my experience, they are roughly equal in capability, especially now that Entity Framework 4 has been released. NHibernate is also in this realm and should be considered if you're looking to compare the top ORM tools for .NET.
I would recommend downloading the LLBLGenPro demo to evaluate it. According to Frans Bouma's blog, LLBLGenPro offers enhanced features not present in the out-of-the-box Entity Framework tooling built into VS.NET 2010.
ORM tools like EF and LLBLGen do not generate UI. For that you will need something like IronSpeed (not recommended, I don't like the code generated) or the IdeaBlade DevForce products, which I have not used.

ASP.NET Scaffolding/Templating CRUD Solutions

I've been looking into ASP.NET Dynamic Data and how it does scaffolding and routing. I've only scratched the surface, but it's looking like I'd have to create a template for each table that I didn't want to display all columns the same way.
My first impression after looking at dynamic data is that it would seem like less time on the programmer to have to edit one-time generated user controls rather than build a template for each table that doesn't have a uniform display behavior.
What proven solutions are people currently using that help ease the laborious tasks of creating ASP.NET CRUD type user controls?
Thanks
In ASP.NET webforms we use CodeSmith. From a single entity we generate admin pages, codebehinds, service layers, data layers and db stored procedures. All in a matter of seconds. I'd recommend you check it our for quickly building the crud in your apps.
We're actually working on our own code generation tool. It has already proven to work perfectly on the lower layers and now we're on the way to extend it for the presentation layer, that is for generating user controls.
I've not looked into dynamic data (although I'd like to when I have some time) but my biggest fear is always to lose flexibility. The problem is that these front-ends are then maybe generated dynamically each time based on some template and editing, especially bringing in special customer wishes becomes quite difficult. For small standard apps it may work perfectly though.
What we're therefore doing is to "generate" these usercontrols based on a set of standard custom server controls we've developed, but we'll generate just the first time from some static information about the entities in our application. Then you can continue customizing.
Such systems should help the developer, improving his development speed, doing the initial awkward work but then they should give him the flexibility to modify till the maximum. They should not add additional complexity...
I used .netTiers CodeSmith templates long time ago (years) and it was proven so strong, so, it must be more than great now.
I know a (big) company who have built a customization engine (allowing GUI for internal company options) around those templates to use them in most of their applications and were so successful.
I've used http://www.ironspeed.com/ in the past which has been great. Saved us MONTHS of time on our last project which has a big DB, so the cost is worth it. But it looks a bit ugly and can be tricky to update the DB schema once you've generated.
Obviously not much widespread use out there other than whats provided in Visual Studio.
Have a look at Blinq.

ASP.NET based Workflow Engine

I am working on a design spec for a new application that will be heavily workflow driven.
Before I re-invent the wheel, is there a decent lightweight workflow engine that plugs into ASP.NET already around?
Basically, I'm looking for something that handles moving through a defined set of workflow pages while handling state management automatically.
If this isn't around already, I'll definitely try to abstract the engine from my app and put it on codeplex, as it would be really handy.
Any suggestions?
Note: .NET 2.0, so no WWF, though I think WWF is overkill for my needs.
EDIT: Seems like there is a legitimate need for this, and there isn't a product out there...So I might build this.
Here is what I'm picturing:
Custom Page class called WebFlowPage
All WebFlowPage's are registered in a Workflow mapper.
Each WebFlowPage has some form of state object.
A HttpHandler handles picking the appropriate WebFlowPage based upon the workflow, and populating it from the state object.
Is the workflow dynamic, or static?
If the workflows are simple, you could roll your own workflow engine.
In certain situations, it can be fairly simple, and just a couple of data tables to handle the rules, processing and state.
Alot of workflow engines are built for large scale processing (credit card applications, for example). For small scale, you should at least consider your own, which would eliminate the overhead and dependency of/on an engine.
Not sure exactly what you wish to do here, but Ra-Ajax can easily keep state at least if you want your solution ajaxified...
For reference purposes you might want to check out the Ajax Calendar sample or even the (banalistically implemented) Ajax Wizard sample. It surely beats the hell out of doing it with JavaScript...
And every time you "do something" you're in "server-land" which means you can store temporaries all the time as you wish...
The project is LGPL
(PS!
Yes I do work with it)
Building a custom workflow engine is not trivial, although it may seem simple at first. We've tried that. It depends a lot on the complexity of the logic you need it to cover.
Given the current state of the Windows Workflow Foundation and the lack of another framework that abstracts the workflow concepts, I would choose WF if you need complex logic, asynchronous handling or branches in your workflows.
Tracking your state through the workflow can be accomplished by carrying some kind of xml payload or storing the state in a database,
If your workflow is actually a sequential set of forms that need to be filled in by the user, tracking the steps and guiding the user to the next step can be accomplished with some simple custom solution.
You could take a look at the InRule engine too.
Also, there is nxBRE.
These too are mostly used for business rules.
InRule is proprietary, whereas nxBRE supports RuleML (the defacto standard).
You might need to make your own implementation for the pages, and use the rule engine as the "structure".
At this moment, I know that Sharepoint 2007 supports page workflows (using WF), but this would imply using .NET Framework 3 and deployng sharepoint.
My suggestion would be to use whatever you find more light and easier to use.
I think the term "workflow" is very open to interpretation. I have been working lately with a type of workflow that is very different from what you seem to be describing. Mine is a state machine based workflow where the state of a particular record determines what actions a user can take to move the record to the next step in the business process. So "workflow" in this instance means how the record flows from one state to another until it is finally completed.
Your usage of workflow seems to have more to do with moving a user from one page to another in a linear multi-step process, which is a completely different use case (correct me if I'm wrong). So before coming up with a general purpose "workflow" engine that anyone could use, I would recommend defining a little bit better exactly what types of situations this system would handle.
I've been using this for a few months http://objectflow.codeplex.com. Not asp specific but it may fit your needs
While browsing the web for some workflow & BPM resources, I found the following project: NetBPM. Unfortunately, the project seems to be stopped.
I don't think there is a workflow engine that will automatically handle state for you, but if you are moving through a set of pages like a process such as checkout on an ecommerce site, perhaps the ASP.NET wizard control could help you?
There are few workflow options. "Aspose" and "Skelta" are the offers I´m evaluating.
Fábio
you can use WorkFlow Engine, just read the document and run the Demo.
all of the features you need for a dynamic workflow engine they added in there.

Resources