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)
CSIDE and OScript
Setting an attribute form a GeneralCallback Script
Steven_Tate__(stephentate_-_(deleted))
Does anyone have a sample script that updates an attribute on the fly. We need to track the current user of a step so that an XML Data INterchange step can be assigned to that person dynamically at runtime rather than defining that information at design time.I realize I have to read through the attribute definition to find the ID of the attribute and then find that ID in the attribute values but when I update the value using SetWorkDataPackage I end up corrupting the package so later accesses to the data fail.Any help is appreciatedSteve Tate
Find more posts tagged with
Comments
Donna Nalls
Hi Steven,Here is the Utility Script that i use for setting workflow attribute values.Best,Donna
eLink User
Message from Nair, Krishnankutty via eLinkI am guessing you are meaning a workflow attribute and not a categoryattributeHere's an almost generic event script I developed to dothat.(it has been almost two years since I touched that piece so all duediligence in testing is warranted) You basically call the script from anevent script passing the prgCtx and work package along with first paramis the name of the workflow attribute and second param is whatever valueyou needed it to have.Do any validation prior to calling the Script retVal=._UpdateMyWorkFlowAttribute(Object prgCtx,WAPIWORKwork,'WorkFlowDueDate','Proper Date Value') //retVal=._UpdateMyWorkFlowAttribute(prgCtx,work,"Tony","Norman") I have not tried this with a userid for that the correct method may be aPerformerCallBack script,I would suggest You test this script and see if it suits the purpose or at least getsome ideas from it.-----Original Message-----From: eLink Discussion: Livelink Builder Discussion[mailto:componentbuilder@elinkkc.opentext.com] Sent: Friday, October 20, 2006 5:47 AMTo: eLink RecipientSubject: Setting an attribute form a GeneralCallback ScriptSetting an attribute form a GeneralCallback Script Posted by Tate ,Steven on 10/20/2006 06:44 AMDoes anyone have a sample script that updates an attribute on the fly.We need to track the current user of a step so that an XML DataINterchange step can be assigned to that person dynamically at runtimerather than defining that information at design time.I realize I have to read through the attribute definition to find the IDof the attribute and then find that ID in the attribute values but whenI update the value using SetWorkDataPackage I end up corrupting thepackage so later accesses to the data fail.Any help is appreciatedSteve Tate[To reply to this thread, use your normal E-mail reply function.]============================================================Discussion: Livelink Builder Discussion
https://knowledge.opentext.com/knowledge/llisapi.dll/open/765419Livelink
Server:
https://knowledge.opentext.com/knowledge/llisapi.dllTo
Unsubscribe from this Discussion, send an e-mail tounsubscribe.componentbuilder@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.
Donna Nalls
Hi Steven,Sorry - i just proofed that script and found an error....try the attached....Donna
Steven_Tate__(stephentate_-_(deleted))
Thank you
Steven_Tate__(stephentate_-_(deleted))
I used your code as a start point for what I needed to do. I now have the code running in a test Workmap and the targte attribute is being updated.Again many Thanks.
Steven_Tate__(stephentate_-_(deleted))
I ended up using Donna's routine as a basis for the one I ended up writing.