idmtools_platform_comps.comps_operations.workflow_item_operations module¶
-
class
idmtools_platform_comps.comps_operations.workflow_item_operations.
CompsPlatformWorkflowItemOperations
(platform: 'COMPSPlatform', platform_type: Type = <class 'COMPS.Data.WorkItem.WorkItem'>)¶ Bases:
idmtools.entities.iplatform_ops.iplatform_workflowitem_operations.IPlatformWorkflowItemOperations
-
platform
: COMPSPlatform¶
-
platform_type
¶ alias of
COMPS.Data.WorkItem.WorkItem
-
get
(workflow_item_id: uuid.UUID, columns: Optional[List[str]] = None, load_children: Optional[List[str]] = None, query_criteria: Optional[COMPS.Data.QueryCriteria.QueryCriteria] = None, **kwargs) → COMPS.Data.WorkItem.WorkItem¶ Get COMPSWorkItem
- Parameters
workflow_item_id – Item id
columns – Optional columns to load. Defaults to “id”, “name”, “state”
load_children – Optional list of COMPS Children objects to load. Defaults to “Tags”
query_criteria – Optional QueryCriteria
**kwargs –
- Returns
COMPSWorkItem
-
platform_create
(work_item: idmtools.entities.iworkflow_item.IWorkflowItem, **kwargs) → Tuple[Any]¶ Creates an workflow_item from an IDMTools work_item object
- Parameters
work_item – WorkflowItem to create
**kwargs – Optional arguments mainly for extensibility
- Returns
Created platform item and the UUID of said item
-
platform_run_item
(work_item: idmtools.entities.iworkflow_item.IWorkflowItem, **kwargs)¶ Start to rum COMPS WorkItem created from work_item :param work_item: workflow item
Returns: None
-
get_parent
(work_item: idmtools.entities.iworkflow_item.IWorkflowItem, **kwargs) → Any¶ Returns the parent of item. If the platform doesn’t support parents, you should throw a TopLevelItem error :param work_item: COMPS WorkItem :param **kwargs: Optional arguments mainly for extensibility
Returns: item parent
- Raise:
TopLevelItem
-
get_children
(work_item: idmtools.entities.iworkflow_item.IWorkflowItem, **kwargs) → List[Any]¶ Returns the children of an workflow_item object
- Parameters
work_item – WorkflowItem object
**kwargs – Optional arguments mainly for extensibility
- Returns
Children of work_item object
-
refresh_status
(workflow_item: idmtools.entities.iworkflow_item.IWorkflowItem, **kwargs)¶ Refresh status for workflow item :param work_item: Item to refresh status for
- Returns
None
-
send_assets
(workflow_item: idmtools.entities.iworkflow_item.IWorkflowItem, **kwargs)¶ Add asset as WorkItemFile :param workflow_item: workflow item
Returns: None
-
list_assets
(workflow_item: idmtools.entities.iworkflow_item.IWorkflowItem, **kwargs) → List[str]¶ Get list of asset files :param workflow_item: workflow item :param **kwargs: Optional arguments mainly for extensibility
Returns: list of assets associated with WorkItem
-
get_assets
(workflow_item: idmtools.entities.iworkflow_item.IWorkflowItem, files: List[str], **kwargs) → Dict[str, bytearray]¶ Retrieve files association with WorkItem :param workflow_item: workflow item :param files: list of file paths :param **kwargs: Optional arguments mainly for extensibility
Returns: dict with key/value: file_path/file_content
-
to_entity
(work_item: COMPS.Data.WorkItem.WorkItem, **kwargs) → idmtools.entities.iworkflow_item.IWorkflowItem¶ Converts the platform representation of workflow_item to idmtools representation
- Parameters
work_item – Platform workflow_item object
**kwargs – Optional arguments mainly for extensibility
- Returns
IDMTools workflow item
Get related WorkItems, Suites, Experiments, Simulations and AssetCollections :param item: workflow item :param relation_type: RelationType
Returns: Dict
-