CA Service Management

  • 1.  request ticket - insert and delete WorkFlowTask

    Posted Dec 15, 2015 09:26 AM

    Hi all,

    do you have any experience to manage classic workflow tasks via web services for request ticket?  I'm not able to get it work. I've tried to used deleteWorkFlowTask and insertWorkFlowTask method but it seem that these are working only with change ticket.

    Regards,

    Milan



  • 2.  Re: request ticket - insert and delete WorkFlowTask
    Best Answer

    Posted Dec 15, 2015 09:52 AM

    hi,

    you can use common method - createObject,

    be sure to define all requreid attributes.

    Regards,

    cdtj



  • 3.  Re: request ticket - insert and delete WorkFlowTask

    Posted Dec 15, 2015 11:05 AM

    Hi cdtj,

    it took some time but finally I'm able to create workflow task using createObject method. It seems there is no general wsdl method that allows to delete any objects and deleteWorkFlowTask method not works for cr_wf objects. I've opened case on CA Support.

    Thank you for advice,

    Milan



  • 4.  Re: request ticket - insert and delete WorkFlowTask

    Posted Dec 15, 2015 05:17 PM

    Hello, i did some digging and found that when you use this WS method on cr workflow it gives an error:

    Spell interp failed at api.spl:1898:api::delete_workflow: get_attr on iss failed: AHD03066:Unknown name iss

     

    This error means that spel method api:delete_workflow that is defined in api.maj file is failing. So since we know hows to run spel codes that are defined in api.maj i decided to run it from spel script:

    void wftest()
    {
    uuid who; 
    send_wait(0,top_object(), "call_attr", "cnt", "current_user_id");  
    who=msg[0];
    send_wait(0, top_object(), "call_attr", "api", "delete_workflow", "cr_wf:400251", "cr:402266");
    if (!msg_error()) {  
    printf("Error %s",msg[0]);
    }
    

     

    In log i got the same error:

    Spell interp failed at api.spl:1898:api::delete_workflow: get_attr on iss failed: AHD03066:Unknown name iss

     

    The conclusion is that when CA introduced classical workflow on requests they forgot to update spel api methods that are related to workflows and are loca in cmpcd.spl. Since those methods are used by WS, cals are failing. This is obvious bug that needs to be adressed by support.



  • 5.  Re: request ticket - insert and delete WorkFlowTask

    Posted Dec 16, 2015 01:38 AM

    I think that API method called delete_wc  via callServerMethod could be run in this situation.

    As I found it correctly deletes wftpl objects with all assigned behaviours to it,

    so there is a chance that workflow tasks can be deleted correctly.