Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Obtaining Workflow Title in WF Event Script
Will_Harrington
I have recently completed writing my first workflow event script, but have hit a stumbling point on my final requirement.I have a General Event trigger that is called by the Workflow Initiation event that simply creates a new URL object with a fixed name, but users have requested the URL object be named using the initiated workflows title.A separate LAPI based application is responsible for initiating the workflow, and in the process gives each instance a unique title.I have looked through as much of the documentation, and inspected as many objects as I can, but I have not been able to locate the title of the initiated workflow.I cannot use the workflow title in the map details as the title is changed during initiation.The developer documentation suggests that the WAPIWORK object type exposes the pTITLE property, but when I try to inspect the WAPIWORK object inspect is not available, and addressing work.pTITLE causes a builder compile error.Inspecting the SUBWORK object has proved equally fruitless.Can anyone suggest an OScript solution to obtain the title of the executing workflow shortly after the workflow has been initiated?Regards Phil
Find more posts tagged with
Comments
eLink User
Message from Nair, Krishnankutty N. via eLinkI use a similar mechanism passing the workflow title to the forms itcarries.Providedyour event script is working you could try these.My eventscript is thefirst vent after the workflow is generated and I have a robot stepexecuting it.//*********************************************************//Function Dynamic ScriptName( \ Object prgCtx, \ WAPIWORK work, \ Integer workID, \ Integer subWorkID, \ Integer taskID, \ Integer returnSubWorkID, \ Integer returnTaskID, \ Dynamic extraData = Undefined ) Dynamic taskInfo Boolean retVal Boolean status //the task info dat structure contains the name //of the work flow in execution taskInfo = prgCtx.WSession().LoadTaskStatus( workID,subWorkID) if isUnDefined( taskInfo ) retVal = FALSE prgCtx.Wsession().fErrorMsg = "TASK INFO NOT FOUND.Arewe too early!!!" else//KNNair i omitted the function.Heres where I grab the title as //taskInfo[ 1 ].SUBWORK_TITLE status=._Pass_Title_To_Form(prgCtx,work,taskInfo) end ECHO (status) return(status ) end //********************************************//script endsInspect the taskInfo data structure after making sure the variables areall declaredbefore hand.If there are no subworkflows your workID and subworkID arethe same.Thanks MuchKrishnankutty N NairWork 918-661-5824 Fax:918-661-9206Learn more about EDMS powered by Livelink at
http://edms.conoco.net/edms.htm-----Original
Message-----From: eLink Discussion: Development Discussion[mailto:development@elinkkc.opentext.com] Sent: Monday, October 10, 2005 10:48 PMTo: eLink RecipientSubject: Obtaining Workflow Title in WF Event ScriptObtaining Workflow Title in WF Event ScriptPosted by Gately, Phil on 10/10/2005 11:46 PMI have recently completed writing my first workflow event script, buthave hit a stumbling point on my final requirement.I have a General Event trigger that is called by the Workflow Initiationevent that simply creates a new URL object with a fixed name, but usershave requested the URL object be named using the initiated workflowstitle.A separate LAPI based application is responsible for initiating theworkflow, and in the process gives each instance a unique title.I have looked through as much of the documentation, and inspected asmany objects as I can, but I have not been able to locate the title ofthe initiated workflow.I cannot use the workflow title in the map details as the title ischanged during initiation.The developer documentation suggests that the WAPIWORK object typeexposes the pTITLE property, but when I try to inspect the WAPIWORKobject inspect is not available, and addressing work.pTITLE causes abuilder compile error.Inspecting the SUBWORK object has proved equally fruitless.Can anyone suggest an OScript solution to obtain the title of theexecuting workflow shortly after the workflow has been initiated?Regards Phil[To reply to this thread, use your normal E-mail reply function.]============================================================Discussion: Development Discussion
https://knowledge.opentext.com/knowledge/livelink.exe/open/786303Livelink
Server:
https://knowledge.opentext.com/knowledge/livelink.exeTo
Unsubscribe from this Discussion, send an e-mail tounsubscribe.development@elinkkc.opentext.com.