CA Service Management

  • 1.  Classic Workflow  based on Property Selection

    Posted May 23, 2018 09:34 AM

    hello All,

     

    We have a scenario where I need write Request Workflow skip logic based on a selection from Request property list. We have few check box properties.

    If a particular check box property is selected, I need to skip the workflow. May I have some examples or guidance to achieve this?

     

    Thanks

    ArunavaS



  • 2.  Re: Classic Workflow  based on Property Selection
    Best Answer

    Posted May 23, 2018 10:07 AM

    Hi,

    have checked related threads?

    Action Macro to skip WF Task 

    Automatically completing workflow task 

    the only thing you need is to check for property before skipping task, here is code example for chg because i haven't env with cr wfs:

    // replace 123456 with your property template id
    // i'm not sure that value '1' is correct for checkbox property.
    send_wait(0, top_object(), "call_attr", "prp", "sync_fetch", "DYNAMIC", format("object_id = %d AND property = 123456 AND value = 1", chg.id), -1, 0);
    if (msg_error()) {
         logf(ERROR, "%s > sync_fetch failed", persistent_id);
    } else {
         if (msg[1] > 0) {
              logf(SIGNIFICANT, "%s > property found, skipping task", persistent_id);
              send_wait(0, this, "call_attr", "status", "set_val", "SKIP", "SURE_SET");
         }
    }

     

    Regards,

    Timur



  • 3.  Re: Classic Workflow  based on Property Selection

    Posted Jun 06, 2018 08:07 AM

    Thanks much cdtj . the solution you gave , perfectly fit in my scenario. Thumbs Up!!

     

    Thanks

    ArunavaS