Code Demonstration Pages

Mostly this will consist of CWS or SOAP samples.My setup is against a CS16 computer with OTDS but when I test I make sure I can login as ‘Admin’.For ease I write this using the Visual Studio C# express.Note Java WSAPI clients has differing Syntax,my blog has some hints but for the most part it will be adaptable.Note programmers who work in this are encoraged to understand flow of your code into the livelink server see my posts on a proper way to interpret errors you are getting in your program.when time permits I will post a a flow diagram.

What is CWS ?   How do you DEBUG ?  How to look at a SOAP Envelope?
You just have to get the shell from OT for starting java dev. Java data structures are less forgiving in their get/sets than C# as well. Common misconceptions like to write java client livelink has to run in tomcat all that is not true,the server part of livelink can be anything and the webservices hosted either way and you can write .net clients and java clients

A few years back the OT community had a lot of programmers and they all contributed widely to communities.opentext.com .Very thoughtless of OT one fine morning they shutdown the site.Most of the code I wrote for public consumption I had in my personal workspace or google drive.This time I am just going to put them in my google drive.You just have to requests me to see it.Note I will not entertain any requests for obtaining software or consultation.I do this pro bono so I don’t lose touch.

How to Rename Nodes in C# Link Request by 
Workflow Service Example Link Request by
Categories/Attributes manipulation in C# Link Request by
Beginners parsing example to Categories/Attributes C# Link Request by
How do you manipulate Multi Valued Attributes( MVA) Java Snippet Link

 

Answering for a KB thread 
Beginners Adding a Version to a Existing File JAVA Link Answering for a KB thread
How to set Mandatory Attributes in a move

(No Not as simple as it sounds:)

Link Answering for a KB thread 
A C# example that shows SET parsing and MVA’s Link Answering for a KB thread 

Why Oscript solutions are not passé

Over the years in my work with OpenText Livelink I am fortunate to associate myself with like minds and who like me share their code,goodwill and advice selflessly .I cherish and hold their friendship above all professional accolades I have ever got.Recently I had lunch with Ossie Moore  Ossie’s LinkedIn it was very short and I would have loved it to last longer as we could talk shop endlessly.Most of what I write in this has bearing to our lunch and he did steer this post. Ossie  for people who do not know him is quite a character.Let’s say you had a requirement,most of us would probably settle for a pretty decent code either in oscript,lapi as that was the predominant development methods one had at the time.Not Ossie he would probably write our kind of code and before releasing it would have at least two more better implementations,he would have thought about the user coming through the web,the other interfaces LL explorer and so on.That is the difference.

Let’s look at ECM deployments in major organizations.

X Organization has identified a massive unstructured data problem.X has a new manager on the block who has had experience with a technology vendor.Insert <vendorname> here. This is how most ECM deployments happen a lot of people passionate in some technology who would solutionize the deployment to suit the vendor.Most of them are assisted by Gartner, Forrester those kinds .I started working in OT technology before these rating companies came up with a barometer of wants so I am going to continue with my cynicism.

So after X Organization will roll out a OOB approach ,people are brought in.Naturally if the product is user friendly and easy its use will grow.Simple things like user activity,data growth etc are good ways to identify its usefulness.Now most people would want to send the link of the objects hoping that it won’t break on re-organizing the structure or re parenting as most of document work revolves around.So you may want to invest on something that people have put thought on like a GUID based system(Livelink, DCTM).Frankly I know only Livelink and DCTM very little. I hate Sharepoint (we call it $carepoint) with a passion because the smallest of things are so difficult to get  done.Good UI all the world has gone for it anything complex you have to buy or build with an array of .net developers different frameworks the works.It also could be that I have only been programming in that and spending time in LL so over the years the idiosyncracies of builder,CSIDE none of these matter to me now because Oscript really has not changed every much.Oscript is just a huge possibilities language. One of my mentors very famous in OT circles John Simon would joke like this.You have a problem you try solving in Oscript.You will spend about 3 to 4 days on it later to find out that what you need is totally available,no need to kludge just poor documentation that is all.

