|Version 2 (modified by GoFlow administrator, 7 years ago) (diff)|
(Ongoing translation assisted by Google translate, be indulgent please)
GoFlow User Guide
GoFlow is a django component(project to provide application modules to another project django) to add workflow features to a project django.
We'll learn here to use this module, starting a project django very simple ("Hello world"), then gradually adding features.
Create a directory, and copy the directorygoflowin this directory (you can also place it in any directory PYTHONPATH).
In what follows, using filenames on, while the documentation Django advocates the use of absolute paths, this is voluntary, in order to simplify expressions and to be neutral vis-à-vis the platform (and it works, at least under Windows)
1. Project "Hello World"
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").
- Start by creating a project django empty (or use an existing project)
Django admin-startproj myproj
- Add the following applications in the filesettings.py
INSTALLED_APPS = ( ... 'django.contrib.admin' 'goflow.workflow' 'goflow.instances' )The applicationworkflowcontains the "static" model data (modeling process), and applicationforumscontains the dynamic part, or runtime.
- Setting up the party's database file settings, for example like this:
DATABASE_ENGINE = 'sqlite3' DATABASE_NAME = 'data.sqlite'
- Add the following lines 2 dasurls.py file:
urlpatterns = patterns ('', ... # Uncomment this for admin: (r '^ admin /', include ( 'django.contrib.admin.urls')), (r '^ workflow /', include ( 'goflow.urls')), )
- Create now the database server and starting with:
python manage.py syncdb - pythonpath =.. python manage.py runserver - pythonpath =..
We will now create a process workflow.
- Return to the admin console, add an entity Process; screen below is shown:
- Take the title "Hello world", and a description
- Register using theSave button and continue editing: there is an activityEndwas added automatically.
- Create an initial activity, by clicking on the icon "+" in the fieldInitial activity: take a title, set the process on the current process "Hello world", leave the default values for other fields.
We have to create our first process workflow:
We have specified no application in our business, we will see that it is not necessary to begin to "play" with our application.
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. AOKbutton allows you to complete the activity.
Before you start implementing our process workflow, it lacks one thing: allow the current user (adminfor example) to instantiate the process.
- Add a group named'Hello world, give him permissioncan_instantiateon the content typeworkflow.process, and save
- Add this group to the current user: this allows the user to instantiate the process'Hello world.
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
- Click on the linkstart a simulation instanceunder theprocessHello world
Bugrev 21: name of process with a white
'TO BE CONTINUED