CA Service Management

  • 1.  Action Macro In Classic WF To Alter CO Status - 12.6

    Posted Nov 07, 2013 06:28 PM

    We are using SDM 12.6 and the classic workflow for Change Order tickets. I want the status on the Change Order ticket to automatically change when the status on a Worklow Task changes. Clicking on a status within a Workflow Task allows you to select the option "Update Actions on True" and select an Action Macro that is of the Workflow Task object type.

    There is no Action Macro available to alter the Change Order Status.

    I have never created an Action Macro, can anyone assist me with creating one that will modify the Change Order status?

    From what I have read I need to intially extract a Workflow Task Action Macro to base my macro on. By running this command:

    pdm_extract -f "SELECT del,fragment,lock_object,ob_type,sym,type FROM Spell_Macro WHERE sym = 'MACRO NAME'" > FILENAME.txt

    Then set a new sym name and enter my desired code within the fragment section and load.

    Any ideas out there?

    Cheers
    Stuart



  • 2.  RE: Action Macro In Classic WF To Alter CO Status - 12.6

    Posted Nov 07, 2013 11:38 PM

    Hi Stuart,

    You're right. There is no option to update the Action Macro via GUI. Action Macro must be extracted using pdm_extract, update the code and then load it again. However, am not sure about the code to change the status of a change order. If anyone is aware of the code, please reply to this thread.

    Thanks,
    Naveen



  • 3.  RE: Action Macro In Classic WF To Alter CO Status - 12.6
    Best Answer

    Posted Nov 08, 2013 08:20 AM

    I created an Action Macro to change the status of a CO following the completion of a classic workflow task.  As suggested earlier, you will need to extract one from the spell_macro table and import it back in, but here is the code I ionserted to perform the CO status change:

     

    object chg_dob;
    send_wait(0, this, "call_attr", "chg", "get_dob");
    if (msg_error())
    {
    logf(ERROR, format("unable to retrieve change order associated to wf"));
    return;
    }
    chg_dob= msg[0];
    if(!is_null(chg_dob))
    {
    send_wait(0, top_object(), "get_co_group");
    if (msg_error())
    {
    logf(ERROR, "get_group_leader () failed: %s", msg[0]);
    return;
    }
    chg_dob.status="IMPL";
    }

     

    Hope this works for you.

     

    Tom

     

     



  • 4.  RE: Action Macro In Classic WF To Alter CO Status - 12.6

    Posted Nov 10, 2013 05:51 PM

    Cheers Tom !