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
Oscript for auto-complete a workflow form step
Betsy_Kowan
Hi,Is there a way to use Oscript to configure a workflow Form step so that based on a Form field's value the step will be completed automatically by the system?Any help will be greatly appreciated.Thanks.
Find more posts tagged with
Comments
Greg_Griffiths_(ggriffiths_-_(deleted))
Probably the best way to do this is to create a Livelink Agent that will run on a schedule and check the properties of the form and if appropriate send on the workflow.
Betsy_Kowan
Hi Greg,Thanks for your reply. I have never created an agent before. What module is required? Is there any documentation on how to create an agent? Please let me know.Thanks.RegardsPeter
Bettina_Mastroianni
I couldn't find any documentation on that, but I suggest you keep looking on builder documentation and Knowledge centre.To create an agent I recommend you debug an existing one.To create a new one you'll have to orphanise:WebAdmin >> AdminIndexCallback object in order to create a section in the admin page to schedule your agent.LLAGENT >>LLAgents Objects >> Agents and then create a child that is your new agent.- Set .fEnabled = true- Set .fAgentID with a new agent id- Write the execute method performing the form auto-completion whenever certain conditions occur.-- Create a RH to initialise/update your agent schedule bit maskPS: In order to debug your agent along with all the others add a new entry in the opentext.ini file:RunWithoutLogin=TRUEsave and restart the builderrun ...?func=notify.runagentmake sure your schedule run times and dates include the current debug time. I just keep trying until I reach the breakpoint.Hope this helpsCheersBettina
John W. Simon, Jr.
high level...- orphan LLAGENT:LLAgent Objects:Agents into your workspace- set fenabled- set fagentid (choose an id that will not conflict with other agents)- override execute to do your bidding- run __Init()- build ospaces- stop/start builderThat will get you an agent. You will also have to insert a corresponding entry (for fagentid) into the AgentSchedule table that tells it when and how often to run.To test:- in the [options] section of the opentext.ini file add RunWithoutLogin=TRUE- change URL to ?func=agent.runagent to run all scheduled agents, or ?func=agent.runagent&agent_list={'####','####'} where the #### is replaced by the agentid you wish to run.
Donna Nalls
Hi Peter,I am reading the responses suggesting you use a Livelink Change Agent to complete the workflow step automatically - and that is certainly a good idea when appropriate....all of the advice you have received on creating an agent is excellent (as are those contributors).However, i am wondering why you would need to auto-complete a form step based on a form field value? If the value is already set before the form step is reached, couldn't you simply use an evaluate prior to the step and by-pass the step if the value indicates??? If the algorithm for determining the by-pass is more complex than an evaluate could handle, you might also consider an event script that processes just before the Evaluate step. The event script could contain the hard work of determining if the by-pass should occur and set a workflow attribute value (yes/no) to be used by the Evaluate step. Event Scripts are much easier to code than a change agent.Maybe i'm not understanding the situation completely - just trying to toss out some additional approaches to save you some coding (not that coding isn't a good thing).Whatever you decide...lots of good luck,Donna
Betsy_Kowan
Donna,The problem is that my workflow map has a lot of loopbacks and what I try to achieve is skipping a few steps based on a form field and the target step is within another loop path. I just can't add or change the route to get the routing I want.I would like to avoid any coding as much as I can but seems like I don't have any choice.Thanks.Peter