Skip to content

Commit 713e201

Browse files
Merge pull request #602 from nextcloud/backport-workflow-engine
🚧 [WIP] Backport workflow engine 🚧
2 parents d896d42 + fc7bd03 commit 713e201

40 files changed

+3657
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
!/apps/admin_audit
2828
!/apps/updatenotification
2929
!/apps/theming
30+
!/apps/workflowengine
3031
/apps/files_external/3rdparty/irodsphp/PHPUnitTest
3132
/apps/files_external/3rdparty/irodsphp/web
3233
/apps/files_external/3rdparty/irodsphp/prods/test

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ install:
3030

3131
script:
3232
- sh -c "if [ '$TC' = 'syntax' ]; then composer install && lib/composer/bin/parallel-lint --exclude lib/composer/jakub-onderka/ --exclude 3rdparty/symfony/polyfill-php70/Resources/stubs/ --exclude 3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/ --exclude 3rdparty/paragonie/random_compat/lib/ --exclude lib/composer/composer/autoload_static.php --exclude 3rdparty/composer/autoload_static.php .; fi"
33-
- sh -c "if [ '$TC' = 'app:check-code' ]; then ./occ app:check-code admin_audit; ./occ app:check-code comments; ./occ app:check-code federation; fi"
33+
- sh -c "if [ '$TC' = 'app:check-code' ]; then ./occ app:check-code admin_audit; ./occ app:check-code comments; ./occ app:check-code federation; ./occ app:check-code workflowengine; fi"
3434
- sh -c "if [ '$TEST_DAV' != '1' ]; then echo \"Not testing DAV\"; fi"
3535
- sh -c "if [ '$TEST_DAV' = '1' ]; then echo \"Testing DAV\"; fi"
3636

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
/**
3+
* @copyright Copyright (c) 2016 Morris Jobke <[email protected]>
4+
*
5+
* @license GNU AGPL version 3 or any later version
6+
*
7+
* This program is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU Affero General Public License as
9+
* published by the Free Software Foundation, either version 3 of the
10+
* License, or (at your option) any later version.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU Affero General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU Affero General Public License
18+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19+
*
20+
*/
21+
22+
$application = new \OCA\WorkflowEngine\AppInfo\Application();
23+
$application->registerHooksAndListeners();
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<?xml version="1.0" encoding="ISO-8859-1" ?>
2+
<database>
3+
<name>*dbname*</name>
4+
<create>true</create>
5+
<overwrite>false</overwrite>
6+
<charset>utf8</charset>
7+
8+
<table>
9+
<name>*dbprefix*flow_checks</name>
10+
<declaration>
11+
<field>
12+
<name>id</name>
13+
<type>integer</type>
14+
<default>0</default>
15+
<notnull>true</notnull>
16+
<autoincrement>1</autoincrement>
17+
<length>4</length>
18+
</field>
19+
20+
<field>
21+
<name>class</name>
22+
<type>text</type>
23+
<notnull>true</notnull>
24+
<length>256</length>
25+
</field>
26+
<field>
27+
<name>operator</name>
28+
<type>text</type>
29+
<notnull>true</notnull>
30+
<length>16</length>
31+
</field>
32+
<field>
33+
<name>value</name>
34+
<type>clob</type>
35+
<notnull>false</notnull>
36+
</field>
37+
<field>
38+
<name>hash</name>
39+
<type>text</type>
40+
<notnull>true</notnull>
41+
<length>32</length>
42+
</field>
43+
44+
<index>
45+
<name>flow_unique_hash</name>
46+
<unique>true</unique>
47+
<field>
48+
<name>hash</name>
49+
</field>
50+
</index>
51+
</declaration>
52+
</table>
53+
54+
<table>
55+
<name>*dbprefix*flow_operations</name>
56+
<declaration>
57+
<field>
58+
<name>id</name>
59+
<type>integer</type>
60+
<default>0</default>
61+
<notnull>true</notnull>
62+
<autoincrement>1</autoincrement>
63+
<length>4</length>
64+
</field>
65+
66+
<field>
67+
<name>class</name>
68+
<type>text</type>
69+
<notnull>true</notnull>
70+
<length>256</length>
71+
</field>
72+
<field>
73+
<name>name</name>
74+
<type>text</type>
75+
<notnull>true</notnull>
76+
<length>256</length>
77+
</field>
78+
<field>
79+
<name>checks</name>
80+
<type>clob</type>
81+
<notnull>false</notnull>
82+
</field>
83+
<field>
84+
<name>operation</name>
85+
<type>clob</type>
86+
<notnull>false</notnull>
87+
</field>
88+
</declaration>
89+
</table>
90+
</database>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0"?>
2+
<info>
3+
<id>workflowengine</id>
4+
<name>Files Workflow Engine</name>
5+
<description></description>
6+
<licence>AGPL</licence>
7+
<author>Morris Jobke</author>
8+
<version>1.0.0</version>
9+
<namespace>WorkflowEngine</namespace>
10+
11+
<category>other</category>
12+
<website>https://github.com/nextcloud/server</website>
13+
<bugs>https://github.com/nextcloud/server/issues</bugs>
14+
<repository type="git">https://github.com/nextcloud/server.git</repository>
15+
16+
<types>
17+
<filesystem/>
18+
</types>
19+
20+
<dependencies>
21+
<owncloud min-version="9.2" max-version="9.2" />
22+
</dependencies>
23+
</info>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
/**
3+
* @copyright Copyright (c) 2016 Morris Jobke <[email protected]>
4+
*
5+
* @license GNU AGPL version 3 or any later version
6+
*
7+
* This program is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU Affero General Public License as
9+
* published by the Free Software Foundation, either version 3 of the
10+
* License, or (at your option) any later version.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU Affero General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU Affero General Public License
18+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19+
*
20+
*/
21+
22+
return [
23+
'routes' => [
24+
['name' => 'flowOperations#getOperations', 'url' => '/operations', 'verb' => 'GET'],
25+
['name' => 'flowOperations#addOperation', 'url' => '/operations', 'verb' => 'POST'],
26+
['name' => 'flowOperations#updateOperation', 'url' => '/operations/{id}', 'verb' => 'PUT'],
27+
['name' => 'flowOperations#deleteOperation', 'url' => '/operations/{id}', 'verb' => 'DELETE'],
28+
['name' => 'requestTime#getTimezones', 'url' => '/timezones', 'verb' => 'GET'],
29+
]
30+
];

