1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
script.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Bizproc\Script\Entity
;
4
5
use
Bitrix\Bizproc\Script\Queue\Status
;
6
use
Bitrix\Main
;
7
24
class
ScriptTable
extends
Main\Entity\DataManager
25
{
29
public
static
function
getTableName
()
30
{
31
return
'b_bp_script'
;
32
}
33
37
public
static
function
getMap
()
38
{
39
return
[
40
'ID'
=> [
41
'data_type'
=>
'integer'
,
42
'primary'
=>
true
,
43
'autocomplete'
=>
true
,
44
],
45
'MODULE_ID'
=> [
46
'data_type'
=>
'string'
47
],
48
'ENTITY'
=> [
49
'data_type'
=>
'string'
50
],
51
'DOCUMENT_TYPE'
=> [
52
'data_type'
=>
'string'
53
],
54
'NAME'
=> [
55
'data_type'
=>
'string'
56
],
57
'DESCRIPTION'
=> [
58
'data_type'
=>
'string'
59
],
60
'WORKFLOW_TEMPLATE_ID'
=> [
61
'data_type'
=>
'integer'
62
],
63
'WORKFLOW_TEMPLATE'
=>
array
(
64
'data_type'
=> \
Bitrix
\
Bizproc
\
Workflow
\Template\
Entity
\WorkflowTemplateTable::class,
65
'reference'
=>
array
(
66
'=this.WORKFLOW_TEMPLATE_ID'
=>
'ref.ID'
67
),
68
'join_type'
=>
'LEFT'
69
),
70
'CREATED_DATE'
=> [
71
'data_type'
=>
'datetime'
72
],
73
'CREATED_BY'
=> [
74
'data_type'
=>
'integer'
75
],
76
'MODIFIED_DATE'
=> [
77
'data_type'
=>
'datetime'
78
],
79
'MODIFIED_BY'
=> [
80
'data_type'
=>
'integer'
81
],
82
'ORIGINATOR_ID'
=> [
83
'data_type'
=>
'string'
84
],
85
'ORIGIN_ID'
=> [
86
'data_type'
=>
'string'
87
],
88
'SORT'
=> [
89
'data_type'
=>
'integer'
,
90
'default_value'
=> 10
91
],
92
'ACTIVE'
=> [
93
'data_type'
=>
'boolean'
,
94
'values'
=> [
'N'
,
'Y'
],
95
'default_value'
=>
'Y'
96
],
97
];
98
}
99
public
static
function
getQueueCount
(
int
$scriptId): int
100
{
101
return
ScriptQueueTable::getCount([
'=SCRIPT_ID'
=> $scriptId]);
102
}
103
104
public
static
function
getActiveQueueCount
(
int
$scriptId): int
105
{
106
return
ScriptQueueTable::getCount(
107
[
108
'=SCRIPT_ID'
=> $scriptId,
109
'@STATUS'
=> [Status::QUEUED, Status::EXECUTING]
110
]
111
);
112
}
113
114
public
static
function
getLastStartedDate
(
int
$scriptId): ?
Main
\
Type
\
DateTime
115
{
116
$row = ScriptQueueTable::getList(
117
[
118
'filter'
=> [
'=SCRIPT_ID'
=> $scriptId],
119
'order'
=> [
'STARTED_DATE'
=>
'DESC'
],
120
'limit'
=> 1,
121
'select'
=> [
'STARTED_DATE'
]
122
]
123
)->fetch();
124
125
return
$row? $row[
'STARTED_DATE'
] :
null
;
126
}
127
}
Bitrix\Bizproc\Script\Entity\ScriptTable
Определения
script.php:25
Bitrix\Bizproc\Script\Entity\ScriptTable\getLastStartedDate
static getLastStartedDate(int $scriptId)
Определения
script.php:114
Bitrix\Bizproc\Script\Entity\ScriptTable\getMap
static getMap()
Определения
script.php:37
Bitrix\Bizproc\Script\Entity\ScriptTable\getQueueCount
static getQueueCount(int $scriptId)
Определения
script.php:99
Bitrix\Bizproc\Script\Entity\ScriptTable\getActiveQueueCount
static getActiveQueueCount(int $scriptId)
Определения
script.php:104
Bitrix\Bizproc\Script\Entity\ScriptTable\getTableName
static getTableName()
Определения
script.php:29
Bitrix\Bizproc\Script\Queue\Status
Определения
status.php:7
Bitrix\Main\Type\DateTime
Определения
datetime.php:9
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
Bitrix\Bizproc\Script\Entity
Определения
script.php:3
Bitrix\Bizproc\Workflow
Bitrix\Bizproc
Bitrix\Main\Entity
Определения
ufield.php:9
Bitrix\Main\Type
Определения
collection.php:2
Bitrix\Main
Bitrix
bitrix
modules
bizproc
lib
script
entity
script.php
Создано системой
1.14.0