mardi 3 février 2015

How to run step 2 instead or after step 1 (when step 1 does not meet condition)?


I have 2 steps and 2 rules (3 when counting in END rule, which was pointless to add):



DBMS_SCHEDULER.DEFINE_CHAIN_RULE (
chain_name => 'xaxa_c',
condition => 'TO_NUMBER(TO_CHAR(SYSDATE, ''HH24MI'')) >= 0001 AND TO_NUMBER(TO_CHAR(SYSDATE, ''HH24MI'')) <= 1000',
action => 'START xaxa_s',
rule_name => 'xaxa_r',
);

DBMS_SCHEDULER.DEFINE_CHAIN_RULE (
chain_name => 'xaxa_c',
condition => ':xaxa_s.state = ''COMPLETED''',
action => 'START xaxa_a_s',
rule_name => 'xaxa_a_r',
);


As You can see that first step is ran only on certain time. What I´m trying to do is running second step after first step or instead of first step (when it´s condition is FALSE). When checking documentation, I couldn´t see a way how to check if step has met condition.


Now my question is how to get around this without adding duplicating condition ("''COMPLETED'' OR TO_NUMBER(/**/)<= 0001" etc. condition for second step)?





Aucun commentaire:

Enregistrer un commentaire