Skip to content

Commit 755f6d9

Browse files
Merge branch 'epic/FOUR-26391' of github.com:ProcessMaker/processmaker into task/FOUR-26416
2 parents 391e24e + 15460f6 commit 755f6d9

File tree

17 files changed

+56971
-36
lines changed

17 files changed

+56971
-36
lines changed

ProcessMaker/Jobs/RefreshArtisanCaches.php

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Illuminate\Contracts\Queue\ShouldQueue;
77
use Illuminate\Foundation\Bus\Dispatchable;
88
use Illuminate\Queue\InteractsWithQueue;
9+
use Illuminate\Queue\Middleware\WithoutOverlapping;
910
use Illuminate\Support\Facades\Artisan;
1011

1112
class RefreshArtisanCaches implements ShouldQueue
@@ -24,6 +25,16 @@ public function __construct()
2425
//
2526
}
2627

28+
/**
29+
* Debounce when multiple Settings are saved at the same time
30+
*
31+
* @return array<int, object>
32+
*/
33+
public function middleware(): array
34+
{
35+
return [(new WithoutOverlapping('refresh_artisan_caches'))->dontRelease()];
36+
}
37+
2738
/**
2839
* Execute the job.
2940
*
@@ -38,12 +49,7 @@ public function handle()
3849

3950
if (app()->configurationIsCached()) {
4051
Artisan::call('config:cache', $options);
41-
} else {
42-
Artisan::call('queue:restart', $options);
43-
44-
// We call this manually here since this job is dispatched
45-
// automatically when the config *is* cached
46-
RestartMessageConsumers::dispatchSync();
4752
}
53+
Artisan::call('queue:restart', $options);
4854
}
4955
}

ProcessMaker/Models/Process.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,8 +773,8 @@ private function getNextUserFromProcessVariable($activity, $token)
773773
$dataManager = new DataManager();
774774
$instanceData = $dataManager->getData($token);
775775

776-
$assignedUsers = $usersVariable ? Arr::get($instanceData, $usersVariable) : [];
777-
$assignedGroups = $groupsVariable ? Arr::get($instanceData, $groupsVariable) : [];
776+
$assignedUsers = $usersVariable ? feelExpression($usersVariable, $instanceData) : [];
777+
$assignedGroups = $groupsVariable ? feelExpression($groupsVariable, $instanceData) : [];
778778

779779
if (!is_array($assignedUsers)) {
780780
$assignedUsers = [$assignedUsers];

ProcessMaker/Multitenancy/SwitchTenant.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ public function makeCurrent(IsTenant $tenant): void
113113
}
114114
config($config);
115115

116+
// The previous app key was saved in the singleton, so we need to forget it.
117+
$app->forgetInstance('encrypter');
118+
116119
// Extend BroadcastManager to our custom implementation that prefixes the channel names with the tenant id.
117120
$app->extend(BroadcastManager::class, function ($manager, $app) use ($tenant) {
118121
return new TenantAwareBroadcastManager($app, $tenant->id);

ProcessMaker/Observers/SettingObserver.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Exception;
66
use Illuminate\Support\Facades\Log;
77
use ProcessMaker\Cache\Settings\SettingCacheFactory;
8+
use ProcessMaker\Jobs\RefreshArtisanCaches;
89
use ProcessMaker\Models\Setting;
910

1011
class SettingObserver
@@ -89,5 +90,7 @@ private function invalidateSettingCache(Setting $setting)
8990
// Invalidate the setting cache
9091
$key = $settingCache->createKey(['key' => $setting->key]);
9192
$settingCache->invalidate(['key' => $key]);
93+
94+
RefreshArtisanCaches::dispatch();
9295
}
9396
}

composer.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "processmaker/processmaker",
3-
"version": "4.15.7+beta-3",
3+
"version": "4.15.7",
44
"description": "BPM PHP Software",
55
"keywords": [
66
"php bpm processmaker"
@@ -106,7 +106,7 @@
106106
"Gmail"
107107
],
108108
"processmaker": {
109-
"build": "17e2d8f1",
109+
"build": "ffb3f767",
110110
"cicd-enabled": true,
111111
"custom": {
112112
"package-ellucian-ethos": "1.19.7",
@@ -139,7 +139,8 @@
139139
"package-accessibility": "1.0.0",
140140
"package-zj-birmingham": "dev-main",
141141
"package-tce": "dev-master",
142-
"package-case-overview": "dev-main"
142+
"package-case-overview": "dev-main",
143+
"package-sis-integration": "1.0.0"
143144
},
144145
"enterprise": {
145146
"connector-docusign": "1.11.0",
@@ -151,16 +152,16 @@
151152
"package-ab-testing": "1.4.0",
152153
"package-actions-by-email": "1.22.6",
153154
"package-advanced-user-manager": "1.13.0",
154-
"package-ai": "1.16.7",
155+
"package-ai": "1.16.8",
155156
"package-analytics-reporting": "1.11.1",
156157
"package-auth": "1.24.9",
157158
"package-collections": "2.27.0",
158159
"package-comments": "1.16.0",
159160
"package-conversational-forms": "1.15.0",
160-
"package-data-sources": "1.34.1",
161+
"package-data-sources": "1.34.2",
161162
"package-decision-engine": "1.16.1",
162163
"package-dynamic-ui": "1.28.2",
163-
"package-email-start-event": "1.0.5",
164+
"package-email-start-event": "1.0.6",
164165
"package-files": "1.23.0",
165166
"package-googleplaces": "1.12.0",
166167
"package-photo-video": "1.6.1",
@@ -172,13 +173,12 @@
172173
"package-rpa": "1.1.1",
173174
"package-savedsearch": "1.43.4",
174175
"package-slideshow": "1.4.3",
175-
"package-sentry": "1.12.0",
176-
"package-signature": "1.15.1",
176+
"package-signature": "1.15.2",
177177
"package-testing": "1.8.1",
178178
"package-translations": "2.14.4",
179179
"package-versions": "1.13.0",
180180
"package-vocabularies": "2.17.0",
181-
"package-webentry": "2.29.6",
181+
"package-webentry": "2.29.7",
182182
"package-api-testing": "1.3.1",
183183
"package-variable-finder": "1.0.3",
184184
"packages": "^0"

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

helpers.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
use Illuminate\Support\Facades\Auth;
44
use Laravel\Horizon\Repositories\RedisJobRepository;
55
use ProcessMaker\Events\MarkArtisanCachesAsInvalid;
6+
use ProcessMaker\Models\FormalExpression;
67
use ProcessMaker\Models\Setting;
78
use ProcessMaker\SanitizeHelper;
89
use ProcessMaker\Support\JsonOptimizer;
@@ -359,3 +360,20 @@ function json_optimize_decode(string $json, bool $assoc = false, int $depth = 51
359360
return JsonOptimizer::decode($json, $assoc, $depth, $options);
360361
}
361362
}
363+
364+
if (!function_exists('feelExpression')) {
365+
/**
366+
* Evaluate a BPMN FEEL expression
367+
*
368+
* @param string $expression
369+
* @param array $data
370+
* @return mixed
371+
*/
372+
function feelExpression(string $expression, array $data)
373+
{
374+
$formalExp = new FormalExpression();
375+
$formalExp->setLanguage('FEEL');
376+
$formalExp->setBody($expression);
377+
return $formalExp($data);
378+
}
379+
}

package-lock.json

Lines changed: 127 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"@panter/vue-i18next": "^0.15.2",
6363
"@processmaker/modeler": "1.69.16",
6464
"@processmaker/processmaker-bpmn-moddle": "0.16.0",
65-
"@processmaker/screen-builder": "3.8.12",
65+
"@processmaker/screen-builder": "3.8.7",
6666
"@processmaker/vue-form-elements": "0.65.4",
6767
"@processmaker/vue-multiselect": "2.3.0",
6868
"@tinymce/tinymce-vue": "2.0.0",

0 commit comments

Comments
 (0)