Changes between Version 8 and Version 9 of GoFlow


Ignore:
Timestamp:
10/01/2007 03:56:51 PM (7 years ago)
Author:
goflow@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GoFlow

    v8 v9  
    1717 
    1818You will find here some details of the leave application implementation.
     19
     20=== defining the workflow process ===
     21First, let's take a look at the process definition; the process is stored in the database, by using entities like Process, Activities, Transitions, Application (see workflow/models.py). In the leavedemo project, the process is dumped with the django dumpdata utility, and provided as a fixture. Typically, when you want to define a process, you will use the admin web console.
     22
     23So, the process is the following:
     24http://goflow.alwaysdata.net/leavedemo/media/img/leaveactivities.png
     25
     26below, the process translated as django entities, with a python syntax (it is not a real code, it's just more readable by humans):
     27{{{
     28Process(title='leave', begin='Begin', end='End')
     29
     30Activity(title='Begin', application='checkstatus',
     31         pushApplication='route_to_secretary',
     32         splitMode='xor', roles=('secretary',))
     33
     34Activity(title='Approval', application='approvalform',
     35         pushApplication='route_to_supervisor',
     36         splitMode='xor', roles=('secretary',))
     37
     38Activity(title='Refinement', application='refine',
     39         pushApplication='route_to_customer',
     40         joinMode='xor', splitMode='xor')
     41
     42Activity(title='UpdateHR', application='hrform',
     43         pushApplication='route_to_secretary',
     44         roles=('supervisor',))
     45
     46Activity(title='End', application='finalinfo',
     47         pushApplication='route_to_customer',
     48         joinMode='xor', roles=('secretary',),
     49         autoFinish=False)
     50
     51Transition(name='send_to_approval',
     52           input = 'Begin', output='Approval',
     53           condition="instance.condition=='OK: Forward to supervisor'")
     54
     55Transition(name='send_to_refinement',
     56           input = 'Begin', output='Refinement',
     57           condition="instance.condition=='Denied: Back to requester'")
     58
     59Transition(name='request_approved',
     60           input = 'Approval', output='UpdateHR',
     61           condition="instance.condition=='OK: Forward to secretary'")
     62
     63Transition(name='not_approved',
     64           input = 'Approval', output='Refinement',
     65           condition="instance.condition=='Denied: Back to requester'")
     66
     67Transition(name='tell_employee',
     68           input = 'UpdateHR', output='End')
     69
     70Transition(name='cancel_request',
     71           input = 'Refinement', output='End',
     72           condition="instance.condition=='Withdraw request'")
     73
     74Transition(name='re_request',
     75           input = 'Refinement', output='Begin',
     76           condition="instance.condition=='Re-request'")
     77}}}
    1978
    2079=== settings file ===
Back to Top