CA Service Management

  • 1.  Should have a flag on detail_chg.htmpl vs workflow task

    Posted Sep 13, 2016 07:43 AM

    Hi,

     

    Can we setup a flag on detail_chg.htmpl page so that by seeing the flag analyst can come to know whether all workflow tasks are pending or completed?

     

    As of now when we are trying to close the change without seeing the workflow task it given message that uncompleted workflow tasks in this change order.

     

    is it possible to have a flag or something else on detail_chg.htmpl so that instead of going everytime on workflow tasks tab and see if all workflow task are completed with this flag or some other solution analyst can easily check that workflow tasks are pending or completed.



  • 2.  Re: Should have a flag on detail_chg.htmpl vs workflow task

    Posted Sep 13, 2016 07:56 AM

    Hi Subbarao,

     

    Can't be done with OOTB features. You would need some unsupported customization (probably involving spel-code and\or JavaScript) to do something like this.

     

    Kind Regards,

    Brian

     



  • 3.  Re: Should have a flag on detail_chg.htmpl vs workflow task

    Posted Sep 13, 2016 04:42 PM

    Hi,

     

    I'm thinking this can be done with the following method.  There might be a cleaner way to approach this, but this should work.

     

    • Add zWorkflowComplete integer column to chg
    • Create an action macro to update the new chg column
    • Attach the action macro to the last workflow task in each Change Category
    • Add zWorkflowComplete field to CHQ detail form.  It will show No until the last task is complete, then automatically change to Yes.

     

    Let me know if you'd like assistance implementing this method and I'll work on a more complete write-up.



  • 4.  Re: Should have a flag on detail_chg.htmpl vs workflow task

    Posted Sep 13, 2016 06:10 PM

    The other way around would be create QREL attribute on change order. For this you need

    1. create custom_wf.mod file in site/mods/majic with the following content:

     

    OBJECT chg {
        ATTRIBUTES Change_Request {
        zactive_workflow        QREL wf DYNAMIC {
     WHERE "chg = ? AND completion_date IS NULL" ;
     PARAM_NAMES { id } ;
     DOMSET wf_list ;
        } ;
     };
     };

     

    2. In detail_chg.htmpl after

    <PDM_MACRO name=dtlStart scroll=true>

    Add the following lines

    if ($args.zactive_workflow.length > 0 && "$prop.form_name_3" != "edit") {
     docWriteln('<table id="alertmsg" class="alertmsg" style="display: block;"><tbody><tr><td id="alertmsgText">This Change has $args.zactive_workflow.length uncompleted workflow task(s)</td></tr></tbody></table>');

    }

    3. Recycle SDM services

     

    The result should be similar to this picture



  • 5.  Re: Should have a flag on detail_chg.htmpl vs workflow task

    Posted Sep 13, 2016 07:36 PM

    This is great! Much simpler than my approach.



  • 6.  Re: Should have a flag on detail_chg.htmpl vs workflow task
    Best Answer

    Posted Sep 16, 2016 07:55 AM

    Thank you very much Gutis and Grant Bruneau..it really helped me a lot



  • 7.  Re: Should have a flag on detail_chg.htmpl vs workflow task

    Posted Sep 30, 2016 03:45 AM

    Gutis,

     

    can you help in creating the same for R/I/P too. I mean can we apply this solution on R/I/P too.

     

    I have created qrel table but when I am keeping code on detail_cr.htmpl file its throwing error. could you please help

     

    Below is the code I am using:

     

    1. create custom_wf.mod file in site/mods/majic with the following content:

     

    OBJECT cr {
        ATTRIBUTES Call_Req {
        zactive_workflow        QREL cr_wf DYNAMIC {
     WHERE "cr = ? AND completion_date IS NULL" ;
     PARAM_NAMES { id } ;
     DOMSET cr_wf_list ;
        } ;
     };
     };

     

    2. In detail_cr.htmpl i am keeping below code after

    <PDM_MACRO name=dtlStart scroll=true>

    Added the following lines

    if ($args.zactive_workflow.length > 0 && "$prop.form_name_3" != "edit") {
     docWriteln('<table id="alertmsg" class="alertmsg" style="display: block;"><tbody><tr><td id="alertmsgText">This Request has $args.zactive_workflow.length uncompleted workflow task(s)</td></tr></tbody></table>');

    }

    3. Recycled SDM services

     

    after recycling the services when I open detail_cr.htmpl page its stopong the services i.e, I am getting no response on this page.

     

    Could you please help to apply this solution on R/I/P too as Chg its working perfectly fine.



  • 8.  Re: Should have a flag on detail_chg.htmpl vs workflow task

    Posted Sep 30, 2016 07:56 AM

    cr_wf related with cr using persistent_id, so you should use persistent_id

     

    OBJECT cr {
        ATTRIBUTES Call_Req {
        zactive_workflow        QREL cr_wf DYNAMIC {
     WHERE "cr = ? AND completion_date IS NULL" ;
     PARAM_NAMES { persistent_id } ;
     DOMSET cr_wf_list ;
        } ;
     };
     };



  • 9.  Re: Should have a flag on detail_chg.htmpl vs workflow task

    Posted Oct 03, 2016 05:27 AM

    Gutis,

     

    I have modified to persistent_id after that I checked getting below error:

     

    domsrvr    7220  ERROR    qrel_attr.c     446  domset_by _key(cr_wf_list) returned NULL template

    domsrvr    7220  FATAL      qrel_attr.c   2248  No domset cr_wf_list for cr_wf QREL attribute zactive_workflow in cr_wf:FAC:NC:ATTR:OB:MTH:

    domsrvr    7220 ERROR    main.c            194 Domsrvr connection lost

     

     

     

    do we need to do something with DOMSET cr_wf_list; in code?

     

    please sugguest



  • 10.  Re: Should have a flag on detail_chg.htmpl vs workflow task

    Posted Oct 03, 2016 06:20 AM

    Gutis,

     

    I got the solution I was using  wrong DOMSET cr_wf_list ; but it should be wf_list which is corrected now.

     

    Below is the final one

     

    OBJECT cr {
        ATTRIBUTES Call_Req {
        zactive_workflow        QREL cr_wf DYNAMIC {
     WHERE "cr = ? AND completion_date IS NULL" ;
     PARAM_NAMES { persistent_id } ;
     DOMSET wf_list ;
        } ;
     };
     };

     

    Now its working fine for cr too.

     

    Thank you very much and tons of thanks for all your support. Have a nice day!!