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
LAPI Initiate Form based Workflow with VB -- Its like poking an angry badger with a parrot
Steve_Powell_(bupauser1_-_(deleted))
Hi allHaving been on the LAPI course, and struggled with the code for a while I'm posting this.I've run into something of a problem. I suspect The LAPI documentation is incorrect and though I've searched the knowledge net all the relevant posts seem to be pretty old and none of them offer an actual solution, they are just variants of the same problem.I've obviously started with the LapiDemo code as a base and have been developing in VB to see if we can get it to work before proceeding any further. Java is an option though not one we are exploring at the moment.We normally configure our workflows to use a Form as an initiator on the start step with no display prompt. So we can point our users at a form that they fill in and submit which starts a new workflow.Anyway the problem is that we call LoadMap which seems to work fine. We can access various things, edit attributes and so on. But we can't find the form. Or at least we can't access anything that looks like a form.We load the map and cycle through the three things in the WorkPackage, the first is a subtype 1 (the attachments), the second is a subtype 3 (the category attributes), the third is a subtype 4 (the forms), we get back the UserData which returns a list of 1 item which (according to the docs) is supposed to have three things in it : FormName, templateID and DisplayType.And that's where it all falls off the end of the page. The assocwe get back has either 8 or 9 things in it.8 if we use SQL to store our data, 9 if we store the data in LiveLink. The first item (Data) is the one that vanishes if we use SQL to store the data and all the other items shuffle down one.We can get the names for the various things and the types and lengths and can get values out of them some of the time (we've been poking the code with a sharp stick and it sometimes bites back) these seem to beIndex Name type0 Data Undefined1 ID Integer2 Name String3 StorageMech Integer4 Subforms List5 SubFormTemplateIDs List6 TemplateID Integer7 Version Boolean8 View String (ref to the name of the VIEW we attached to the start step)We are trying to write something which will allow us to release data from Ascent/KOFAX to start Workflows off. We don't want to use Categories or Attributes but form fields. That way users can edit the data at subsequent steps and we can re-use the map for manually triggered workflows.We want to access the form fields and populate them with values. But the LAPI docs are obviously, how shall I put this? Well, errr! A bit **** really. Certainly not very good given how much money they cost.The other problem is that we are planning on storing the data in a database not internally in LiveLink and the fact the Data field doesn't appear when we do this worries me. I've looked briefly at the Forms API but am unsure of how this would integrate into the solution we are looking at. Where do I get the form ID form is a good starting point.I'm enclosing the code from LapiDemo as we've amended it to see if there's anything massively obviously wrong.If anyone has any suggestions then I'm all ears.many thanksStevePS I really liked the solution posted here on the same subject, some time back, that suggested poking the DB directly. Cos that's a sane thing to do. Yep, all the signs of a well polished product there.
Find more posts tagged with
Comments
There are no comments yet