public
Description: RESTful workflow / bpm engine based on Rack and OpenWFEru
Homepage: http://openwferu.rubyforge.org
Clone URL: git://github.com/jmettraux/ruote-rest.git
Search Repo:
adding tool for launching
jmettraux (author)
Wed Apr 23 19:30:16 -0700 2008
commit  ea0426390613715412f5528e32ed360a391d5532
tree    99099d8f84fa73fbfc632cd1a431aca5903c54cd
parent  d8f2252481be07b6548362ee12d6217fce3f3dd4
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 
 
 
 
 
16
17
...
1
 
 
 
 
 
 
 
2
3
4
5
6
7
 
8
9
10
11
12
13
14
0
@@ -1,17 +1,14 @@
0
 
0
-TRUSTED_HOSTS = [
0
-
0
- nil,
0
- '127.0.0.1'
0
-
0
-] unless defined?(TRUSTED_HOSTS)
0
-
0
 #
0
 # called before each request
0
 #
0
 before do
0
 
0
     throw :halt, [ 401, "get off !" ] \
0
- unless TRUSTED_HOSTS.include?(request.env['REMOTE_ADDR'])
0
+ unless [
0
+ nil, '127.0.0.1'
0
+ ].include?(request.env['REMOTE_ADDR'])
0
+
0
+ # TODO : add support for some authentication
0
 end
0
 
...
6
7
8
 
9
 
 
 
10
 
 
11
12
13
...
6
7
8
9
10
11
12
13
14
15
16
17
18
19
0
@@ -6,8 +6,14 @@ require 'openwfe/util/xml'
0
 configure do
0
 
0
     ac = {}
0
+
0
     ac[:remote_definitions_allowed] = true
0
+ #
0
+ # are process definitions pointed at via a URL allowed ?
0
+
0
     ac[:definition_in_launchitem_allowed] = true
0
+ #
0
+ # are process definitions embedded in the launchitem allowed ?
0
 
0
     # further configuration goes here
0
 
...
81
82
83
84
85
86
87
88
89
90
91
92
93
 
 
 
 
94
95
96
...
112
113
114
115
116
117
 
 
 
 
118
119
120
...
81
82
83
 
 
 
 
 
 
 
 
 
 
84
85
86
87
88
89
90
...
106
107
108
 
 
 
109
110
111
112
113
114
115
0
@@ -81,16 +81,10 @@ def render_processes_html (ps)
0
                 end
0
                 html.div do
0
                     html.label "process definition", :for => "pdef"
0
- html.textarea :cols => 50, :rows => 10 do
0
- html.cdata! \
0
- <<-EOS
0
- <process-definition name="Test" revision="0">
0
- <sequence>
0
- <participant ref="alice" />
0
- <participant ref="bob" />
0
- </sequence>
0
- </process-definition>
0
- EOS
0
+ html.textarea :cols => 50, :rows => 10, :name => "pdef" do
0
+ html.text! <<-EOS
0
+surf
0
+ EOS
0
                     end
0
                 end
0
             end
0
@@ -112,9 +106,10 @@ end
0
 
0
 def _render_process_html (html, p, detailed=false)
0
 
0
- html.div :class => "proc_process" do
0
- html.h4 "Process #{p.wfid}"
0
- end
0
+ #html.div :class => "proc_process" do
0
+ # html.h4 "Process #{p.wfid}"
0
+ #end
0
+ erb :process
0
 end
0
 
0
 # xml

Comments

    No one has commented yet.