Back to bricks list
Introduction
Technical Documentation
Other Classes
Process ProcessFactory
Version

ProcessFactory

Contains methods to instantiate TaskModel and ProtocolModel but it does not save the instances to the database, it only create th objects

Functions

CREATE_EMPTY_PROTOCOL_MODEL_FROM_CONFIG_DTO - @classmethod

Create a protocol model from a ProcessConfigDTO. The protocol is fully created from the dto and the process type is not used. It can create a protocol where the type does not exist in the system.

Warning, it does not initialize the graph.

Parameters:
NameTypeDefault valueDescription
protocol_config_dtoProcessConfigDTO
Return type:
ProtocolModel
CREATE_OUTPUT_TASK - @classmethod
Return type:
TaskModel
CREATE_PROCESS_MODEL_FROM_TYPE - @classmethod
Parameters:
NameTypeDefault valueDescription
process_typeType
config_paramsDict
instance_namestr
community_agent_version_idstr
Return type:
TaskModel
CREATE_PROCESS_MODEL_FROM_TYPING_NAME - @classmethod
Parameters:
NameTypeDefault valueDescription
typing_namestr
config_paramsDict
instance_namestr
Return type:
TaskModel
CREATE_PROTOCOL_EMPTY - @classmethod
Parameters:
NameTypeDefault valueDescription
instance_namestr
namestr
protocol_typeType <class 'gws_core.protocol.protocol.Protocol'>
Return type:
ProtocolModel
CREATE_PROTOCOL_MODEL_FROM_TYPE - @classmethod
Parameters:
NameTypeDefault valueDescription
protocol_typeType
config_paramsDict
instance_namestr
namestr
Return type:
ProtocolModel
CREATE_SOURCE - @classmethod
Parameters:
NameTypeDefault valueDescription
resouce_idstr
Return type:
TaskModel
CREATE_TASK_MODEL_FROM_CONFIG_DTO - @classmethod

Create a task model from a ProcessConfigDTO. The task is fully created from the dto and the process type is not used. It can create a task where the type does not exist in the system.

Parameters:
NameTypeDefault valueDescription
task_config_dtoProcessConfigDTO Object containing the task configuration
Return type:
TaskModel
CREATE_TASK_MODEL_FROM_TYPE - @classmethod

Create a task model from a task type. The specs are created from the task type.

:raises BadRequestException: description :raises BadRequestException: description

Parameters:
NameTypeDefault valueDescription
task_typeType _description_ [task]
config_paramsOptional _description_, defaults to none [configparamsdict], optional
instance_nameOptional _description_, defaults to none [str], optional
inputs_dtoOptional If provided, override the input spec of the task (useful for dynamic io), defaults to none [iodto], optional
outputs_dtoOptional If provided, override the output spec of the task (useful for dynamic io), defaults to none [iodto], optional
nameOptional _description_, defaults to none [str], optional
community_agent_version_idOptional _description_, defaults to none [str], optional
styleOptional _description_, defaults to none [typingstyle], optional
Return type:
TaskModel
CREATE_TASK_MODEL_FROM_TYPING_NAME - @classmethod
Parameters:
NameTypeDefault valueDescription
typing_namestr
config_paramsDict
instance_namestr
Return type:
TaskModel
CREATE_VIEWER - @classmethod
Parameters:
NameTypeDefault valueDescription
resource_typing_namestr
Return type:
TaskModel