@php use App\Classes\CamundaEntities; @endphp @extends('layouts.base') @section('heading') {{ __('Process') }}: {{ $process->name }} - v{{ $process->version }} @endsection @section('return-link')
PROCESSES
@endsection @section('center-focus-activity') HISTORY @endsection @section('seconday-activity')
@endsection @section('info') {{ $process->id }} @endsection @section('focus_action')
Add variables to complete your task (optional)
@csrf
Add any required Variables
# variable name variable value
{{--
@endsection @section('body')
{{--
@foreach ($process->tasks() as $task)
{{ $task->name }}
{{ $task->id }}
@endforeach
--}}
@php $parameter_name = "pdPiPage"; $page_number = $_GET[$parameter_name] ?? 1; $search_term = $_GET['s'] ?? ""; $search_term = "%" . $search_term . "%"; $init_request = $process->definePagination($page_number, 2, $parameter_name); $process_instances = $init_request->add_parameters('businessKeyLike', $search_term)->instances(); $paginator = $init_request->paginator; @endphp @include('app.processes.templates.instances_table')
@include('app.components.paginator')
{{-- @foreach ($process->instances() as $instance)
{{ $instance->id }}
@endforeach --}}
Process Instances History
@php $parameter_name = 'pIHistPage'; // corresponds with the name set int he class method $page_number = $request->$parameter_name ?? 1; $history_resource = $process->definePagination($page_number, 5, $parameter_name)->forInstance()->byDefinition(); $process_history_for_instances = $history_resource->fetchHistory(); $paginator = $history_resource->paginator; @endphp @foreach ($process_history_for_instances as $history)
{{-- @dump($history) --}} @php $process_instances_history = CamundaEntities::initHistory()->forActivityInstance()->byInstance($history->id)->fetchHistory(); @endphp
Business Key: {{ $history->businessKey ?? null }}
Id: {{ $history->id }}
{{-- Name: {{ $history->name }}
--}} {{-- deleteReason: {{ $history->deleteReason ?? 'none' }}
--}} time duration: {{ $history->durationInMillis != null ? date('H:i:s', $history->durationInMillis) : '' }}
state: {{ Str::lower($history->state ?? 'none') }}
{{-- Activity Instances --}}
@foreach ($process_instances_history->sortBy(['startTime', 'asc'], ['endTime', 'asc']) as $_history)
{{-- @dump($_history) --}} Type: {{ $_history->activityType ?? null }}
{{-- Process Instance: {{ $_history->processInstanceId ?? null }}
--}} Id: {{ $_history->id ?? null }}
Name: {{ $_history->activityName ?? 'none' }}
Type: {{ $_history->activityType ?? null }}
Description: {{ $_history->description ?? 'empty' }}
TaskId: {{ $_history->taskId ?? 'empty' }}
Assignee: {{ $_history->assignee ?? 'none' }}
deleteReason: {{ $_history->deleteReason ?? 'null' }}
started: {{ $_history->startTime ?? 'none' }}
ended: {{ $_history->endTime ?? 'null' }}
{{-- completed: {{ $_history->completeScope ? 'true' : 'false' }}
canceled: {{ ($_history->canceled ? 'true' : 'false') ?? '' }}
--}} state: {{ $_history->endTime != null ? 'ended' : 'active' }}

@endforeach
@endforeach @php // $paginator = array(); // $paginator['match'] = 'pageNumber'; // $paginator['parameter_name'] = 'pageNumber'; // $paginator['total_pages'] = $history_resource->total_pages; // $paginator['total_pages'] = $history_resource->fetchHistoryCount(); // dump($paginator); @endphp
@include('app.components.paginator')
@if ((count($process_history_for_instances ?? [])) < 1)
No previous instances yet
@endif {{-- @foreach ($process->forActivityInstance()->byDefinition()->fetchHistory()->sortBy(['startTime', 'asc'], ['endTime', 'asc']) as $_history)
@dump($_history) Business Key: {{ $_history->businessKey ?? null }}
Process Instance: {{ $_history->processInstanceId ?? null }}
Id: {{ $_history->id ?? null }}
Name: {{ $_history->activityName ?? 'none' }}
Type: {{ $_history->activityType ?? null }}
Description: {{ $_history->description ?? 'empty' }}
Type: {{ $_history->activityType ?? null }}
TaskId: {{ $_history->taskId ?? 'empty' }}
Assignee: {{ $_history->assignee ?? 'none' }}
deleteReason: {{ $_history->deleteReason ?? 'none' }}
started: {{ $_history->startTime ?? 'none' }}
ended: {{ $_history->endTime ?? 'none' }}
completed: {{ $_history->completeScope ? 'true' : 'false' }}
canceled: {{ ($_history->canceled ? 'true' : 'false') ?? '' }}
state: {{ $_history->endTime != null ? 'ended' : 'active' }}

@endforeach --}} {{-- @dump($process->image()['bpmn20Xml']) --}}
@endsection