So if you were eager to get into using livelink to its full extent do these things

  1. Challenge a OT person or a OT solution marketer to what they are offering you. Challenge them extremely hard if it is offered at $$$ a user or so.That is how they make their money on licenses.
  2. Challenge if the pitch is towards Oscript is bad that spoils your chances of upgrade.There’s an element of truth in that.I have seen people hacking their way into core code,weblingo such no nos that shows inexperience and desperation. Oscript is not understanding the creation of a request handler,webnodeaction or eventscripting it is an all round knowledge of the product the passion about the product.You can immediately tell if the programmer knows anything because if they start saying about new subtypes you may want to ask them what prompted them to create a subtype, because many times those people have access to the oscript tutorials and the “Hello World” of oscript introduces them to that.You really want a Oscripter who will follow what OT advises them of doing in that case it is very rarely  a bad fit.
  3. Challenge if the pitched solution ends up working only in the webgui what about EC,what about SOAP,what about REST,what about Search

Oscript has years to go if the LL solution is still being used by customers.It can be learned to work wonders for you.The other aspect and full credit to Ossie here is LL software is the most open product much more open than opensource a oscripter can see the entire internals of it so people like me,John,Ossie all have found bugs and we all engage the good OT developers on our finds.Most senior and passionate oscripters continue to do so.There ‘s so much openness and welcoming in the OT programming community,people like David Templeton ,Kyle  Swidrowich and a countless amount of good people who have been striving to keep this open and getting communities to try it out for a better product.They have helped me and a lot of others and you can also get in into the action.

You just need the drive and passion to master LL that is all it takes.Well that maybe true for any technology 🙂

General Help Series 4- Workflow Maps/Instances

Livelink Workflows for the impatient

Livelink comes up with a extremely powerful Workflow Engine .At the minimum if you have only installed Livelink OOB you get a decent workflow features.This involves a “business user” to design a logical map that may involve “players” or “roles”.The only criterion is the process needs to be repeatable or it can be plotted in visio or such like.Note Livelink WF came before the wf consortium came up with open standards but it will have almost everything one sees in the standard.

Some key terms-

  1. A WF Map.This is a dtree object identified by a dataid
  2. WF Manager-By default the person who created the original map.Best practices dictate that you assign a proper livelink group as the ‘Master Manager‘.Not to be confused as the livelink team’s manager or a organizational manager.In theory this manager can re-assign steps and repaint the map.One of the few places where the sysadmin profile or the ‘admin’ user won’t cut it so due diligence thinking that at some point a higher up user may be asked to assist.Please do not run maps with <Initiator /> as the Master Manager.It is quite possible these users know only to click and when something breaks nobody can intervene.You can make them do only the “See Details” which is more than enough in many cases.
  3. WF Instance- The process logic that is set in motion when a WF Map is set in motion a.k.a initiated .This is easily identifiable by a clickable link in the WF managers assignments and it will show in GREEN the step and useful info.
  4. Steps-The series of steps that can be assigned to processes and users.This is what apparently the business user can be trained to paint..there are a myriad of steps that OT puts on the palette.
  5. Role Based or Map Based-If you create a map OOB then livelink gives you a map where the forward steps can be done by business programming,like if WF attribute is green then my user is this group.If you change the map to “ROLE” based before initiation the Initiator will have to fill all the people in the workflow.People who use the Transmittals product of livelink can see this in action very clearly.
  6. Attachments Volume- By default the attachments package is permissioned Full Control to “Public Access” very bad idea as when a casual user does search he will see unwanted or secretive results..Always put a good permission bit there.If you do not give participants Add Items up to Delete in that volume you will get crude messages from livelink . Note that the Truth Table implementation is observed by livelink on any kind of Object Creation so to get around problems in workflow OT assigns default full control to PA. Just observe what OT gives and change that to a good group and add all the people in the workflow to that group.
  7. WF Attributes– Helper attributes modelled after category metadata .It allows the business user to route the map.
  8. Forms-Optional Package see NEXT post.
  9. Loop Back– Be extremely careful about this as you can create a infinite wf instance.
  10. Item Reference– You can point to existing object subtypes in livelink like folders /documents etc so in conjunction with Item Handlers you can perform “auto magic”

It is quite possible that a good business user or a livelink user can be trained over a day to understand the process flow/swim lanes.I usually design my maps on a paper.I have a cheat sheet of sorts I maintain and many of the things in this article is based on that. Always check “Verify Map Definition” to understand any problems this may have.

The Item Handler is a predictive step modeled by some placeholder logic( Design Book 3) although which it appear useful it could look frustrating as very little process automation can be done just by it.The workarounds or “auto magic”  is usually a human at a prior step.If you use it with XML WF Extensions a lot of “auto magic” can be done with it.

