Skip to content

Commit 95d5d7d

Browse files
committed
Add sample and picture to documentation
1 parent 37dbeac commit 95d5d7d

File tree

4 files changed

+95
-41
lines changed

4 files changed

+95
-41
lines changed

README.md

Lines changed: 49 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,59 @@
1-
# Galahad
1+
galahad
2+
=======
23

34
**The lean workflow automation framework for machines with heart.**
45

6+
![a hand drawn robot](docs/img/pexels-photo-1020325.jpeg)
7+
58
Galahad is a free workflow automation framework designed to bring simplicity
6-
to complex workflows.
9+
to complex workflows. Galahad written in [Python][python] based on the world famous
10+
[Django][django] web framework.
11+
12+
[python]: https://python.org
13+
[django]: https://www.djangoproject.com/
14+
15+
Here is a little sample of what a process written wis galahad may look like::
16+
17+
class WelcomeProcess(Process):
18+
user = models.ForeignKey(
19+
settings.AUTH_USER_MODEL,
20+
on_delete=models.CASCADE,
21+
blank=True, null=True,
22+
)
723

24+
start = tasks.StartView(fields=['user'])
825

9-
## Design
26+
def has_user(self, task):
27+
if self.user_id is None:
28+
return []
29+
else:
30+
return [self.send_welcome_email]
1031

11-
### Principles
32+
def send_welcome_email(self, task):
33+
self.user.email_user(
34+
subject='Welcome',
35+
message='Hello %s!' % self.user.get_short_name(),
36+
)
1237

13-
#### Common sense is better than convention
38+
edges = (
39+
(start, has_user),
40+
(has_user, send_welcome_email),
41+
)
1442

15-
Galahad does not follow any academic modeling notation developed by a poor Phd
43+
Design Principles
44+
=================
45+
46+
Common sense is better than convention
47+
--------------------------------------
48+
49+
Galahad does not follow any academic modeling notation developed by a poor PhD
1650
student who actually never worked a day in their life. Businesses are already
1751
complex which is why Galahad is rather simple. There are only two types of
1852
tasks – human & machine – as well as edges to connect them. It's so simple a
1953
toddler (or your CEO) could design a workflow.
2054

21-
#### Lean Automation (breaking the rules)
55+
Lean Automation (breaking the rules)
56+
------------------------------------
2257

2358
Things don't always go according to plan especially when humans are involved.
2459
Even the best workflow can't cover all possible edge cases. Galahad
@@ -29,42 +64,17 @@ This allows you businesses to ship prototypes and MVPs of workflows.
2964
Improvements can be shipped in multiple iterations without disrupting the
3065
business.
3166

32-
#### People
67+
People
68+
------
3369

3470
Galahad is build with all users in mind. Managers should be able to develop
3571
better processes. Users should able to interact with the tasks every single
3672
day. And developers should be able to rapidly develop and test new features.
3773

38-
## Core Components
39-
40-
### Process
41-
42-
The `Process` object holds the state of a workflow instances. It is represented
43-
by a Django Model. This way all process states are persisted in your database.
44-
45-
Processes are also the vehicle for the other two components `Tasks` and
46-
`edges`.
47-
48-
### Task
49-
50-
A task defines the behavior or a process. It can be considered as a simple
51-
transaction that changes state of a process. There are two types of tasks,
52-
human and machine tasks.
53-
54-
Human tasks are represented by Django `View`s. A user can change the processes
55-
state via a Django form or a JSON API.
56-
57-
Machine tasks are represented by simple methods on the `Process` class. They
58-
can change the state and perform any action you can think of. They can decide
59-
which task to execute next (exclusive gateway) but also start or wait for multiple
60-
other tasks (split/join gateways).
61-
62-
Furthermore tasks can implement things like sending emails or fetching data
63-
from an 3rd party API. All tasks are executed asynchronously to avoid blocking
64-
IO and locked to prevent raise conditions.
74+
Free
75+
----
6576

66-
### Edges
77+
Galahad is open source and collaboratively developed by industry leaders in
78+
automation and digital innovation.
6779

68-
Edges are the glue that binds tasks together. They define the transitions
69-
between tasks. They are represented by a simple list of tuples. Edges have no
70-
behavior but define the structure of a workflow.
80+
*Photo by rawpixel.com from Pexels*

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def linkcode_resolve(domain, info):
6060

6161
# The master toctree document.
6262
master_doc = 'index'
63+
project = 'Galahad'
6364

6465
html_theme = 'alabaster'
6566

docs/img/pexels-photo-1020325.jpeg

128 KB
Loading

docs/index.rst

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,46 @@
11
=======
2-
Galahad
2+
galahad
33
=======
44

55
**The lean workflow automation framework for machines with heart.**
66

7+
.. image:: img/pexels-photo-1020325.jpeg
8+
:alt: a hand drawn robot
9+
710
Galahad is a free workflow automation framework designed to bring simplicity
8-
to complex workflows.
11+
to complex workflows. Galahad written in Python_ based on the world famous
12+
Django_ web framework.
13+
14+
.. _Python: https://python.org
15+
.. _Django: https://www.djangoproject.com/
16+
17+
Here is a little sample of what a process written wis galahad may look like::
18+
19+
class WelcomeProcess(Process):
20+
user = models.ForeignKey(
21+
settings.AUTH_USER_MODEL,
22+
on_delete=models.CASCADE,
23+
blank=True, null=True,
24+
)
25+
26+
start = tasks.StartView(fields=['user'])
27+
28+
def has_user(self, task):
29+
if self.user_id is None:
30+
return []
31+
else:
32+
return [self.send_welcome_email]
33+
34+
def send_welcome_email(self, task):
35+
self.user.email_user(
36+
subject='Welcome',
37+
message='Hello %s!' % self.user.get_short_name(),
38+
)
39+
40+
edges = (
41+
(start, has_user),
42+
(has_user, send_welcome_email),
43+
)
944

1045
Design Principles
1146
=================
@@ -38,6 +73,12 @@ Galahad is build with all users in mind. Managers should be able to develop
3873
better processes. Users should able to interact with the tasks every single
3974
day. And developers should be able to rapidly develop and test new features.
4075

76+
Free
77+
----
78+
79+
Galahad is open source and collaboratively developed by industry leaders in
80+
automation and digital innovation.
81+
4182
All Contents
4283
============
4384

@@ -51,3 +92,5 @@ All Contents
5192
tasks
5293
settings
5394
*
95+
96+
*Photo by rawpixel.com from Pexels*

0 commit comments

Comments
 (0)