Hi Surej,

> I am really interested in ezcomponents  Workflow .I like to implement
> this work flow in my project. I have simple plan to implement it in a
> leave process. First a person applies for a leave …then the team
> leader approve it…then project manager approve it..Then the leave is
> granted. This is my needed work flow.
>
> Personal (Who applies for a leave)
>
> Team leader(Approve or disapprove)
>
> Project Manager(Approve or disapprove)

This sounds like a straight forward workflow having several input nodes. 
The first input gets the needed data from the user and all the other 
input nodes get a boolean value like teamLeaderApproved. After the 
approving you place an exclusive choice - if not approved go to an end 
node, in the other case to the next input. Of course this could be much 
more complex if needed.

> I like to do this using WorkflowDatabaseTiein. So how can I start the
> work.. Do I have to save the flow in db before the process starts.

As it is an interactive workflow you need to store the workflow 
description and the execution states. For that you have the database 
tie in.

Personally, I prefer defining the workflow definition via XML (easier to 
write if it's getting more complex in my opinion). But in your case, 
defining via PHP should be ok as well.

> Or only save  data into DB when the person applies for a leave. I am
> trying to create simple application .

In general I do it like this: store all necessary data in the workflow 
execution (via workflow execution variables) and only store it to the 
application (=leave) table, if the workflow ends successfully. That 
way, you always have only approved data in the table. - But there might 
be situations where you store some data in the application's table 
during the workflow, e.g. we needed to store a login name in the user 
table before finishing because of unique user names.

But I guess, you need a general table, where you store, which user needs 
to trigger which workflow executions, e.g.:

execution_id
next_user (team leader, project leader, ...)

Then you can create a site for each user and fetch from that table, 
which executions need approval from him. The user can choose a 
workflow, gets a page with the necessary data and can approve or 
reject.

Hope that helps a little bit. Feel free to ask again, if you have more 
questions...

Have a nice day

Thomas
-- 
Components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/components

Reply via email to