The “XML WF EXtensions”  is a optional module that   uses the capability of livelink objects to have a XML representation(everybody probably has heard of XML Export/XML Import)

the XML WF Ext uses XML representations of livelink objects and manipulation of those objects by a SAX(or DOM not sure I know LL has both in it ) parser. Usually people get bitten by load balancers and file system permissions.

Like wise -XML Work Flow Interchange.Can send /call Web Services of other systems.

ESign – A specialized workflow that can do electronic signatures prevalent in 21 CFR11 operations.

Perfectly suited for livelink organizations who will not invest in Oscript coding /scared by OT sales/marketing in not writing Oscript understanding of this remarkable product.It was very expensive when I started livelink programming so it is a personal bias as well since I like to look at the map and many times I can get a 1-1 representation to the process.

OT Workflow Design 1 and Design 2 is a must read if you are doing anything with workflows.it also has decent interface methods for web services  as well

Java Samples for Content Webservices

 
I LOST ALL CONTENT WHICH WAS STORED IN COMMUNITIES.OPENTEXT.COM.IF YOU ARE A STARTER READING THIS AND WOULD LIKE TO SEE THE ORIGINAL CONTENT DEPENDING ON TIME I HAVE I CAN SEND YOU SNIPPETS.LEAVE A COMMENT TO SUCH EFFECT.

Java Samples for Content Webservices are few and far in between.OT mainly puts samples in C# and many  a times I myself wonder if my company did not allow me to do that how I would do that in Java.In all truth OT ships a massive application called TreeView.java and TreeView.s ln for both languages .But the java thing takes a lot of setup especially if one was not keeping active in that world.However I used the NetBeansIDE to actually do most of that so I use that debugging environment to try all my java stuff Recently I debugged how to run a Live Report in livelink via C# webservices.Then somebody wanted me to show them how to do it via Java.One of these days I want to return to seeing if I can do all this command line with nothing else other than notepad.

Well I created two word documents, my guess is the poster did not speak english  very well,did not know livelink nor did know java to start with  .Hence I dumbed it enough for people to follow in almost any criteria.

 

Having livelink and its builder helps me in my endeavours and so Oscript remains my first love although I am getting farther and farther from it all

 

I have these files in the Communities website

