CA Service Management

  • 1.  Classic workflow Task Notification

    Broadcom Employee
    Posted May 10, 2016 02:25 AM

    HI ALL

    I want the notification when the classic workflow task will be transfer .

    I done the below customization but its attached the event but notification is not going.

    any suggestion.

     

    Mod File

    MODIFY wf assignee ON_POST_VAL chg_assg( ) 07 ;

     

     

     

    Spel File

     

    wf.assignee::chg_assg(...)
    {
    if(status!="WAIT" && !(is_null(assignee)))
    {
    object group_leader;
    object attached_events_table_record;

    send_wait(0, top_object(), "get_co_group");

    if (msg_error()) {
    logf(ERROR, "chg_assg error '%s'", msg[0]);
    return;
    }

    logf(SIGNIFICANT,"I am inside the notification procedure for chg workflow task assignee");

    //fetch the event details

    group_leader = msg[0];
    send_wait( 0, top_object(), "call_attr", "atev", "get_new_dob", NULL, NULL, group_leader);

    attached_events_table_record = msg[0];
    logf(SIGNIFICANT,"I am inside the notification procedure for chg workflow task assignee1");
    // Now we init the record.
    attached_events_table_record.obj_id = persistent_id;
    logf(SIGNIFICANT,"I am inside the notification procedure for chg workflow task assignee2");
    // attach wf event (multiple notification macro)
    attached_events_table_record.event_tmpl = "evt:400152";

    send_wait(0, group_leader, "checkin");
    logf(SIGNIFICANT,"I am inside the notification procedure for chg workflow task assignee3");
    if (msg_error()) {
       
      logf(ERROR, "chg_assg: Cannot create record in 'Attached_Events' table");
      }
    else {
      logf(SIGNIFICANT, "chg_assg:  'Event is attached to wf '%d' ", id);
         }
    }
    }

     

     

     

    LOGS

    05/09 16:13:34.41 SERVER      spelsrvr             2420 SIGNIFICANT  wf_trans.spl     15 I am inside the notification procedure for chg workflow task assignee

    05/09 16:13:34.42 SERVER      spelsrvr             2420 SIGNIFICANT  wf_trans.spl     23 I am inside the notification procedure for chg workflow task assignee1

    05/09 16:13:34.42 SERVER     spelsrvr             2420 SIGNIFICANT  wf_trans.spl     26 I am inside the notification procedure for chg workflow task assignee2

    05/09 16:13:34.45 SERVER     spelsrvr             2420 SIGNIFICANT  wf_trans.spl     31 I am inside the notification procedure for chg workflow task assignee3

    05/09 16:13:34.47 SERVER     spelsrvr             2420 SIGNIFICANT  wf_trans.spl     37 chg_assg:  'Event is attached to wf '400729'



  • 2.  Re: Classic workflow Task Notification

    Posted May 10, 2016 03:48 AM

    Hi,

    if you have successfuly attached event, but didn't received notification check events log then, menu could be found on workflow form > view > events log.

    If event flagged as complete, maybe it didn't matched condition or attached notification macro have invalid recipient?

    Regards,

    cdtj



  • 3.  Re: Classic workflow Task Notification

    Broadcom Employee
    Posted May 10, 2016 06:39 AM

    Hi

    See below pic where the event is completed and the users which I am using now they are able to receive others mails except the event one.

     



  • 4.  Re: Classic workflow Task Notification

    Posted May 10, 2016 08:58 AM

    it seems that problem is in Multiple Notification macro assigned to event.



  • 5.  Re: Classic workflow Task Notification

    Broadcom Employee
    Posted May 10, 2016 09:50 AM

    HI

    its not working for me so I do it with below code but I need the email body in htmpl format.

    any suggestion.

     

    wf.assignee::chg_assg(...)

    {

     

    if (status != "WAIT" && !(is_null(assignee)))

    {

    logf(SIGNIFICANT,"I am inside the notification procedure for chg workflow task assignee");

    string evt_mtitle, evt_mbody;

    // I need to send a mail to this respective Approver

    evt_mtitle = format("Your Action for WF Task %s is Required in CR # %s",task.sym,chg.chg_ref_num);

    evt_mbody += format("Hello,

     

    This is an Auto Notification from ITSS IT Service Desk informing you for performing %s for Change Request # %s.

     

    The details of the Change Request # %s are as follows:

     

    Requestor of the Call is: %s

    Call is being Co-ordinated by: %s

    Description of Call is: %s

     

    Best Regards,

    ITC Service Desk.",task.sym,chg.chg_ref_num,chg.chg_ref_num,chg.affected_contact.combo_name,c

    hg.group.last_name,chg.description);

    evt_mbody += format("\nTo see complete details of the call, please click on the link below:.\n");

    evt_mbody += format("=> %s\n\n",web_url);

    evt_mbody += format("NOTE: This is an Auto Generated Mail. Please Do Not Reply to this Mail.\n");

     

    int evt_level, trans_pt;

    evt_level = 3;

    trans_pt = 29;

    //Dont Change any thing below

     

     

    send(top_object(), "call_attr", "cnt", "notify_list",assignee.persistent_id, evt_level, evt_mtitle, evt_mbody, "", trans_pt);

    if (msg_error())

    {

    logf(ERROR,"ERROR in sending email to chg workflow task assignee. Contact Service Desk Administrator.");

    }

    }

    return;

    }



  • 6.  Re: Classic workflow Task Notification

    Posted May 10, 2016 09:57 AM

    attached events with multiple notification macro should work well...

    here is doc how to perform html notifications via SPEL: HTML Notifications in a context of custom object.

     

    Regards,

    cdtj