Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rename a WF instance from

Status
Not open for further replies.

leirehernandez

Programmer
Jan 29, 2010
25
ES
I have to create a function through Builder, to use it in workflow's even script for rename the workflow instance.

For this I need the Workflow instance ID, but i do not know how to obtain it, maybe wiht the prgCtx obj?

Any clue is welcome...

Thanks in advance!!
 
Suggest you learn livelink,builder and oscript properly.A general event script is a skeleton call that gives you everything you need.Look in this script for a fully functioning example WFMain:WF Root:Callback event scripts:General Callback Scripts:SaveToOrig that is a event script that you can attch to any valid workflow step
Code:
Function Assoc SaveToOrig( \
	Object		prgCtx, \
	WAPIWORK	work, \
	Integer		workID, \
	Integer		subWorkID, \
	Integer		taskID, \
	Integer		returnSubWorkID, \
	Integer		returnTaskID, \
	Dynamic		extraData = Undefined )


In this workID is the wf instance ID,subworkid is its instance id,taskid is the step that is calling the script.See its documentation object.



Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008
 
The online Builder help provides some examples of Workflow Event Scripts that you can use to build on to rename a Workflow name.

As AppNair says you should learn OScript properly as what you are trying to do is relatively simple once you've learnt OScript and the WF Event Scripts.

OT do run a course on WF Customisation -
Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
 
Thanks for the information.

I am aware of my ignorance about, but I have a very little time to do the above.


I have tried to do this:

taskSubsystem.fRegistry.WFTT_SubMapTask.fTaskName = 'Test change WF name'

But I always obtain error.


Sorry for the inconveniences and thank you again.
 
The method you should use is documented at /builder/documentation/packages/wapi.html#UpdateSubWorkAttribute() in the Builder On Line Help.

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
 
this thread where a oscript expert Donna Nalls points out your task in hand

Perhaps it may help.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top