Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
21054c6
FOUR-32126: INBOX >> First loading is to slow
rodriquelca Jul 28, 2026
c192ab0
feat(FOUR-32800): add v1.1 task completion endpoint with raw SQL path
gproly Aug 28, 2026
6795511
feat(FOUR-32801): improve Jobs execution when the PUT tasks endpoint …
rodriquelca Aug 28, 2026
3fc16e0
style(FOUR-32800): reorder imports in task completion raw service files
gproly Aug 28, 2026
b55a89c
Merge branch 'develop' into feature/FOUR-32800
gproly Sep 2, 2026
05c05a4
perf(FOUR-32947): reduce N+1 queries on requests listing (FOUR-32947)
gproly Sep 4, 2026
a5f315b
FOUR-32800: test compares legacy and optimized
pmPaulis Sep 7, 2026
da5e64f
Merge pull request #9021 from ProcessMaker/bugfix/FOUR-32801
pmPaulis Sep 8, 2026
5e7ca61
Merge pull request #9020 from ProcessMaker/feature/FOUR-32800
pmPaulis Sep 8, 2026
c2ea6f6
feat(FOUR-32800): solving observation about starts
pmPaulis Sep 8, 2026
daafb12
Merge pull request #9046 from ProcessMaker/feature/FOUR-32800
pmPaulis Sep 8, 2026
f600087
feat: optimize notification settings retrieval in Process model
devmiguelangel Sep 10, 2026
b36b825
feat: enhance process retrieval logic by refining relationship handli…
devmiguelangel Sep 10, 2026
a550247
feat: correct query parameters in ProcessMixin to ensure proper data …
devmiguelangel Sep 10, 2026
fdd28de
test: add tests for process listing, including pagination, sorting, a…
devmiguelangel Sep 11, 2026
009273c
Merge branch 'develop' into task/FOUR-32144
gproly Sep 28, 2026
c527057
Merge remote-tracking branch 'origin/develop' into FOUR-32946
devmiguelangel Oct 5, 2026
499436d
fix(FOUR-33645): guard activity execution time metric when ms timesta…
gproly Oct 6, 2026
e314c13
Merge pull request #9045 from ProcessMaker/task/FOUR-32144
pmPaulis Oct 8, 2026
2d97d70
Merge pull request #9056 from ProcessMaker/FOUR-32946
pmPaulis Oct 8, 2026
c1e2d66
Merge pull request #9036 from ProcessMaker/feature/FOUR-32947
pmPaulis Oct 8, 2026
8ab48d6
Merge pull request #9090 from ProcessMaker/bugfix/FOUR-33645
pmPaulis Oct 8, 2026
a7216fd
Merge pull request #8942 from ProcessMaker/feature/FOUR-32126
pmPaulis Oct 8, 2026
9700501
Merge remote-tracking branch 'origin/develop' into epic/FOUR-32144
pmPaulis Oct 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(FOUR-32800): add v1.1 task completion endpoint with raw SQL path
Introduce PUT /api/1.1/tasks/{id} for COMPLETED status, gated by
TASK_UPDATE_V1_1_ENABLED, with optional raw token persistence behind
TOKEN_PERSISTENCE_RAW_ENABLED.

https://processmaker.atlassian.net/browse/FOUR-32800
  • Loading branch information
gproly committed Aug 28, 2026
commit c192ab0cabe72ed4a3c5bd9e20b44f4d4cfd4a2d
29 changes: 29 additions & 0 deletions ProcessMaker/Http/Controllers/Api/V1_1/TaskController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,16 @@
use ProcessMaker\Models\ProcessRequest;
use ProcessMaker\Models\ProcessRequestToken;
use ProcessMaker\ProcessTranslations\TranslationManager;
use ProcessMaker\Services\TaskCompletionRawService;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

class TaskController extends Controller
{
public function __construct(
private readonly TaskCompletionRawService $taskCompletionRawService,
) {
}

protected $defaultFields = [
'id',
'element_id',
Expand Down Expand Up @@ -151,4 +158,26 @@ public function showInterstitial($taskId)

return $response;
}

/**
* Complete a task using the raw-query optimized path.
*/
public function update(Request $request, int $taskId)
{
if ($request->input('status') !== 'COMPLETED') {
abort(422, __('Only task completion is supported on this endpoint. Use PUT /api/1.0/tasks/{id} for other updates.'));
}

try {
$task = $this->taskCompletionRawService->completeTask(
$taskId,
json_optimize_decode($request->getContent(), true) ?: [],
$request->user(),
);
} catch (NotFoundHttpException $exception) {
return response()->json(['message' => $exception->getMessage()], 404);
}

return response()->json($task);
}
}
11 changes: 11 additions & 0 deletions ProcessMaker/Repositories/ExecutionInstanceRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use ProcessMaker\Models\ProcessCollaboration;
use ProcessMaker\Models\ProcessRequest;
use ProcessMaker\Models\User;
use ProcessMaker\Repositories\TokenPersistenceRawRepository;
use ProcessMaker\Nayra\Contracts\Bpmn\ParticipantInterface;
use ProcessMaker\Nayra\Contracts\Engine\ExecutionInstanceInterface;
use ProcessMaker\Nayra\Contracts\Repositories\ExecutionInstanceRepositoryInterface;
Expand Down Expand Up @@ -236,6 +237,16 @@ public function persistInstanceUpdated(ExecutionInstanceInterface $instance)
return;
}

if (
config('app.token_persistence_raw_enabled', false)
&& $instance instanceof ProcessRequest
) {
app(TokenPersistenceRawRepository::class)->persistInstanceUpdated($instance);
CaseUpdateStatus::dispatchSync($instance);

return;
}

// Save updated instance
if (!$instance->status) {
$instance->status = 'ACTIVE';
Expand Down
Loading
Loading