Desktop productivity for business analysts and programmers

Error when creating stored process from custom task

Reply
Contributor
Posts: 37

Error when creating stored process from custom task

Hi,

I created a custom task whitch output data to a table in a library with LibraryName = MY_LIBRARY and LibRef = MY_LIB.

After I add the custom task to EG process flow, an error occurs when I try to 'Create Stored Process' either through task's right click menu or process flow's right click menu.

The error says, 'The library MY_LIB can not be found.'

In my task I implement the override methods OutputDataDescriptorList just like the 'Calculate Running Totals' sample code does.

(Using SAS.Shared.AddIns.SASTaskDataDescriptor.CreateLibrefDataDescriptor to create a Descriptor and add it to the return list.)

And if I set the same output to the built-in Rank task, no error occurs.

And if the library name is equal to libref, no error occurs.

Any idea about this error?

Exception Details: (Please ignore the Japanese character)
----------------------------------------
Exception type:  SAS.Shared.Exceptions.ObjectNotFoundException
Message:         サーバー SASApp の ライブラリ MY_LIB が見つかりません。
Source:          SAS.EG.SDS.Model
Target Site:     GetLibrary

Stack Trace:
   場所 SAS.EG.SDS.Model.Library.GetLibrary(String serverName, String libraryName)
   場所 SAS.EG.ProjectElements.SubmitableElement.get_ExpectedOutputDataAsSAP()
   場所 SAS.EG.ProjectElements.StoredProcessFromFlowGenerator.GenerateStoredProcessCode()
   場所 SAS.EG.MainForm.OnCreateStoredProcessEvent(Object sender, ProcessListEventArgs args)
   場所 SAS.EG.Controls.ProcessView.RaiseCreateStoredProcessEvent(IList`1 target)
   場所 System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   場所 System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   場所 System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   場所 System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   場所 System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   場所 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   場所 System.Windows.Forms.Control.WndProc(Message& m)
   場所 System.Windows.Forms.ToolStrip.WndProc(Message& m)
   場所 System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   場所 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Contributor tlk
Contributor
Posts: 55

Re: Error when creating stored process from custom task

Posted in reply to qicheng_shen_diva_co_jp

The stored process execute in another session, it's probably why it doesn't find your libref, so you have to code the libname in your stored process

Super User
Posts: 13,084

Re: Error when creating stored process from custom task

To expand: the library definition should have the information to identify the server as well as the path.

Contributor
Posts: 37

Re: Error when creating stored process from custom task

Thanks,

I understand that stored process run in another session but this error occured before the 'Create new stored process' wizard showing up.

With the same output data the built-in Rank task can be created from to a stored process successfully.

I guess the reason is the implementation of OutputDataDescriptorList, but I have no idea how to fix the problem.

Please help me.

Shen

Contributor
Posts: 37

Re: Error when creating stored process from custom task

I understand stored process run in another session, but the error occured during 'Create Stored Process', not running the stored process.

And the built-in task with the same output data can be created from to a stored process successfully.

The error can be reprodued by using the 'Calculate Running Totals' sample without making any change to it.

Shen

Ask a Question
Discussion stats
  • 4 replies
  • 386 views
  • 0 likes
  • 3 in conversation