0 Replies Latest reply on Oct 20, 2011 3:06 AM by Yves Blandin

    EPDM Task Instance in null in TaskLaunch process

    Yves Blandin

      Hi Everyone,

       

      I try to make a task addin for EPDM that displays a data card or a custom control to the user that triggers the task. Then I try to get the data entered into the task job.

      To do this, I have translated the sample code provided in EPDM API Help to C#.

      In the TaskLaunch process, the sample code states that we can implement a task instance object as follows (VB syntax) :

      Private Sub OnTaskLaunch(ByRef poCmd As EdmCmd, ByRef ppoData As System.Array)

      'Display a UI just because we can. Typically you would want to display a message box
        'Where the user enteres data that is passed to the task add-in via the props pointer.
        Dim v11 As IEdmVault11
        v11 = poCmd.mpoVault
        If v11.MsgBox(poCmd.mlParentWnd, "Hello!" + vbLf + "Are you sure you sure you want to launch the test task?", EdmMBoxType.EdmMbt_YesNo) <> EdmMBoxResult.EdmMbr_Yes Then
      poCmd.mbCancel = True
          Exit Sub
        End If

        'Get the property interface used to access the framework
        Dim inst As IEdmTaskInstance
        inst = poCmd.mpoExtra
        inst.SetValEx("MyLaunchVar", "A launch value")

      End Sub

       

      My problem is : in my C# code, I check the inst IEdmTaskInstance object and it is null. That means that I cannot get the entered data to use in the TaskRun process the way the sample intends to do it.

       

      Does someone succeeded in doing a task addin using such data card or custom control ?

       

      Thanks for advice or help.

      Yves BLANDIN

      CADWARE Systems (VAR for France)