Hello, I am relativley new to Ruby on Rails and am still in the process of enjoying the features it offers. I wanted to know if theres workflow support in rails. Can some one give me pointers if its possible. Thanks Naveen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060305/43c9abc3/attachment.html
Am Sonntag, den 05.03.2006, 15:06 +0530 schrieb Preethi Naveen:> I am relativley new to Ruby on Rails and am still in the process of > enjoying the features it offers. I wanted to know if theres workflow > support in rails. Can some one give me pointers if its possible.What are you thinking about? -- Norman Timmler http://blog.inlet-media.de
What i have in mind is to implement a web based application, where a document in an organisation can be routed according to some business process. Lets say a document needs to traverse list of people in an organisation, user X initiates a document and says forward, so it goes to user Y who is the next person in the process who does commenting etc and forwards it where it finally reaches user Z. Is it possible. Thanks Naveen Norman Timmler wrote:> Am Sonntag, den 05.03.2006, 15:06 +0530 schrieb Preethi Naveen: > >> I am relativley new to Ruby on Rails and am still in the process of >> enjoying the features it offers. I wanted to know if theres workflow >> support in rails. Can some one give me pointers if its possible. > > What are you thinking about? > > -- > Norman Timmler > > http://blog.inlet-media.de-- Posted via http://www.ruby-forum.com/.
Yes, it''s possible - no, I''m not aware of anyone producing an Engine or plugin to make it easier to implement. It''s kind of hard to imagine a generic workflow engine would make things easier to write in Rails than just starting from scratch anyway. Workflow support is fairly straightforward to implement in a database-backed system - you need to have some concept of "states" in your workflow, and each "document" (i.e. database record) can have one of several "states" (i.e. values in a field of that database record) associated with it. Users process the document and change its state as they do so - that''s how workflow apps work in a nutshell. When a user logs in, they would be shown a list of "documents" (database records) that are in a specific "state", and asked to process them so the state changes to something else. At that point, typically the document should appear in another user''s to-do list, which would appear if/when they log in to the application. Challenges with workflow apps typically involve: - you need to define the set of possible states a document can have - you need to define the set of possible state transitions a document can go through as it passes through the workflow - you need to assign roles/permissions to users so they can interact at specific points in the workflow - typically, you need to make it relatively easy to change the workflow over time With respect to Rails, I don''t think it would be hard to build workflow apps with it, but it won''t be competing with commercial tools such as Remedy, TestDirector and Vignette (which are 3 of many I''ve used), which make management of the overall workflow quite simple by hiding what goes on under the covers. If you have a specific requirement for a workflow app, then it might be appropriate to build a prototype in Rails to see what''s involved. If you''re struggling to define how your workflow should work, then that should raise warning flags - it will almost certainly be more difficult to maintain your workflow in a Rails app than in one written in e.g. Remedy, unless you devote lots of time to building the workflow management tools that Remedy ships with out of the box. Hope that helps Dave M. On 05/03/06, Preethi Naveen <preethi.naveen@gmail.com> wrote:> Hello, > > I am relativley new to Ruby on Rails and am still in the process of enjoying > the features it offers. I wanted to know if theres workflow support in > rails. Can some one give me pointers if its possible. > > Thanks > Naveen > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >
Thanks Dave..it sure was a very nice response..you covered everything that i had wanted to know..had looked up the tools you had suggested but i guess theres no open source framework..plan to start working on rails and see how far i can go..hope its as comfortable as it is implementing a cookbook application. :) Naveen> Date: Mon, 6 Mar 2006 23:30:10 +1100 > From: "David Mitchell" <monch1962@gmail.com> > Subject: Re: [Rails] workflow support in Ruby on Rails > To: rails@lists.rubyonrails.org > Message-ID: <f6508a860603060430x2add516cx@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Yes, it''s possible - no, I''m not aware of anyone producing an Engine > or plugin to make it easier to implement. It''s kind of hard to > imagine a generic workflow engine would make things easier to write in > Rails than just starting from scratch anyway. > > Workflow support is fairly straightforward to implement in a > database-backed system - you need to have some concept of "states" in > your workflow, and each "document" (i.e. database record) can have one > of several "states" (i.e. values in a field of that database record) > associated with it. Users process the document and change its state > as they do so - that''s how workflow apps work in a nutshell. > > When a user logs in, they would be shown a list of "documents" > (database records) that are in a specific "state", and asked to > process them so the state changes to something else. At that point, > typically the document should appear in another user''s to-do list, > which would appear if/when they log in to the application. > > Challenges with workflow apps typically involve: > - you need to define the set of possible states a document can have > - you need to define the set of possible state transitions a document > can go through as it passes through the workflow > - you need to assign roles/permissions to users so they can interact > at specific points in the workflow > - typically, you need to make it relatively easy to change the > workflow over time > > With respect to Rails, I don''t think it would be hard to build > workflow apps with it, but it won''t be competing with commercial tools > such as Remedy, TestDirector and Vignette (which are 3 of many I''ve > used), which make management of the overall workflow quite simple by > hiding what goes on under the covers. > > If you have a specific requirement for a workflow app, then it might > be appropriate to build a prototype in Rails to see what''s involved. > If you''re struggling to define how your workflow should work, then > that should raise warning flags - it will almost certainly be more > difficult to maintain your workflow in a Rails app than in one written > in e.g. Remedy, unless you devote lots of time to building the > workflow management tools that Remedy ships with out of the box. > > Hope that helps > > Dave M. > > > On 05/03/06, Preethi Naveen <preethi.naveen@gmail.com> wrote: > > Hello, > > > > I am relativley new to Ruby on Rails and am still in the process of > enjoying > > the features it offers. I wanted to know if theres workflow support in > > rails. Can some one give me pointers if its possible. > > > > Thanks > > Naveen > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060306/df6c511a/attachment.html
I don''t have any Rails specific advice but I have looked at workflow systems generically and I''ll back what David said: it is definitely possible. But it isn''t clear what benefits a ''workflow'' like module can provide. At my work we''ve looked at generic workflow type stuff (in Perl) and had mixed results. The trouble is that ''workflow'' is a fairly loose concept and by the time you''ve got a sufficiently flexible workflow system it begins to look a lot like a programming language. Workflow can be described as a state transition diagram: any object passing through the workflow is at any given time in a ''state''. There are defined transitions between states. Transitions have conditions that must be met before that transition can occur. What we looked for was being able to define all this in a configuration file which could be semantically validated (so all states had transitions to an end state, that end states existed, that all transitions connected between valid states, etc...) and ideally manipulated by a domain specialist (in our case a Business Analyst) but not necessarily a programmer. We are almost talking about a Domain Specific Language here except the control structures are quite limited. We looked at, and started using the Perl Workflow CPAN module: http://search.cpan.org/~cwinters/Workflow/ This had some nice features: it gave us a language to describe our workflows, states and transitions. It has data persistence. It has an API to allow inspection of transitions and their related conditions for each state- it has some thought put in to it. It also has some problems. Depending on your data you may not want to shovel your data through the workflow system- on references to it. But you also want key data to be available to the workflow system so it can test transition conditions. And you want to be able to display information about each object in the workflow. You also want to be able to give summary information about the objects in the workflow (17% are in held, 37% are pending approval...) and you''ll often want to be able to set timers or alarms if something sits in a state for too long (email: "This document has been pending approval for 24 hours, please click on the link below to..."). I don''t believe the Perl Workflow module supported summary information or timers (although it might now!). If I were writing a workflow application I''d certainly look over that module and understand the concepts. But I think any application whose core functionality is workflow would outgrow most modules pretty quickly. Jeremy. David Mitchell wrote:> Yes, it''s possible - no, I''m not aware of anyone producing an Engine > or plugin to make it easier to implement. It''s kind of hard to > imagine a generic workflow engine would make things easier to write in > Rails than just starting from scratch anyway. > >> I am relativley new to Ruby on Rails and am still in the process of enjoying >> the features it offers. I wanted to know if theres workflow support in >> rails. Can some one give me pointers if its possible. >>
Check out http://lunchroom.lunchboxsoftware.com/articles/2006/01/21/acts-as-state-machine and http://elitists.textdriven.com/aasm-examples.rb.txt You can use that plugin to do exactly what you''re describing. On 3/6/06, Jeremy Nelson <jem@apposite.com.au> wrote:> I don''t have any Rails specific advice but I have looked at workflow > systems generically and I''ll back what David said: it is definitely > possible. But it isn''t clear what benefits a ''workflow'' like module can > provide. At my work we''ve looked at generic workflow type stuff (in > Perl) and had mixed results. The trouble is that ''workflow'' is a fairly > loose concept and by the time you''ve got a sufficiently flexible > workflow system it begins to look a lot like a programming language. > > Workflow can be described as a state transition diagram: any object > passing through the workflow is at any given time in a ''state''. There > are defined transitions between states. Transitions have conditions that > must be met before that transition can occur. > > What we looked for was being able to define all this in a configuration > file which could be semantically validated (so all states had > transitions to an end state, that end states existed, that all > transitions connected between valid states, etc...) and ideally > manipulated by a domain specialist (in our case a Business Analyst) but > not necessarily a programmer. We are almost talking about a Domain > Specific Language here except the control structures are quite limited. > > We looked at, and started using the Perl Workflow CPAN module: > > http://search.cpan.org/~cwinters/Workflow/ > > This had some nice features: it gave us a language to describe our > workflows, states and transitions. It has data persistence. It has an > API to allow inspection of transitions and their related conditions for > each state- it has some thought put in to it. > > It also has some problems. Depending on your data you may not want to > shovel your data through the workflow system- on references to it. But > you also want key data to be available to the workflow system so it can > test transition conditions. And you want to be able to display > information about each object in the workflow. > > You also want to be able to give summary information about the objects > in the workflow (17% are in held, 37% are pending approval...) and > you''ll often want to be able to set timers or alarms if something sits > in a state for too long (email: "This document has been pending approval > for 24 hours, please click on the link below to..."). I don''t believe > the Perl Workflow module supported summary information or timers > (although it might now!). > > If I were writing a workflow application I''d certainly look over that > module and understand the concepts. But I think any application whose > core functionality is workflow would outgrow most modules pretty quickly. > > Jeremy. > > David Mitchell wrote: > > Yes, it''s possible - no, I''m not aware of anyone producing an Engine > > or plugin to make it easier to implement. It''s kind of hard to > > imagine a generic workflow engine would make things easier to write in > > Rails than just starting from scratch anyway. > > > >> I am relativley new to Ruby on Rails and am still in the process of enjoying > >> the features it offers. I wanted to know if theres workflow support in > >> rails. Can some one give me pointers if its possible. > >> > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Hi, take a look here: http://raa.ruby-lang.org/cat.rhtml? category_major=Library;category_minor=Workflow torrentworkflow looks nice but was last updated in 2001... Here''s the description from the project page:> Overview > > Torrent is a framework for designing workflows. A workflow is > essentially a set of tasks which flow based on the dependencies > between them. These dependencies can be based on a previous tasks > success, failure, timeout, etc. A dependency may also be based on > the value of a previous tasks result. A workflow actually can be > used to describe many simple programming tasks. For example, ftp a > file from a server, copy that file to a local location, parse the > file into a data structure (or xml), insert the file into a > database. If any errors occur, then email an administrator. Using > Torrent this flow of tasks might look like this: > > Example > > ftp = Torrent::Job.new("FTPJob") { ftp; return ftpdFileLoc } > copy = Torrent::Job.new("Copy") { |ftpdFileLoc| copy file; return > copiedLoc } > parse = Torrent::Job.new("Parse") { |copiedLoc| parse into struct; > return struct } > db = Torrent::Job.new("DB") { |struct| insert into db } > eemail = Torrent::Job.new("ErrorEmail", mailTaskObj) > > copy.setDependency(ftp) > parse.setDependency(copy) > db.setDependency(parse) > eemail.setDependency(db, Torrent:: FAILURE) > eemail.setDependency(db, Torrent:: AVOIDED) > > flow = Torrent::Workflow.new(ftp, copy, parse, db, eemail) > flow.start() >HTH, Timo Am 05.03.2006 um 10:36 schrieb Preethi Naveen:> Hello, > > I am relativley new to Ruby on Rails and am still in the process of > enjoying the features it offers. I wanted to know if theres > workflow support in rails. Can some one give me pointers if its > possible. > > Thanks > Naveen > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails