1
- # Galahad
1
+ galahad
2
+ =======
2
3
3
4
** The lean workflow automation framework for machines with heart.**
4
5
6
+ ![ a hand drawn robot] ( docs/img/pexels-photo-1020325.jpeg )
7
+
5
8
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
+ )
7
23
24
+ start = tasks.StartView(fields=['user'])
8
25
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]
10
31
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
+ )
12
37
13
- #### Common sense is better than convention
38
+ edges = (
39
+ (start, has_user),
40
+ (has_user, send_welcome_email),
41
+ )
14
42
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
16
50
student who actually never worked a day in their life. Businesses are already
17
51
complex which is why Galahad is rather simple. There are only two types of
18
52
tasks – human & machine – as well as edges to connect them. It's so simple a
19
53
toddler (or your CEO) could design a workflow.
20
54
21
- #### Lean Automation (breaking the rules)
55
+ Lean Automation (breaking the rules)
56
+ ------------------------------------
22
57
23
58
Things don't always go according to plan especially when humans are involved.
24
59
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.
29
64
Improvements can be shipped in multiple iterations without disrupting the
30
65
business.
31
66
32
- #### People
67
+ People
68
+ ------
33
69
34
70
Galahad is build with all users in mind. Managers should be able to develop
35
71
better processes. Users should able to interact with the tasks every single
36
72
day. And developers should be able to rapidly develop and test new features.
37
73
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
+ ----
65
76
66
- ### Edges
77
+ Galahad is open source and collaboratively developed by industry leaders in
78
+ automation and digital innovation.
67
79
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*
0 commit comments