ethos_penalps.process_node_communicator#
Module Contents#
Classes#
A OutputBranch is based on an output_stream_state. The purpose of a production branch is |
|
Attributes#
- ethos_penalps.process_node_communicator.logger#
- class ethos_penalps.process_node_communicator.ProcessNodeCommunicator(production_plan: ethos_penalps.production_plan.ProductionPlan, process_state_handler: ethos_penalps.process_state_handler.ProcessStateHandler)#
A OutputBranch is based on an output_stream_state. The purpose of a production branch is to keep track at what time which kind of inputs are required to provide the output stream which is requested by this Production Branch. It should also check for coherence with possible previous production Branches.
The core functionality of the branch is to call the generation of the respective input stream state. When the node operation comes from a downstream node the method
- check_if_temporal_branches_are_fulfilled()#
- check_if_stream_branch_is_fulfilled() bool#
- check_if_production_branch_is_fulfilled()#
- complete_stream_branch()#
- complete_temporal_branch()#
- complete_output_branch()#
- process_downstream_adaption_order(downstream_adaption_operation: ethos_penalps.node_operations.DownstreamAdaptionOrder, next_node_name: str, starting_node_name: str) ethos_penalps.node_operations.UpstreamAdaptionOrder#
This method is called when the upstream node requires an adaption of this node. The current temporal branch is reset and the process states are set to harmonize the input and output stream state. After successful harmonization an UpstreamAdaptionOrder is created.
- Parameters:
downstream_adaption_operation (DownstreamAdaptionOrder) – The DownstreamAdaptionOrder contains information about a possible input stream state. This order is created when the input stream state requested in a UpstreamNewProductionOrder can not provided by the upstream order.
next_node_name (str) – Name of the upstream node. It is required to create the next UpstreamAdaptionOrder
starting_node_name (str) – Name of the current node.
- Returns:
_description_
- Return type:
- process_downstream_validation_operation(downstream_validation_operation: ethos_penalps.node_operations.DownstreamValidationOrder, upstream_node_name: str, downstream_node_name: str) ethos_penalps.node_operations.DownstreamValidationOrder | ethos_penalps.node_operations.UpstreamNewProductionOrder#
Validates that the required input for the current temporal branch can be provided
- Parameters:
downstream_validation_operation (DownstreamValidationOrder) – _description_
- validate_stream_branch()#
- process_upstream_new_production_operation(starting_node_name: str, upstream_node_name: str, downstream_node_name: str, upstream_production_order: ethos_penalps.node_operations.UpstreamNewProductionOrder) ethos_penalps.node_operations.UpstreamNewProductionOrder | ethos_penalps.node_operations.DownstreamAdaptionOrder#
Determines if the current node can provide the requested output stream. If the required state can be provided the required input is requested by a new UpstreamNewProductionOrder. If the requested state can not be provided an adaption of the output stream is requested by the creation of a UpstreamNewProductionOrder. Initializes the production branch.
- Parameters:
starting_node_name (str) – The name of the current node to which this branch belongs.
upstream_node_name (str) – _description_
downstream_node_name (str) – _description_
upstream_production_order (UpstreamNewProductionOrder) – _description_
- Raises:
Exception – _description_
- Returns:
_description_
- Return type:
- process_upstream_adaption_operation(starting_node_name: str, upstream_node_name: str, upstream_adaption_operation: ethos_penalps.node_operations.UpstreamAdaptionOrder) ethos_penalps.node_operations.UpstreamNewProductionOrder | ethos_penalps.node_operations.DownstreamValidationOrder#
Determines the required input stream to an output stream which has been adapted before.
- Parameters:
starting_node_name (str) – _description_
upstream_node_name (str) – _description_
upstream_adaption_operation (UpstreamAdaptionOrder) – _description_
- Returns:
_description_
- Return type:
- create_downstream_adaption_order(starting_node_name: str, down_stream_node_name: str, upstream_production_order: ethos_penalps.node_operations.UpstreamNewProductionOrder) ethos_penalps.node_operations.DownstreamAdaptionOrder#
Creates a DownStreamAdaptionOrder based on the new output_stream_state
- Parameters:
starting_node_name (str) – _description_
down_stream_node_name (str) – _description_
current_temporal_branch (TemporalBranch) – _description_
upstream_production_order (UpstreamNewProductionOrder) – _description_
- Returns:
_description_
- Return type:
- create_next_upstream_production_order(next_node_name: str, starting_node_name: str, input_upstream_production_order: ethos_penalps.node_operations.UpstreamNewProductionOrder) ethos_penalps.node_operations.UpstreamNewProductionOrder#
- store_branch_to_production_plan()#
- fulfill_stream_branch(next_node_name: str, starting_node_name: str, downstream_validation_operation: ethos_penalps.node_operations.DownstreamValidationOrder) ethos_penalps.node_operations.UpstreamNewProductionOrder#
- create_downstream_validation_order(downstream_node_name: str, starting_node_name: str, input_production_order: ethos_penalps.node_operations.UpstreamNewProductionOrder | ethos_penalps.node_operations.DownstreamValidationOrder) ethos_penalps.node_operations.DownstreamValidationOrder#
- class ethos_penalps.process_node_communicator.EmptyProductionBranch#