If I had a LR taking a string parameter  how to write that in Java(C# is available aplenty)

If I had a LR taking a integer parameter how to write that in Java(C#is available aplenty)

There is a bug with Live Report Extensions.A poster in KB said that OT is aware of it.

Why Having LR Extensions(something that Webreports) company produces breaks Livereport calling with Webservices of OT

 

 

LAPI when your sole requirement is to mess with Records Management or Physical Objects Management

****************************************** ***START UPDATE 10/3/2016*****************

LAPI and its client installer has become very hard to find. Moreover clients written in LAPI  in say Java/.NET will only work if your Livelink a.k.a Content Server is of version less than CS16.Readers who are new to LL programming is encouraged to read this to the approach and not to the exact lines of the code.What I mean is when you used to program in LAPI you were basically passing parameters to discrete calls by modelling it based on the webgui of livelink .SOAP based webservices called CWS is also the same,so if you do not try to do the task in the webgui and try to understand the business rules you will almost have no success in CWS too. OT is notorious for not putting fully functioning use cases and a walk through,so whenever possible I write code assuming the user has not worked in Livelink for X number of years and try to educate you all. Livelink,Content Server,Enterprise Server all of this has been Livelink’s marketing brand name changes over the years.CS i sused in many of the integrations like AGA, XECM, RMLINK  and you know you are programming against livelink if you see a link that looks like this  http(s)://somefriendlyURL/livelink.exe|cs.exe|llisapi.dll|cs.dll|livelink.In many places SAP/ SP /Exchange will be configured to talk to Archive Server and then they will use Livelink to read into archive server and turn that into LL objects for better presentment/RM and other aspects. The AGA product is moving away from LAPI(not sure totally or not) to REST API in LL.

**********************************************END UPDATE****************************

 

LAPI is not dead it seems.Recently some posters wanted to do something with LAPI and especially with Physical Objects Management.The RM & PO modules are very great functional mods very easily installed and configured and works for almost any condition.Excellent design thoughts by OT(or is it iRIMS). The Web services bandwagon has not exactly swept in with the folks it seems.In any case for the old timers here is the cheat sheet

LAPI you are old need 32 bit computer also VJ redistributable on the livelink server if you are on LL9.7.1 or down

win7 64 bit computer livelink server if you are on CS10 or up but a downgraded .net framework

No installer is made for CS10 so I would just go to any old lapi project and put them in a .NET project which is less than 3.5 CLR

The programmer gets into a very simple document add or folder add routine so he /she has the bearings of how to work against livelink and LAPI if you have not messed with LAPI before do not think you can code in RM/PO LAPI API’s

Here’s the Rub.The RM/PO API is written to look like it is its own product in fact it is not.They are just interface files which the programmers can add to their project and nicely hidden in the server install modules.So if LAPI was given to you as a client installer the RM & PO API is sitting inside the SDK folder of the livelink server.I have many times had need to do this in java and C# so without prejudice this  how I do those tasks.Java is a little more complicated as I am not a full time java programmer or for that matter a C# programmer

https://communities.opentext.com/communities/cs.dll?func=ll&objId=8552848&objAction=download

If you had a IIS server serving your livelink things basically it takes less than 30 mins to create an application to expose DM services,PO services and RM services so if you are in a org that likes to be modern by all means do that approach

Intelligent people on the Sharepoint side have built and safeguarded their investments by creating their own API’s revolving around LAPI(the AGA framework) so I am thinking that LAPI has not been axed and retired.

BTW the ObjectImporter product plus its add on called OI for RM will allow you to bulk add PO and RM info much easier and much less to program than the lapi or webservices approach

How to use WCF Livelink web services to create a quasi single sign on or login with cookie equivalent of lapi

Recently OT Dev said that don’t really spend time on the Search SOAP service but use the Restful search API that has been there all along these years.

Since almost everything in livelink is served off a URL one of the first things it needs is authentication.For livelink deployments who do not have Single Sign On based on web server auth it is inconvenient that a webapp designed in C# provides links to a livelink URL for e.g I may have an href called “My Assignments” and then I may link it to my livelink server url and the query string ending in personal .assignments

I really don’t think organizations using livelink still use userid/password but this will probably help those users.

http:://my livelinkurl/livelinkvd/llisapi.dll?func=personal.assignments

Now everybody reading this should know that livelink will look for a cookie if not it will present a login screen. Our attempt is to use the token (cookie) returned to us by the CWS auth routine and make sure we can pass it off to a livelink URL or making the request to livelink as if one had logged in and subsequently performing operations.

In my example I am doing this with a LL 9.7.1 version so the ref key word is not used.For newer CWS the ref keyword is needed

SETUP

LL9.7.1 Oracle,IIS6, webserver is anonymous,livelink auth scheme is livelink ,No RCS present,No Dir Svcs module in deployment

in SSO deployments calling a livelink URL from a auth user’s computer results in a pass thru experience so none of this circus is needed anyway.

What I found was if you were adding the LlCookie to the request you have to do a lot of coding as in the user in this thread.I found several hits in the web

to spoof the Cookie but a lot of code for somethingthat you know is not that secure anyway

RE RE RE RE RE Get Region Name

He first gets the auth token and uses cookie setting code to call the search API.

While that is all good and dandy  if you have access to  a web debugging tool like Fiddler if you capture traffic for the first auth call you can see your userid+password

if it is a HTTP connection.I am not sure what it will look if my livelink was HTTPS.So I would just build a userid/password url and specify everything in NextURL.

So if I was coding a C# app and wanted to call my search system in livelink I would just use the simple approach

http://llappu971vm:8080/livelink/livelink.exe?func=ll.login&username=livelinkuser&password=livelinkpassword&nextURL=%2Flivelink%2Flivelink.exe%3Ffunc=ll%26objId=670175%26objAction=browse%26viewType=1

In the above URL the Func=ll.login sets the Cookie and then the NextURL is indicated,it is just webescaped for transmission

Link to Creating RESTful web services in livelink

This is a very good article very insightful for people like me who don’t really  understand hyped up words  in use.

http://ednortonengineeringsociety.blogspot.com/2009/08/creating-restful-web-services-with.html

People at OT has said that their plan is to support web services ,oscript and RESTful

So I am going to try and see if I can make some good easy to use things.Looks easier than CWS to me

I know my oscript so the rest is basically some crafted query strings .I s that what Rest is ?

BTW this is free publicity to the original blogger.If I should not be posting links let me know I will remove it.

HTTPS with Webservices in Livelink

Contrary to stuff that I do this post is basically something I hacked together to make it work.I must have received at least 50 emails for several web services questions.In the absence of OT providing good easy to understand hand holding examples I offer these.If OT ‘s thinking is basically to code a web service a developer needs to take paid training all those things have come to pass.Almost every programming language snippets are available and so there is an expectation that the Vendor provides proper code samples.What I think they should start putting quality samples like what Jason is attempting &  conducting webinars .They could do several official things such as how to code when RCS is present, what is the difference between Enterprise Library Services & Livelink web services,How does the new OTDS come into authenticationg into livelink,What one should do and not do,many things the livelink programming community needs help on.This in my mind will ensure a good talent pool of programmers out there who would do things as OT intends to.

I naturally like to understand what I am doing unfortunately in this installment I have resorted to mostly ‘trial & error’

HTTPS and Livelink Web Services code

As we learned on our SSO attempt and livelink web services this time we start with this

Part 1

  1. Make VM IPv4 and disable IPv6 it should work for IPv6 provided you do the stuff in my previous blog.
  2. Make sure the IIS7 livelink webserver is functioning fine
  3. Make sure anonymous(livelink) authentication is fine  i.e.’ we can login as the powerful ‘Admin’ and the right password.
  4. Now with our baseline favorite Kyle Swidrowich’s piece of code start making it work without https
  5. We then make IIS HTTPS. Note you cannot make a webserver https commercially without shelling some money.HTTPS needs a certifying authority. For purposes of demonstration I will be using Microsoft’s self-signing certificate. Self-signing certificates are the same secure protocol other than the fact that a commercial company will not stand by it. Products such as archive server uses self-signing certs and OT bundles a signer program so I have used it many times to create closed loops between SAP ,livelink and archive server. For the completely uninitiated a secure transmission means only with the private key can you decipher the communication between the browser and the application so snooping with fiddler/wire shark etc. will give you a lot of garbled messages.
  6. So we manage to login as HTTP on that livelink

Again VC#, At this point this looks promising, Now add quickly DocumentManagemnt.svc and ContentService.svc as well Try Kyle’s code and make it work for HTTPS .Perfect everything works we added the document

Part 2

Making IIS HTTPS

I used this site and followed that

see how simple it was for me a non MS/IIS person to figure this out that is what we sadly lack with OT.

BTW word press cannot do embedded images from my word document.I have the word document replete with screen caps in communities.

And this Now for good measure we need to remove http

If you remember a posting I made and Guy Pomerleaux commented if you have http and https running and OT web services code  is accessed you don’t really know you are talking https unless you do this. To keep it simple my livelink is now HTTPs Web GUI or web services. Perhaps if you leave a http listening port this would make your coding easier, but since I am doubtful which protocol will be used I resort to this.My builder program reports HTTPS=on that tells me everything is SSL.

We say yes to the IE warning and proceed to our newly created Livelink website which is now on HTTPS

We have cert errors even after we import the cert to keep IE happy

But I guess it will complain until I paid VeriSign or Thawte some money Perhaps readers can pool some money and buy me a certificate J for all practical purposes I am https

When I try to change my web service references we get this

I say yes

I got this and plenty of yellow looking errors at the livelink web services server when I tried to call the web service. Too many to list and too unknowing to comment on the mumbo jumbo.Essentially at this point I am trying on the server to get this service created.

https://appuw2k8vm/les-services/Authentication.svc

Several errors ensued which I basically got around by removing all traces of places I thought was written for HTTP stuff.

So I remembered form my 9.7.1 that there is some SSL binding stuff we have to do on the web services on the server. So we make a copy of the Web.Config and try it.

Mostly if you remove everything that did not contain SSL and enable the SSL stuff it should work.

Also could not establish trust relationship means you have to install the certificate into the trusted certificate store

A working Web.Config you can find a working app.config you can also find. I am not able to explain the mumbo jumbo as it is mostly trial and error. I hope if any OT knowledgeable people read this they would conduct a webinar on how to do this.

Link 1 The above article replete with screen caps as a word doc

Link 2 The Web.Config that goes on the web services install that works for me 

Link 3 The App.Config from my C# application