Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Accessing attachments from Assignments page
Stepan_Bouda_(sbouda_-_(deleted))
Hi,I'm preparing module, which allows user to directly open an workflow attachment from within the Personal -> Assignments list via buttons.I've modified Browse list of Assignments so that there is a one more column with a button. Now I need to generate an appropriate link for the button's onSubmit or onClick event which would open the first attachment of the workflow. But I'm absolutelly confused of connection between workflow and its attachments...How could I get the list of attachments of one workflow by its ID?Any suggestions?Thank a lot.David
Find more posts tagged with
Comments
eLink User
Message from Nair, Krishnankutty via eLinkEvent scripts are a good way to understand livelink workflow and itsinternalsIf you have a program context this should give you the workflowdatastructure Object WSession = prgCtx.WSession() WAPIWORK work = WSession.AllocWork() WAPI.AccessWork(work,workID,subWorkID) RecArray array = $WFMain.WAPIPkg.LoadWorkData( prgCtx, work ) In this array you will find the attachments.This is form the ospaceWF Main:WF Root:CallBackEventScripts:GeneralCallBackScripts:SaveToOrig Object obj = $WFMain.WFPackageSubsystem.GetItemByName('DAPIAttachments' ) //RecArray array = $WFMain.WAPIPkg.LoadWorkData( prgCtx,work ) //we got that from earlier code retVal.OK = True if ( IsDefined( obj ) ) for r in array if ( { r.TYPE, r.SUBTYPE } == { obj.fType,obj.fSubType } ) found = True break end end if ( found ) attachFolder = DAPI.GetNodeByID( \ prgCtx.DapiSess(), \ DAPI.BY_DATAID, \ r.USERDATA, \ TRUE ) //This is a dapi node and all library functionsare possinble now//check documentation on GetNodeByID and see if you can get around ther.userdata part if ( !IsError( attachFolder ) ) //retVal = CopyToOrig( prgCtx,attachFolder ) else retVal.OK = False retVal.ApiError = attachFolder retVal.ErrMsg =[WFMain_ErrMsg.CouldNotLocateTheAttachmentsFolder] end end endDo whaver you need with its and then WAPI.FreeWork( work ) //reclaim memory-----Original Message-----From: eLink Discussion: Development Discussion[mailto:development@elinkkc.opentext.com] Sent: Tuesday, May 22, 2007 9:28 AMTo: eLink RecipientSubject: Accessing attachments from Assignments pageAccessing attachments from Assignments page Posted by Bouda, Stepan on05/22/2007 10:08 AMHi,I'm preparing module, which allows user to directly open an workflowattachment from within the Personal -> Assignments list via buttons.I've modified Browse list of Assignments so that there is a one morecolumn with a button. Now I need to generate an appropriate link for the button's onSubmit oronClick event which would open the first attachment of the workflow. ButI'm absolutelly confused of connection between workflow and itsattachments...How could I get the list of attachments of one workflow by its ID?Any suggestions?Thank a lot.David[To reply to this thread, use your normal E-mail reply function.]============================================================Discussion: Development Discussion
https://knowledge.opentext.com/knowledge/llisapi.dll/open/786303Livelink
Server:
https://knowledge.opentext.com/knowledge/llisapi.dllTo
Unsubscribe from this Discussion, send an e-mail tounsubscribe.development@elinkkc.opentext.com.-----------------------------------------*Please note my E-Mail Address has changed. Please update yourcontact list*Anadarko Confidentiality Notice: This electronic transmission and any attached documents or otherwritings are intended only for the person or entity to which it isaddressed and may contain information that is privileged,confidential or otherwise protected from disclosure. If you havereceived this communication in error, please immediately notifysender by return e-mail and destroy the communication. Anydisclosure, copying, distribution or the taking of any actionconcerning the contents of this communication or any attachments byanyone other than the named recipient is strictly prohibited.
Stepan_Bouda_(sbouda_-_(deleted))
Hi "eLink"thank you for your reply.I've finally used an existing WebWork:WorkRequestHandler:EditTaskHandler:FrameTaskRight Execute script and mined data from TaskData object.Best RegardsDavid