Details
-
Sub-task
-
Status: Dismissed (View Workflow)
-
Minor
-
Resolution: Won't Fix
-
None
-
None
-
None
Description
Die Änderungen aus JS-602 sollten etwas eleganter gelöst werden.
Was fehlt, die Behandlung des end_state, wenn set_end_state gerufen wird. Folgende Änderungen sollten in Order.cxx vorgenommen werden:
Neu:
bool Order::end_state_reached2()
{
bool result = false;
if( Job_chain* job_chain = this->job_chain() )
{
if( Node* node = job_chain->node_from_state_or_null( _state ) )
else
result = true;
}
return result;
}
Änderung:
bool Order::end_state_reached()
{
bool result = false;
if( _end_state_reached ) result = true;
else
result = end_state_reached2();
return result;
}
Änderung:
void Order::set_state1( const State& order_state )
{
check_state( order_state );
if( _job_chain )
{
ptr<Order> hold_me = this;
State previous_state = _state;
Node* node = NULL;
if( !order_state.is_empty() )
{ node = _job_chain->referenced_node_from_state( order_state ); if( node != _job_chain->node_from_state( order_state ) ) _log->info( message_string( "SCHEDULER-859", node->order_state().as_string(), order_state ) ); }move_to_node( node );
if( previous_state != _state && end_state_reached2() )
{ handle_end_state(); } }
else
set_state2( order_state );
}
Änderung:
void Order::set_end_state( const State& end_state )
{
if( previous_state != _state) {
if( !end_state.is_null_or_empty_string() )
_end_state = end_state;
_order_xml_modified = true;
if(end_state_reached2() )
handle_end_state();
}
}
Änderung in spooler_command.cxx:
Statt:
if( order->finished() && !order->has_base_file() && !order->is_on_blacklist() )
else
{ order->db_update( Order::update_anyway, &ta ); }nur noch:
order->db_update( Order::update_anyway, &ta );