-
Notifications
You must be signed in to change notification settings - Fork 243
Expand file tree
/
Copy pathScheduledTask.php
More file actions
62 lines (51 loc) · 1.3 KB
/
ScheduledTask.php
File metadata and controls
62 lines (51 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
namespace ProcessMaker\Models;
use ProcessMaker\Traits\SerializeToIso8601;
/**
* Represents a task that will be scheduled to run
*/
class ScheduledTask extends ProcessMakerModel
{
use SerializeToIso8601;
protected $connection = 'processmaker';
protected $fillable = [
'process_id', 'process_request_id', 'process_request_token_id', 'configuration',
'type', 'last_execution', 'claimed_by', 'claimed_at',
];
protected $casts = [
'claimed_at' => 'datetime',
];
public static function rules()
{
return [
'process_id' => 'required',
];
}
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function process()
{
return $this->belongsTo(Process::class);
}
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function processRequest()
{
return $this->belongsTo(ProcessRequest::class);
}
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function processRequestToken()
{
return $this->belongsTo(ProcessRequestToken::class);
}
public function fillStartEvents()
{
$processes = Process::all();
foreach ($processes as $process) {
}
}
}