apps/workflowengine/css/admin.css

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
.workflowengine .operation {
2+
padding: 5px;
3+
border-bottom: #eee 1px solid;
4+
border-left: rgba(0,0,0,0) 1px solid;
5+
}
6+
.workflowengine .operation.modified {
7+
border-left: rgb(255, 94, 32) 1px solid;
8+
}
9+
.workflowengine .operation button {
10+
margin-bottom: 0;
11+
}
12+
.workflowengine .operation span.info {
13+
padding: 7px;
14+
color: #eee;
15+
}
16+
.workflowengine .rules .operation:nth-last-child(2) {
17+
margin-bottom: 5px;
18+
}
19+
20+
.workflowengine .pull-right {
21+
float: right
22+
}
23+
24+
.workflowengine .operation .msg {
25+
border-radius: 3px;
26+
margin: 3px 3px 3px 0;
27+
padding: 5px;
28+
transition: opacity .5s;
29+
}
30+
31+
.workflowengine .operation .button-delete,
32+
.workflowengine .operation .button-delete-check {
33+
opacity: 0.5;
34+
padding: 7px;
35+
}
36+
.workflowengine .operation .button-delete:hover,
37+
.workflowengine .operation .button-delete:focus,
38+
.workflowengine .operation .button-delete-check:hover,
39+
.workflowengine .operation .button-delete-check:focus {
40+
opacity: 1;
41+
cursor: pointer;
42+
}
43+
44+
.workflowengine .rules .icon-loading-small {
45+
display: inline-block;
46+
margin-right: 5px;
47+
}
48+
49+
.workflowengine .invalid-input {
50+
border-color: #aa0000;
51+
}
52+

0 commit comments

Comments
 (0)