CA Service Management

Expand all | Collapse all

Action macro is not getting triggered

  • 1.  Action macro is not getting triggered

    Posted Feb 07, 2018 07:14 AM

    Hi All, We have auto-approved task workflow for a category, though workflow is in approved state, action macro for change order status is not getting changed. i.e. action macro for change order status is not getting triggered. Can anybody please help on this.

    Also can anybody please tell me how to pass system date in soap ui?



  • 2.  Re: Action macro is not getting triggered

    Posted Feb 07, 2018 07:32 AM

    Hi Mandar,

     

    1. Is there a condition that must be met for the action macro to be triggered?

     

    2. Is the action macro part of the behaviors that is defined on a workflow task template which is linked to the category?

     

    ===

    Kind Regards,

    Brian



  • 3.  Re: Action macro is not getting triggered

    Posted Feb 08, 2018 01:18 AM

    yes, action macro is the part of behavior, attached on workflow task status. whenever workflow task status is in approved state, change order status should go in approvals completed state. 



  • 4.  Re: Action macro is not getting triggered

    Posted Feb 08, 2018 03:00 AM

    Hi Tim.

    It seems , that you are  working with cascading behvaiors.

    There might be a timing issue in this situation. Your second action macro might get executed, while the fist one isnt completed completely yet. If so , I would expect related error messages in your stdlog files.

    Please check and post, if found.

    And what exactly do you mean by:"earlier it works"? What has been changed inbetween?

    Regards

    ....Michael 



  • 5.  Re: Action macro is not getting triggered

    Posted Feb 09, 2018 05:11 AM

    Hi Michael,

    Here is the log found is:

     

    pdm_maileater_nxd 4236 TRACE pdm_maileater_nxd.c 1094 MailEater Stats: Msgs Received(0) Msgs Processed(0) Unknown Msgs(0) Attachments(0) Protocol Errors(0) Parse Errors(0) Tracing(0) domsrvr:02 4948 ERROR factory.c 6555 Cannot resolve multiple indirect references in chg.affected_contact.combo_name (factory wf) boplgin 3476 ERROR bplaccess.c 6174 register_session_user failed; cannnot find session with id 926723005 and userid superuser/cnt:32C8B0DC3B96F74C9FFD647B51CFA01E domsrvr 5020 ERROR sec_mgr.c 4656 Error in DomSession 926723005 in method session_registered: 10 register_session_user failed; cannnot find session with id 926723005 and userid superuser/cnt:32C8B0DC3B96F74C9FFD647B51CFA01E domsrvr 5020 ERROR domset.c 13483 P_List_dob_by_helper got 10 register_session_user failed; cannnot find session with id 926723005 and userid superuser/cnt:32C8B0DC3B96F74C9FFD647B51CFA01E attempting to get chgstat:40020 spelsrvr 3836 ERROR pcexec.c 6403 Spell interp failed at wf.spl:1299:wf::postci_do_task_behavior: Missing object to send to domsrvr 5020 ERROR domset.c 13483 P_List_dob_by_helper got 10 register_session_user failed; cannnot find session with id 926723005 and userid superuser/cnt:32C8B0DC3B96F74C9FFD647B51CFA01E attempting to get tskstat:7106 spelsrvr 3836 ERROR alg.spl 992 Error in lookup_assoc: 10 register_session_user failed; cannnot find session with id 926723005 and userid superuser/cnt:32C8B0DC3B96F74C9FFD647B51CFA01E domsrvr 5020 ERROR factory.c 7267 Error at dob_from_rlist in at_by_key: 1 10 register_session_user failed; cannnot find session with id 926723005 and userid superuser/cnt:32C8B0DC3B96F74C9FFD647B51CFA01E spelsrvr 3836 ERROR pcexec.c 6457 Spell interp failed at act_type_assoc::lookup_assoc (...) alg.spl:995: Math argument type mismatch domsrvr 5020 ERROR sec_mgr.c 4027 Unable to find DomSession 926723005 used by user superuser/cnt:32C8B0DC3B96F74C9FFD647B51CFA01E invoked by domsrvr with reply method



  • 6.  Re: Action macro is not getting triggered

    Broadcom Employee
    Posted Feb 09, 2018 02:38 PM

    Hey Mandar,


    Can you clarify the release of SDM / patch levels in question here?

     

    Thank you

    _R



  • 7.  Re: Action macro is not getting triggered

    Posted Feb 12, 2018 03:36 AM

    Hi Mandar,

     

    Please also attach screen prints showing the action macro in question and how it is linked in the behaviors of the category in question.

     

    ===

    Kind Regards,

    Brian



  • 8.  Re: Action macro is not getting triggered

    Posted Feb 19, 2018 05:20 AM

    Hi Raghu,

     

    its 'hmp-140' ,



  • 9.  Re: Action macro is not getting triggered

    Posted Feb 19, 2018 05:21 AM

    'hmp-140' , i guess it means CP3



  • 10.  Re: Action macro is not getting triggered

    Broadcom Employee
    Posted Feb 07, 2018 05:28 PM

    Mandar, can you explain in detail how the approval of a chg task triggers the chg action macro? If you used "Behavior", the action macro would be on the workflow task not on the change order. Maybe a couple of screenshots help here? Thanks _Chi



  • 11.  Re: Action macro is not getting triggered

    Posted Feb 08, 2018 01:16 AM

    Yes , we used on "Behavior",  detailed flow will be like this, 

    once ticket raised it is in 'pending' state, on this pending behavior action macro is attached like, whenever ticket workflow in pending state, it gets auto-approved by using action macro on it.

    Now on second behaviour 'Approve', action macro is like chg status should be 'approvals completed' and should get assigned to group.

    Earlier it was working finely, but now many times it fails to trigger action macro, in result some change order shows status as pending and does not get assigned to group.



  • 12.  Re: Action macro is not getting triggered

    Posted Feb 19, 2018 05:30 AM

    Can you post the source of your action macro (or macros), please, and a screen shot of the 'behavior' details?  Include the source of the condition macro, if any.  As I read it, you have two macros firing from 'behaviors', one on Pending and the second on Approved?  We will need the details of the macros that are fired for both.

    Thanks,

    James



  • 13.  Re: Action macro is not getting triggered

    Posted Feb 19, 2018 05:49 AM

    Hi James,

     

    This is the screen shot of macro code on 'Pending' behaviour of change order workflow

    These are 2 action macros on 'Approved' behaviour of change order workflow

    code for 'Set chg status to appcomp' 

     

    // set chg status to appcomp

     

    chg.status = 'appcomp';

     

    code for 'Set group'

     

    // set group to server1

     

    chg.group = chg.category.group;

     

     







  • 14.  Re: Action macro is not getting triggered

    Posted Feb 20, 2018 10:39 AM

    I still think it's just a timing issue. I tried to reproduce your behavior on my testbox, but wasn't successful.

     

    Question: is at least one of the approved behavior macros executed? That means, is either the change status set to appcomp , or the change group is set to the one of the category ?

    Suggestion:

    instead using two separate macros , combine them into one.

     

    Are other Tasks following this approval task, which gets started when the first is approved?

    Regards

    ............Michael



  • 15.  Re: Action macro is not getting triggered

    Posted Feb 20, 2018 10:45 AM

    Another question,

    as your macros would like to change something, do they all have their lock flag set?

     



  • 16.  Re: Action macro is not getting triggered

    Posted Feb 20, 2018 09:36 PM

    I agree with Michael - it's likely to be a timing / locking issue.  I saw a similar thing happen at a client site some years back.  Updating the 'chg' object from a 'wf' object may work in a quiet test environment, but in a production environment you are more likely to hit locks, which your current macros do not handle.  I suggest you use the out-of-box Change Workflow Task macro 'Set CAB Approval Yes' as a model for your macro, which will help you to get the locking right.  And instead of assigning directly to the chg 'group' and 'status' attributes, consider calling the functions 'transfer' and 'change_ticket_status' which are used in the out-of-box Change Order macros 'CHG Transfer to Event Group' and 'Set CHG Status=OPEN'.  Finally, it's always worth logging some tracing messages from a macro with the 'logf' function, at least while you're in code & test mode, to give you some indication of what's going on.

     

    Regards,

    James



  • 17.  Re: Action macro is not getting triggered

    Posted Feb 07, 2018 08:29 PM

    On your second question - passing system date to SoapUI - you might find something useful here:

     

    https://www.ibm.com/developerworks/community/blogs/Dougclectica/entry/SoapUI_scripting_today_s_date?lang=en

     

    or here:

     

    https://www.soapui.org/docs/data-driven-tests/datagen-teststep.html

     

    Regards,

    James