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
Sample code to initiate workflow
mriganka_majumdar_(geairc01user10_-_(deleted))
I am looking for sample to set title and attributes and initiate workflow using OScript. Also,similar code using xml interchange(livelink to livelink) would help
Find more posts tagged with
Comments
Donna Nalls
here is a little utility script that will initiate a workflow - you will pass in the wflow map id and the title for the instantiated wflow.sorry, don't have anything for the xml interchange.give my best to all at GEAE (Carol Finke and Sandy)Donna Nalls
Donna Nalls
oh sorry - you wanted attributes, too.here are three scripts that should get you close. init_wflow script will retrieve a list of all workflow attributes, then loop through to see if you have a corresponding input from record r. you may have to tweak this a little for your purposes.once again, my regards to the folks at GEAE!!!donna
mriganka_majumdar_(geairc01user10_-_(deleted))
You scripts are amazingly good and easy to use. I managed to create the workflows.But I want some clarification/help.I am calling the scripts from a Execute method of a LLRequestHandler child.I had initially kept your scripts under GeneralCallbackScripts and tried to call them as .InitWFlow(say) or $ModuleName.GeneralCallbackScripts.InitWFlow. But neither worked.Its either giving error message can call only script or external API OR non-existent feature specified...I therefore moved the functions within the Execute method itself and it worked.Can you throw some light on this? I have conveyed your greetings to Carol And Sandra.FYI,I am currently working with them and this requirement is for eSEC project.
Donna Nalls
Hi Mriganka --Thanks for your kind words and thanks for conveying greetings to Carol and Sandra!Here are some thoughts on why the code did not work in a GeneralCallbackScripts object:1) the initWFlow script has "." references to the other two methods, so they need to all be in the same object or you would have to modify those calls appropriately. But, it sounds like you did have all three scripts in the same object, so I don't think that is the problem.2) By default when you orphan a "GeneralCallbackScripts" object into your ospace, it can not be accessed using a global reference. So, $YOUROSPACE.GeneralCallbackScripts would return an error. If you want to access methods in your GeneralCallbackScripts object that way, you would have to right-click on that object and select "Add to Globals", then run your "Build OSpace" method to register that object reference (then stop/restart ll, of course). I usually don't add my GeneralCallbackScripts object to global references, as it is meant primarily to register Event Scripts for your instantiated workflows. If you are planning to call these scripts from methods other than your current request handler, you might want to create a utility object under your "Root" object....then add the utility object to your globals. i.e. if you create a child object under Root called "WFlowUtils" and add it to your globals you can then move those three scripts into that object and initiate the workflow by calling $YOUROSPACE.WFlowUtils.InitWFlow(...)Hope that helps.Take Care,Donna