Topic
6 replies Latest Post - ‏2013-02-08T13:21:03Z by pdubovitsky
SystemAdmin
SystemAdmin
24948 Posts
ACCEPTED ANSWER

Pinned topic Execution of a hook failed during the action Modify...HUH?

‏2013-02-05T19:12:43Z |
I have one user only that occasionally gets the error message below, and I cannot place what or where it is. I am fairly new to CQ, and do not have a ton of troubleshooting experience.

The error is...

Error from RPC Server: Server error: Unexpected exception: CRMUD0082E Execution of a hook failed during the action Modify. It was the ACTION_INITIALIZATION hook attached to the Defect "72US0000xxxx". The reason for the failure was: Unkown exception.

I don't have the details as it has only happened 3 times to him, and he only notified me this last time. He stated when it does happen he cannot do anything in CQ for the rest of the day.

Anyone have any ideas? We have changed the schema in another area a few times as we are setting up for a new environment, but have not in the current environment.
Updated on 2013-02-08T13:21:03Z at 2013-02-08T13:21:03Z by pdubovitsky
  • pdubovitsky
    pdubovitsky
    374 Posts
    ACCEPTED ANSWER

    Re: Execution of a hook failed during the action Modify...HUH?

    ‏2013-02-07T03:03:04Z  in response to SystemAdmin
    Could you provide your action initialization hook code, please?

    Pavel
    • SystemAdmin
      SystemAdmin
      24948 Posts
      ACCEPTED ANSWER

      Re: Execution of a hook failed during the action Modify...HUH?

      ‏2013-02-07T15:29:38Z  in response to pdubovitsky
      I think this is the right code. It is the only one referring to action_initialization and was under "modify" where the error was.

      sub Defect_Validation {
      my($actionname, $actiontype) = @_;
      my $result;
      # $actionname as string scalar
      # $actiontype as long scalar
      # $result as string scalar
      # action is Init_Note_Entry
      # record type name is Defect
      # Start User Code
      # Return a non-empty string explaining why the action cannot commit
      # with its current values. If it is valid, return an empty string.
      # Example:
      # my $value_info = $entity->GetFieldValue("some field");
      # if (length($value_info->GetValue()) < 10) {
      # $result = "Must be at least 10 chars long";
      # }

      # Ensure that the log is updated correctly if we were editing multiple
      # records in batch mode (see RATLC00453464.)

      SetLog("Note_Entry", "Notes_Log");

      # End User Code
      return $result;
      }
      • SystemAdmin
        SystemAdmin
        24948 Posts
        ACCEPTED ANSWER

        Re: Execution of a hook failed during the action Modify...HUH?

        ‏2013-02-07T15:35:19Z  in response to SystemAdmin
        No, it wasn't the right code. I'm sorry Pavel. I got a line off. I guess I'm not sure where to find it as there is not an action_initialization script anywhere, including under modify. Any ideas?
        • pdubovitsky
          pdubovitsky
          374 Posts
          ACCEPTED ANSWER

          Re: Execution of a hook failed during the action Modify...HUH?

          ‏2013-02-07T20:51:12Z  in response to SystemAdmin
          There might be an initialization hook on base action type.

          Pavel
          • SystemAdmin
            SystemAdmin
            24948 Posts
            ACCEPTED ANSWER

            Re: Execution of a hook failed during the action Modify...HUH?

            ‏2013-02-07T22:05:40Z  in response to pdubovitsky
            Ah great! Thank you Pavel. Please see the script below.

            Sub Defect_Initialization(actionname, actiontype)
            ' actionname As String
            ' actiontype As Long
            ' action is ASCQIBase
            ' record type name is Defect
            ' Start User Code
            REM do any setup for the action here

            REM Stores in global variable called "CQIReqs", the list of Req Proxy DBIDs, the current CQ record is currently associated to
            REM Position state of state machine to "INIT"

            Dim a_CurrentActionType 'Action type of the action that initiated the execution of this script
            Dim ac_sCQReqListAttName 'Name of the global variable containing the name of the field of the CQ record that stores associations
            Dim ac_sCQIStateVar 'Name of the global variable containing the current state of the state machine
            Dim ac_sCQIListReqsVar 'Name of the global variable containing the list of Proxy Req DBIDs associated to the current CQ record
            Dim ac_sCQIdbidSeparator 'Character used to separate dbids in string list
            Dim a_bWeb 'Web or not
            Dim a_bIsRunningIntegration 'Contains a boolean indicating if the integration is already in progress, to prevent reccurence
            Dim a_oCQSession 'Current CQ session
            Dim a_sListDBIDs 'List of Req proxy DBIDs associated to the current CQ record
            Dim a_vTableDBIDs 'Table of Req proxy DBIDs associated to the current CQ record

            a_CurrentActionType = GetActionType()

            'Check to see if the real action is an import action or delete action.
            'If so exit.
            if a_CurrentActionType = AD_IMPORT or a_CurrentActionType = AD_DELETE then
            exit sub
            end if

            ac_sCQReqListAttName = "Requirements_List"
            ac_sCQIStateVar = "CQIState"
            ac_sCQIListReqsVar = "CQIReqs"
            ac_sCQIdbidSeparator = ","

            a_bWeb = Check_Web()
            'This script must no be launched through the web
            'We also test if the record is editable, it should be as we are in an initialization hook
            If (IsEditable AND NOT a_bWeb) Then
            a_bIsRunningIntegration = CQI_IsRunningIntegration()
            if not a_bIsRunningIntegration then
            Set a_oCQSession = GetSession
            if not a_oCQSession is nothing then
            'Systematically set Sate to INIT
            a_oCQSession.NameValue(ac_sCQIStateVar)= "INIT"
            'Get the list of DBIDs of the Req proxies associated to current CQ record
            a_vTableDBIDs = getfieldValue(ac_sCQReqListAttName).GetValueAsList
            if not IsEmpty(a_vTableDBIDs) then
            if CQI_GetListFromDBIDTable(a_vTableDBIDs, ac_sCQIdbidSeparator, a_sListDBIDs) then
            'Stores the list in global variable
            a_oCQSession.NameValue(ac_sCQIListReqsVar) = a_sListDBIDs
            end if
            end if 'a_vTableDBIDs
            end if 'a_oCQSession
            end if 'a_bIsRunningIntegration
            end if 'a_bWeb

            set a_oCQSession = nothing

            ' End User Code
            End Sub
            • pdubovitsky
              pdubovitsky
              374 Posts
              ACCEPTED ANSWER

              Re: Execution of a hook failed during the action Modify...HUH?

              ‏2013-02-08T13:21:03Z  in response to SystemAdmin
              This script is a part of RequisitePro package, and it is supported by IBM.
              I would suggest to open a PMR on this issue.

              Pavel