TMACUL

CA SDM  Spell - Code example for set SLA looking for impact

Blog Post created by TMACUL Champion on Oct 15, 2015

mod file

MODIFY cr {

  POST_VALIDATE zPrioridade() 993 FILTER ( impact{} );

};

 

Spell file

cr::zPrioridade(...)

{

 

 

 

  //Declaracao de variaveis  //Declaracao de variaveis //Declaracao de variaveis

  string zStr_impact;

  //Declaracao de variaveis  //Declaracao de variaveis //Declaracao de variaveis

 

  //Atribuicao de Valores  //Atribuicao de Valores  //Atribuicao de Valores 

  zStr_impact = impact;

  //Atribuicao de Valores  //Atribuicao de Valores  //Atribuicao de Valores 

 

 

 

 

  // 5 = 1-

  if ( zStr_impact=="5" )

  {

       send_wait(0, this, "call_attr", "priority", "set_val", 5, "SURE_SET");

       logf(SIGNIFICANT, "MACUL MACAHD_OP01 Impacto 01 - Prioridade 01-enum5 - %s ", zStr_impact);

  }

     else

  {

       //4 =

       if ( zStr_impact=="4" )

       {

            send_wait(0, this, "call_attr", "priority", "set_val", 4, "SURE_SET");

            logf(SIGNIFICANT, "MACUL MACAHD_OP02 Impacto 02 Prioridade 02-enum4 %s ", zStr_impact);

       }

       else

       {

            //3 =

            if ( zStr_impact=="3" )

            {

                 send_wait(0, this, "call_attr", "priority", "set_val", 3, "SURE_SET");

                 logf(SIGNIFICANT, "MACUL MACAHD_OP03 Impacto 03 Prioridade 03-enum3 %s ", zStr_impact);

            }

            else

            {

                 //2

                 if ( zStr_impact=="2" )

                 {

                      send_wait(0, this, "call_attr", "priority", "set_val", 2, "SURE_SET");

                      logf(SIGNIFICANT, "MACUL MACAHD_OP04 Impacto 04 Prioridade 04-enum2 %s ", zStr_impact);

                 }

                 else

                 {

                      //1

                      if ( zStr_impact=="1" )

                      {

                           send_wait(0, this, "call_attr", "priority", "set_val", 1, "SURE_SET");

                           logf(SIGNIFICANT, "MACUL MACAHD_OP05 Impacto 05 Prioridade 05-enum1 %s ", zStr_impact);

                      }

                 }

            }

       }

  }

};

Outcomes