| 3 | | ''(I'm looking for a volunteer translator)'' |
| | 4 | = !GoFlow User Guide = |
| | 5 | GoFlow is a ''django component''(project to provide application modules to another project django) to add workflow features to a project django. |
| | 6 | |
| | 7 | We'll learn here to use this module, starting a project django very simple ("Hello world"), then gradually adding features. |
| | 8 | |
| | 9 | == Prerequisite == |
| | 10 | Create a directory, and copy the directory''goflow''in this directory (you can also place it in any directory PYTHONPATH). |
| | 11 | |
| | 12 | ''Note'': |
| | 13 | In what follows, using filenames on, while the documentation Django |
| | 14 | advocates the use of absolute paths, this is voluntary, in order to simplify |
| | 15 | expressions and to be neutral vis-à-vis the platform (and it works, at least under Windows) |
| | 16 | |
| | 17 | == 1. Project "Hello World" == |
| | 18 | We will discover the workflow engine with a very simple application based on a process workflow with a single activity (a single activity, no transition: the simplest possible). This activity is to receive a message (for example, "Hello world"). |
| | 19 | |
| | 20 | * Start by creating a project django empty (or use an existing project) |
| | 21 | {{{ |
| | 22 | Django admin-startproj myproj |
| | 23 | }}} |
| | 24 | |
| | 25 | * Add the following applications in the file''settings.py'' |
| | 26 | {{{ |
| | 27 | INSTALLED_APPS = ( |
| | 28 | ... |
| | 29 | 'django.contrib.admin' |
| | 30 | 'goflow.workflow' |
| | 31 | 'goflow.instances' |
| | 32 | ) |
| | 33 | }}} |
| | 34 | The application''workflow''contains the "static" model data (modeling |
| | 35 | process), and application''forums''contains the dynamic part, or runtime. |
| | 36 | |
| | 37 | * Setting up the party's database file settings, for example like this: |
| | 38 | {{{ |
| | 39 | DATABASE_ENGINE = 'sqlite3' |
| | 40 | DATABASE_NAME = 'data.sqlite' |
| | 41 | }}} |
| | 42 | |
| | 43 | * Add the following lines 2 das''urls.py file'': |
| | 44 | {{{ |
| | 45 | urlpatterns = patterns ('', |
| | 46 | ... |
| | 47 | |
| | 48 | # Uncomment this for admin: |
| | 49 | (r '^ admin /', include ( 'django.contrib.admin.urls')), |
| | 50 | (r '^ workflow /', include ( 'goflow.urls')), |
| | 51 | ) |
| | 52 | }}} |
| | 53 | |
| | 54 | * Create now the database server and starting with: |
| | 55 | {{{ |
| | 56 | python manage.py syncdb - pythonpath =.. |
| | 57 | python manage.py runserver - pythonpath =.. |
| | 58 | }}} |
| | 59 | |
| | 60 | We can now open the console admin [http://localhost:8000/admin], and discover the data models introduced by! GoFlow: |
| | 61 | [[Image (GoFlow_DocFr:admin1.png)]] |
| | 62 | |
| | 63 | we can also discover the Dashboard''!''GoFlow, which has the status of workflows using a "back-office", [http://localhost:8000/workflow] |
| | 64 | [[Image (GoFlow_DocFr:admin2.png)]] |
| | 65 | |
| | 66 | We will now create a process workflow. |
| | 67 | * Return to the admin console, add an entity Process; screen below is shown: |
| | 68 | |
| | 69 | [[Image (GoFlow_DocFr:admin3.png)]] |
| | 70 | |
| | 71 | * Take the title "Hello world", and a description |
| | 72 | * Register using the''Save button and continue editing'': there is an activity''End''was added automatically. |
| | 73 | * Create an initial activity, by clicking on the icon "+" in the field''Initial activity'': take a title, set the process on the current process "Hello world", leave the default values for other fields. |
| | 74 | * Save |
| | 75 | We have to create our first process workflow: |
| | 76 | [[Image (GoFlow_DocFr:admin4.png)]] |
| | 77 | |
| | 78 | We have specified no application in our business, we will see that it is not necessary to begin to "play" with our application. |
| | 79 | |
| | 80 | Indeed, when an activity is not associated with an application, a special application is still invoked, to simulate this activity: a panel is simply presented to the user, displaying the name and description of activity . A history of workflow is also displayed. A''OK''button allows you to complete the activity. |
| | 81 | |
| | 82 | Before you start implementing our process workflow, it lacks one thing: allow the current user (''admin''for example) to instantiate the process. |
| | 83 | |
| | 84 | * Add a group named''''Hello world, give him permission''can_instantiate''on the content type''workflow.process'', and save |
| | 85 | * Add this group to the current user: this allows the user to instantiate the process''''Hello world. |
| | 86 | |
| | 87 | Everything is now ready to execute our workflow: go on the dashboard [http://localhost:8000/workflow]. You will find our process and its definition, and other information on the roles and permissions |
| | 88 | |
| | 89 | * Click on the link''start a simulation instance''under the''process''Hello world |
| | 90 | |
| | 91 | Bug''rev 21: name of process with a white'' |
| | 92 | |
| | 93 | ---- |
| | 94 | |
| | 95 | '' 'TO BE CONTINUED''' |