pinexq-client 0.3.0.20240620.2__py3-none-any.whl → 0.4.0.2024.717.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pinexq_client/core/enterapi.py +8 -9
- pinexq_client/core/exceptions.py +73 -2
- pinexq_client/core/hco/action_hco.py +12 -22
- pinexq_client/core/hco/action_with_parameters_hco.py +15 -21
- pinexq_client/core/hco/download_link_hco.py +2 -3
- pinexq_client/core/hco/hco_base.py +2 -3
- pinexq_client/core/hco/link_hco.py +10 -9
- pinexq_client/core/hco/unavailable.py +17 -0
- pinexq_client/core/hco/upload_action_hco.py +11 -10
- pinexq_client/core/model/error.py +5 -1
- pinexq_client/core/sirenaccess.py +18 -27
- pinexq_client/job_management/enterjma.py +2 -4
- pinexq_client/job_management/hcos/entrypoint_hco.py +36 -35
- pinexq_client/job_management/hcos/input_dataslot_hco.py +53 -51
- pinexq_client/job_management/hcos/job_hco.py +121 -120
- pinexq_client/job_management/hcos/job_query_result_hco.py +72 -47
- pinexq_client/job_management/hcos/jobsroot_hco.py +44 -42
- pinexq_client/job_management/hcos/output_dataslot_hco.py +1 -1
- pinexq_client/job_management/hcos/processing_step_hco.py +71 -70
- pinexq_client/job_management/hcos/processingstep_query_result_hco.py +76 -51
- pinexq_client/job_management/hcos/processingsteproot_hco.py +44 -43
- pinexq_client/job_management/hcos/workdata_hco.py +81 -80
- pinexq_client/job_management/hcos/workdata_query_result_hco.py +75 -52
- pinexq_client/job_management/hcos/workdataroot_hco.py +53 -52
- pinexq_client/job_management/tool/job.py +104 -7
- pinexq_client/job_management/tool/job_group.py +140 -0
- pinexq_client/job_management/tool/workdata.py +8 -0
- {pinexq_client-0.3.0.20240620.2.dist-info → pinexq_client-0.4.0.2024.717.1.dist-info}/METADATA +1 -1
- pinexq_client-0.4.0.2024.717.1.dist-info/RECORD +52 -0
- {pinexq_client-0.3.0.20240620.2.dist-info → pinexq_client-0.4.0.2024.717.1.dist-info}/WHEEL +1 -1
- pinexq_client-0.3.0.20240620.2.dist-info/RECORD +0 -50
- {pinexq_client-0.3.0.20240620.2.dist-info → pinexq_client-0.4.0.2024.717.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -5,6 +5,7 @@ import httpx
|
|
|
5
5
|
|
|
6
6
|
from pinexq_client.core.hco.hco_base import Hco
|
|
7
7
|
from pinexq_client.core.hco.link_hco import LinkHco
|
|
8
|
+
from pinexq_client.core.hco.unavailable import UnavailableLink
|
|
8
9
|
from pinexq_client.job_management.hcos.info_hco import InfoLink
|
|
9
10
|
from pinexq_client.job_management.hcos.jobsroot_hco import JobsRootLink
|
|
10
11
|
from pinexq_client.job_management.hcos.processingsteproot_hco import ProcessingStepsRootLink
|
|
@@ -14,44 +15,44 @@ from pinexq_client.job_management.model.sirenentities import EntryPointEntity
|
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
class EntryPointLink(LinkHco):
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
def navigate(self) -> 'EntryPointHco':
|
|
19
|
+
return EntryPointHco.from_entity(self._navigate_internal(EntryPointEntity), self._client)
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
class EntrypointRelations(StrEnum):
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
JOBS_ROOT = "JobsRoot"
|
|
24
|
+
WORKDATA_ROOT = "WorkDataRoot"
|
|
25
|
+
PROCESSINGSTEPS_ROOT = "ProcessingStepsRoot"
|
|
26
|
+
INFO = "Info"
|
|
27
|
+
ADMIN = "Admin"
|
|
27
28
|
|
|
28
29
|
|
|
29
30
|
class EntryPointHco(Hco[EntryPointEntity]):
|
|
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
|
-
|
|
31
|
+
self_link: EntryPointLink
|
|
32
|
+
job_root_link: JobsRootLink
|
|
33
|
+
work_data_root_link: WorkDataRootLink
|
|
34
|
+
processing_step_root_link: ProcessingStepsRootLink
|
|
35
|
+
info_link: InfoLink
|
|
36
|
+
|
|
37
|
+
admin_link: LinkHco | UnavailableLink
|
|
38
|
+
|
|
39
|
+
@classmethod
|
|
40
|
+
def from_entity(cls, entity: EntryPointEntity, client: httpx.Client) -> Self:
|
|
41
|
+
instance = cls(client, entity)
|
|
42
|
+
Hco.check_classes(instance._entity.class_, ["EntryPoint"])
|
|
43
|
+
|
|
44
|
+
instance.self_link = EntryPointLink.from_entity(
|
|
45
|
+
instance._client, instance._entity, Relations.SELF)
|
|
46
|
+
instance.info_link = InfoLink.from_entity(
|
|
47
|
+
instance._client, instance._entity, EntrypointRelations.INFO)
|
|
48
|
+
instance.job_root_link = JobsRootLink.from_entity(
|
|
49
|
+
instance._client, instance._entity, EntrypointRelations.JOBS_ROOT)
|
|
50
|
+
instance.work_data_root_link = WorkDataRootLink.from_entity(
|
|
51
|
+
instance._client, instance._entity, EntrypointRelations.WORKDATA_ROOT)
|
|
52
|
+
instance.processing_step_root_link = ProcessingStepsRootLink.from_entity(
|
|
53
|
+
instance._client, instance._entity, EntrypointRelations.PROCESSINGSTEPS_ROOT)
|
|
54
|
+
|
|
55
|
+
instance.admin_link = LinkHco.from_entity_optional(
|
|
56
|
+
instance._client, instance._entity, EntrypointRelations.ADMIN)
|
|
57
|
+
|
|
58
|
+
return instance
|
|
@@ -7,76 +7,78 @@ from pinexq_client.core.hco.action_hco import ActionHco
|
|
|
7
7
|
from pinexq_client.core.hco.action_with_parameters_hco import ActionWithParametersHco
|
|
8
8
|
from pinexq_client.core.hco.hco_base import Hco, Property
|
|
9
9
|
from pinexq_client.core.hco.link_hco import LinkHco
|
|
10
|
+
from pinexq_client.core.hco.unavailable import UnavailableAction
|
|
10
11
|
from pinexq_client.core.hco.upload_action_hco import UploadAction, UploadParameters
|
|
11
12
|
from pinexq_client.job_management.hcos.workdata_hco import WorkDataLink, WorkDataHco
|
|
12
13
|
from pinexq_client.job_management.known_relations import Relations
|
|
13
14
|
from pinexq_client.job_management.model.open_api_generated import SelectWorkDataForDataSlotParameters, \
|
|
14
|
-
|
|
15
|
+
SelectWorkDataCollectionForDataSlotParameters
|
|
15
16
|
from pinexq_client.job_management.model.sirenentities import InputDataSlotEntity, WorkDataEntity
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
class InputDataSlotLink(LinkHco):
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
def navigate(self) -> 'InputDataSlotHco':
|
|
21
|
+
return InputDataSlotHco.from_entity(self._navigate_internal(InputDataSlotEntity), self._client)
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
class InputDataSlotSelectWorkDataAction(ActionWithParametersHco[SelectWorkDataForDataSlotParameters]):
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
def execute(self, parameters: SelectWorkDataForDataSlotParameters):
|
|
26
|
+
self._execute(parameters)
|
|
26
27
|
|
|
27
28
|
|
|
28
|
-
class InputDataSlotSelectWorkDataCollectionAction(
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
class InputDataSlotSelectWorkDataCollectionAction(
|
|
30
|
+
ActionWithParametersHco[SelectWorkDataCollectionForDataSlotParameters]):
|
|
31
|
+
def execute(self, parameters: SelectWorkDataCollectionForDataSlotParameters):
|
|
32
|
+
self._execute(parameters)
|
|
31
33
|
|
|
32
34
|
|
|
33
35
|
class InputDataSlotUploadWorkDataAction(UploadAction):
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
def execute(self, parameters: UploadParameters) -> WorkDataLink:
|
|
37
|
+
url = self._upload(parameters)
|
|
38
|
+
link = Link.from_url(url, [str(Relations.CREATED_RESSOURCE)], "Uploaded workdata", MediaTypes.SIREN)
|
|
39
|
+
return WorkDataLink.from_link(self._client, link)
|
|
38
40
|
|
|
39
41
|
|
|
40
42
|
class InputDataSlotClearDataAction(ActionHco):
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
def execute(self):
|
|
44
|
+
self._execute_internal()
|
|
43
45
|
|
|
44
46
|
|
|
45
47
|
class InputDataSlotHco(Hco[InputDataSlotEntity]):
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
48
|
+
is_configured: bool | None = Property()
|
|
49
|
+
title: str | None = Property()
|
|
50
|
+
description: str | None = Property()
|
|
51
|
+
media_type: str | None = Property()
|
|
52
|
+
selected_workdatas: list[WorkDataHco]
|
|
53
|
+
|
|
54
|
+
select_workdata_action: InputDataSlotSelectWorkDataAction | UnavailableAction
|
|
55
|
+
select_workdata_collection_action: InputDataSlotSelectWorkDataCollectionAction | UnavailableAction
|
|
56
|
+
clear_workdata_action: InputDataSlotClearDataAction | UnavailableAction
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_entity(cls, entity: InputDataSlotEntity, client: httpx.Client) -> Self:
|
|
60
|
+
instance = cls(client, entity)
|
|
61
|
+
Hco.check_classes(instance._entity.class_, ["InputDataSlot"])
|
|
62
|
+
|
|
63
|
+
# actions
|
|
64
|
+
instance.select_workdata_action = InputDataSlotSelectWorkDataAction.from_entity_optional(
|
|
65
|
+
client, instance._entity, "SelectWorkData")
|
|
66
|
+
instance.select_workdata_collection_action = InputDataSlotSelectWorkDataCollectionAction.from_entity_optional(
|
|
67
|
+
client, instance._entity, "SelectWorkDataCollection")
|
|
68
|
+
instance.clear_workdata_action = InputDataSlotClearDataAction.from_entity_optional(
|
|
69
|
+
client, instance._entity, "Clear")
|
|
70
|
+
|
|
71
|
+
instance._extract_workdata()
|
|
72
|
+
|
|
73
|
+
return instance
|
|
74
|
+
|
|
75
|
+
def _extract_workdata(self):
|
|
76
|
+
self.selected_workdatas = []
|
|
77
|
+
|
|
78
|
+
workdatas: list[WorkDataEntity] = self._entity.find_all_entities_with_relation(Relations.SELECTED,
|
|
79
|
+
WorkDataEntity)
|
|
80
|
+
if not workdatas:
|
|
81
|
+
return
|
|
82
|
+
|
|
83
|
+
self.selected_workdatas = [WorkDataHco.from_entity(workdata, self._client)
|
|
84
|
+
for workdata in workdatas]
|
|
@@ -8,175 +8,176 @@ from pinexq_client.core.hco.action_hco import ActionHco
|
|
|
8
8
|
from pinexq_client.core.hco.action_with_parameters_hco import ActionWithParametersHco
|
|
9
9
|
from pinexq_client.core.hco.hco_base import Hco, Property
|
|
10
10
|
from pinexq_client.core.hco.link_hco import LinkHco
|
|
11
|
+
from pinexq_client.core.hco.unavailable import UnavailableAction, UnavailableLink
|
|
11
12
|
from pinexq_client.job_management.hcos import InputDataSlotHco
|
|
12
13
|
from pinexq_client.job_management.hcos.output_dataslot_hco import OutputDataSlotHco
|
|
13
14
|
from pinexq_client.job_management.hcos.processing_step_hco import ProcessingStepLink
|
|
14
15
|
from pinexq_client.job_management.known_relations import Relations
|
|
15
16
|
from pinexq_client.job_management.model.open_api_generated import JobStates, ProcessingView, RenameJobParameters, \
|
|
16
|
-
|
|
17
|
+
SelectProcessingParameters, SetJobTagsParameters
|
|
17
18
|
from pinexq_client.job_management.model.sirenentities import JobEntity, InputDataSlotEntity, OutputDataSlotEntity
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
class JobRenameAction(ActionWithParametersHco[RenameJobParameters]):
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
def execute(self, parameters: RenameJobParameters):
|
|
23
|
+
self._execute(parameters)
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
def default_parameters(self) -> RenameJobParameters:
|
|
26
|
+
return self._get_default_parameters(RenameJobParameters, RenameJobParameters())
|
|
26
27
|
|
|
27
28
|
|
|
28
29
|
class JobSelectProcessingAction(ActionWithParametersHco[SelectProcessingParameters]):
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
def execute(self, parameters: SelectProcessingParameters):
|
|
31
|
+
self._execute(parameters)
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
def default_parameters(self) -> SelectProcessingParameters:
|
|
34
|
+
return self._get_default_parameters(SelectProcessingParameters, SelectProcessingParameters())
|
|
34
35
|
|
|
35
36
|
|
|
36
37
|
class JobHideAction(ActionHco):
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
def execute(self):
|
|
39
|
+
self._execute_internal()
|
|
39
40
|
|
|
40
41
|
|
|
41
42
|
class JobUnHideAction(ActionHco):
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
def execute(self):
|
|
44
|
+
self._execute_internal()
|
|
44
45
|
|
|
45
46
|
|
|
46
47
|
class JobDeleteAction(ActionHco):
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
def execute(self):
|
|
49
|
+
self._execute_internal()
|
|
49
50
|
|
|
50
51
|
|
|
51
52
|
class JobAllowOutputDataDeletionAction(ActionHco):
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
def execute(self):
|
|
54
|
+
self._execute_internal()
|
|
54
55
|
|
|
55
56
|
|
|
56
57
|
class JobDisAllowOutputDataDeletionAction(ActionHco):
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
def execute(self):
|
|
59
|
+
self._execute_internal()
|
|
59
60
|
|
|
60
61
|
|
|
61
62
|
class GenericProcessingConfigureParameters(BaseModel):
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
"""Generic parameter model, that can be set with any dictionary"""
|
|
64
|
+
model_config = ConfigDict(extra='allow')
|
|
64
65
|
|
|
65
66
|
|
|
66
67
|
class JobConfigureProcessingAction(ActionWithParametersHco[GenericProcessingConfigureParameters]):
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
def execute(self, parameters: GenericProcessingConfigureParameters):
|
|
69
|
+
self._execute(parameters)
|
|
69
70
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
def default_parameters(self) -> GenericProcessingConfigureParameters:
|
|
72
|
+
return self._get_default_parameters(GenericProcessingConfigureParameters,
|
|
73
|
+
GenericProcessingConfigureParameters())
|
|
73
74
|
|
|
74
75
|
|
|
75
76
|
class JobStartProcessingAction(ActionHco):
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
def execute(self):
|
|
78
|
+
self._execute_internal()
|
|
78
79
|
|
|
79
80
|
|
|
80
81
|
class JobLink(LinkHco):
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
def navigate(self) -> 'JobHco':
|
|
83
|
+
return JobHco.from_entity(self._navigate_internal(JobEntity), self._client)
|
|
83
84
|
|
|
84
85
|
|
|
85
86
|
class ParentJobLink(LinkHco):
|
|
86
|
-
|
|
87
|
-
|
|
87
|
+
def navigate(self) -> 'JobHco':
|
|
88
|
+
return JobHco.from_entity(self._navigate_internal(JobEntity), self._client)
|
|
88
89
|
|
|
89
90
|
|
|
90
91
|
class JobEditTagsAction(ActionWithParametersHco[SetJobTagsParameters]):
|
|
91
|
-
|
|
92
|
-
|
|
92
|
+
def execute(self, parameters: SetJobTagsParameters):
|
|
93
|
+
self._execute(parameters)
|
|
93
94
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
def default_parameters(self) -> SetJobTagsParameters:
|
|
96
|
+
# todo check why we have to manually set tags
|
|
97
|
+
return self._get_default_parameters(SetJobTagsParameters, SetJobTagsParameters(tags=[]))
|
|
97
98
|
|
|
98
99
|
|
|
99
100
|
class JobHco(Hco[JobEntity]):
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
101
|
+
name: str = Property()
|
|
102
|
+
state: JobStates = Property()
|
|
103
|
+
hidden: bool = Property()
|
|
104
|
+
tags: list[str] | None = Property()
|
|
105
|
+
output_is_deletable: bool = Property()
|
|
106
|
+
created_at: datetime = Property()
|
|
107
|
+
completed_at: datetime = Property()
|
|
108
|
+
error_description: str = Property()
|
|
109
|
+
processing: ProcessingView = Property()
|
|
110
|
+
result: str = Property()
|
|
111
|
+
|
|
112
|
+
self_link: JobLink
|
|
113
|
+
parent_link: ParentJobLink | UnavailableLink
|
|
114
|
+
selected_processing_step_link: ProcessingStepLink | UnavailableLink
|
|
115
|
+
|
|
116
|
+
rename_action: JobRenameAction | UnavailableAction
|
|
117
|
+
select_processing_action: JobSelectProcessingAction | UnavailableAction
|
|
118
|
+
configure_processing_action: JobConfigureProcessingAction | UnavailableAction
|
|
119
|
+
start_processing_action: JobStartProcessingAction | UnavailableAction
|
|
120
|
+
hide_action: JobHideAction | UnavailableAction
|
|
121
|
+
unhide_action: JobUnHideAction | UnavailableAction
|
|
122
|
+
delete_action: JobDeleteAction | UnavailableAction
|
|
123
|
+
allow_output_data_deletion_action: JobAllowOutputDataDeletionAction | UnavailableAction
|
|
124
|
+
disallow_output_data_deletion_action: JobDisAllowOutputDataDeletionAction | UnavailableAction
|
|
125
|
+
edit_tags_action: JobEditTagsAction | UnavailableAction
|
|
126
|
+
|
|
127
|
+
input_dataslots: List[InputDataSlotHco]
|
|
128
|
+
output_dataslots: List[OutputDataSlotHco]
|
|
129
|
+
|
|
130
|
+
@classmethod
|
|
131
|
+
def from_entity(cls, entity: JobEntity, client: httpx.Client) -> Self:
|
|
132
|
+
instance = cls(client, entity)
|
|
133
|
+
|
|
134
|
+
Hco.check_classes(instance._entity.class_, ["Job"])
|
|
135
|
+
|
|
136
|
+
instance.self_link = JobLink.from_entity(
|
|
137
|
+
instance._client, instance._entity, Relations.SELF)
|
|
138
|
+
instance.parent_link = ParentJobLink.from_entity_optional(
|
|
139
|
+
instance._client, instance._entity, Relations.PARENT_JOB)
|
|
140
|
+
instance.selected_processing_step_link = ProcessingStepLink.from_entity_optional(
|
|
141
|
+
instance._client, instance._entity, Relations.SELECTED_PROCESSING_STEP)
|
|
142
|
+
|
|
143
|
+
# actions
|
|
144
|
+
instance.hide_action = JobHideAction.from_entity_optional(
|
|
145
|
+
client, instance._entity, "Hide")
|
|
146
|
+
instance.unhide_action = JobUnHideAction.from_entity_optional(
|
|
147
|
+
client, instance._entity, "UnHide")
|
|
148
|
+
instance.delete_action = JobDeleteAction.from_entity_optional(
|
|
149
|
+
client, instance._entity, "Delete")
|
|
150
|
+
instance.rename_action = JobRenameAction.from_entity_optional(
|
|
151
|
+
client, instance._entity, "Rename")
|
|
152
|
+
instance.select_processing_action = JobSelectProcessingAction.from_entity_optional(
|
|
153
|
+
client, instance._entity, "SelectProcessing")
|
|
154
|
+
instance.configure_processing_action = JobConfigureProcessingAction.from_entity_optional(
|
|
155
|
+
client, instance._entity, "ConfigureProcessing")
|
|
156
|
+
instance.start_processing_action = JobStartProcessingAction.from_entity_optional(
|
|
157
|
+
client, instance._entity, "StartProcessing")
|
|
158
|
+
instance.allow_output_data_deletion_action = JobAllowOutputDataDeletionAction.from_entity_optional(
|
|
159
|
+
client, instance._entity, "AllowOutputDataDeletion")
|
|
160
|
+
instance.disallow_output_data_deletion_action = JobDisAllowOutputDataDeletionAction.from_entity_optional(
|
|
161
|
+
client, instance._entity, "DisallowOutputDataDeletion")
|
|
162
|
+
instance.edit_tags_action = JobEditTagsAction.from_entity_optional(
|
|
163
|
+
client, instance._entity, "EditTags")
|
|
164
|
+
|
|
165
|
+
# entities
|
|
166
|
+
instance._extract_input_dataslots()
|
|
167
|
+
instance._extract_output_dataslots()
|
|
168
|
+
|
|
169
|
+
return instance
|
|
170
|
+
|
|
171
|
+
def _extract_input_dataslots(self):
|
|
172
|
+
self.input_dataslots = []
|
|
173
|
+
input_dataslots = self._entity.find_all_entities_with_relation(Relations.INPUT_DATASLOT, InputDataSlotEntity)
|
|
174
|
+
for input_dataslot in input_dataslots:
|
|
175
|
+
input_dataslot_hco: InputDataSlotHco = InputDataSlotHco.from_entity(input_dataslot, self._client)
|
|
176
|
+
self.input_dataslots.append(input_dataslot_hco)
|
|
177
|
+
|
|
178
|
+
def _extract_output_dataslots(self):
|
|
179
|
+
self.output_dataslots = []
|
|
180
|
+
output_dataslots = self._entity.find_all_entities_with_relation(Relations.OUTPUT_DATASLOT, OutputDataSlotEntity)
|
|
181
|
+
for output_dataslot in output_dataslots:
|
|
182
|
+
output_dataslot_hco: OutputDataSlotHco = OutputDataSlotHco.from_entity(output_dataslot, self._client)
|
|
183
|
+
self.output_dataslots.append(output_dataslot_hco)
|