Forum Discussion

EricM's avatar
EricM
New Contributor II
2 years ago

Data Management Jobs Description updated automatically ?

Hello,

Is it possible to modify datamanagement job description on the fly ?

We want adding more info for monitoring issues.

 

  • Hey Eric,

    I am not sure I am following your ask, Are you talking about the DM description on the DM itself or you talking about in the task activity while it is running? Can you give us an example of what you might be looking to add, just as a use case?

    Thanks,

    • EricM's avatar
      EricM
      New Contributor II

      Hi 

      In fact I've found a solution, using somthing from speciality Planning. It's somethin lke that

      Private Sub SetTaskDescription(ByVal si As SessionInfo, ByVal args As ExtenderArgs, ByVal sDesc As String )
      Try
       
      'Update the task activity description with the Workflow Information
      Dim wfDesc As String = BRApi.Workflow.General.GetWorkflowUnitClusterPkDescription(si, si.WorkflowClusterPk)
      Dim description As String = sDesc
      Dim dml As String = "UPDATE TaskActivity Set Description = '" & SqlStringHelper.EscapeSqlString(description) & "' Where (UniqueID = '" & args.TaskActivityID.ToString & "')"
      Using dbConnFW As DbConnInfo = BRApi.Database.CreateFrameworkDbConnInfo(si)
      BRApi.Database.ExecuteActionQuery(dbConnFW, dml, False, False)
      End Using
       
      Catch ex As Exception
      Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
      End Try
      End Sub