Copy This To That

Recently I saw a post in OT Forum that caught my eye https://forums.opentext.com/forums/discussion/comment/935976#Comment_935976 What prompted me to write this is because the OT experts also advised using some other mechanisms (XML WF Extensions and use of WR). Now, normally I like to code as well as any other user in Livelink a.k.a Content Server so why this post is because I remember when OT announced the Item Handler and Item Reference(yes they are different) several years ago I believe when Tammy Jakubowski(now GCI) was the WF Product Manager at OpenText.It was downright confusing but did it work in complicated situation boy it did. So I also asked the same questions why would you need WF Attributes and Form attributes in the workflow because they both do the same thing. But this user kept telling me that Business Workspaces apparently has a WF Step that creates BWS’s and it would only work with WF Attributes and they didn’t want their users to see the WF Interface





I replied with a simple OOB implementation where I used a simple throwaway hardcoded documents inside my WF Attachments map and using two Item Handlers Copied what a user entered in a Form Value to a Category to the throwaway Object and using a second step copied that Category Values onto a WF Attribute.

I later explained to the user in a series of simple screencaps how one would do this as that user needed hand-holding and I find the OT Online Documentation horrendously confusing 🙂 https://knowledge.opentext.com/knowledge/cs.dll?func=ll&objId=77363139&objAction=browse

Advertisement

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

Oscript what is it what and would I use it?

Oscript is  a 4GL that is the basis of the application that the OpenText company adopted when they chose to market Livelink the Document Management System.It is safe to say that anything  the Livelink product lacks and  is a valid requirement can be coded in this language.The power of the the Oscript language takes root in the philosophy that was prevalent in the 60’s . Oscript is a superior offering to traditional OOP languages such as Java or C++ that is what Pundits say.

To a trained Oscripter one is able to understand how livelink code is received as well as change it.Now change to any COTS product comes at a cost.That is where the strategy as well as overall grasp in the product comes into mind.If the organization has decided for itself that it will spend the big bucks on livelink, one approach is to identify the ways to use it more.Where the organization is going to make mistakes is when it sees the cost of the “customization”.Many decision makers wrongly decide to go after fly by night programmers/vendors to be totally left in the fray.OT has a professional vested interest to sell customers more code and services so I have been in decisions where sales and marketing  will say do not customize livelink, but that is only half truth in them.If you buy these OT customizations, they are almost certain to be written in Oscript .In many cases it would have been written by senior Oscripters with thought on maintenance aspects  and upgrade ability as well.The same kind of service can be bought by other Oscript houses,in many cases these are extremely talented ex OT ‘ers. Many of the Professional Services modules sometimes outgrows the intents and becomes a marketable module as well.I have no knowledge and am just speculating on that.Once you have identified and  decided to use livelink the best avenue is to hire or ask services of reputed vendors.Modules that contained Oscript code that I used to code in 1999 (first time was on a livelink 8 system) livelink 9.1 version I can almost compile in the modern 10.5 version.My entire career was  and is fruitful because I tried to interact/collaborate and share with the OT team in the KB as well as smaller websites like Greg Griffiths.I was also able to mentor myself amongst very die hard oscripters that I knew from work and just by tracing code to find bugs that needed closure before OT could provide fixes.The knowledge of OT code also allows me to become a better application architect,administrator and integrator.

If the organization is strong in Java and .Net skills then note that the user interface at this time cannot be changed using those languages,however you may use exposed API’s to make functioning applications that use Livelink as the data store

Typical things organizations can and should do.

  1. Create implementations of Nodes just like Folder or Document if there is a need for it to be there.Just because OT shows you a “Addressbook” or “Contacts” module not every livelink installation in the world needs new subtypes.It is there if you want to use it ,if there is a complex business requirement that involves a “document” like implementation or a “folder” like implementation.Do search in the KB for such terms as “invasive customizations”, overrides,orphans,subclasses, customizationsRT, weblingo customization.
  2. Add Commands in the Nodes these are basically very easy to do in a short order.These two are taught very nicely in class as well.
  3. Put a lot of functioning logic into workflows also heard as event scripting.
  4. Write code so that livelink can interact with other systemslike using the POJO object.
  5. Write agents,distributed agents,expose to columns and facets api something that OT does not give you OOB.
  6. Extending SOAP and REST can only be done using Oscript.If you are a shop who has a need to program a integration using java or C# and you see a “GAP” in existing offering it is rather easy for a Oscripter to extend that.

Opentext Programmers have black boxed thing so that many things acts as internal API’s.For e.g we are able to do work without understanding how the “Node” itself is created in livelink. Other examples are the way Oscript can talk to the search system.

Not many people know that livelink uses a api to search.

Out of the world Oscript Offerings.

Christopher Meyer a Long OT veteran his website . It is un believable stuff that I have seen.

Patrick Vitali the maker of AnswerModules

IDE’s one can use

CSIDE a eclipse jar file for versions CS10.5

Livelink Builder CS10 and Versions prior.

Workflow Service Example to get a Attachment ID

****************************************** ***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****************************

 

 

 

A fellow poster in KB is asking for help with Workflow Service examples. KB

Again my guess is the programmer does not no enough about how livelink handles workflow data structures so hopefully my article does some help. A frustrated developer in this case because there ain’t official samples from OpenText will start to trash the product which I hate to be happening. OT is busy with Core and Appworks(nothing was said about this at conference so is it already dead?) it seems and to this day I cannot understand why OT responses to WebReports is such a high pleasurable experience whereas everything else is basically a lukewarm thing.

I needed to brush my new java skills so I downloaded java samples from KB and started looking at it. It looks to me there is a lot of setup one does with java in C# alsl one does is type a little bit of code….Anyway the poster was using System.out so I am guessing he was a java programmer.There might be several better ways to do it but what I did was convert my old C# code to do that

which was here https://communities.opentext.com/communities/cs.dll?func=ll&objId=10153785&objAction=download&viewType=1.The site is free to the public.

 

  1. Workflows are Churned by a map created in livelink See Pic of the new 10.5 Map wf
  2. When you Click Initiate a WF Record is inserted with a pair of dataids called WorkID, SubWorkID in most simple workflows they are the same when you or livelink creates subworkflows they differ.
  3. By programming all you are doing is making sure you can get to the running instance and look at its internals
  4. It never seldom one changes the logic of map with CWS or LAPI programming.
  5. The livelink workflow carries several packages of the workflow,when you say you want Attachments you get a Container much like a folder to put documents,if you say Attributes you get that,if you put a Form template you get that and so on and so forthwf
  6. The above map is reproduced faithfully in a table that is how livelink knows the evaluate conditions etc, if you change the real master map then only instances churned form that will be affected not earlier ones
  7. Attributes and Forms are basically going to borrow/rely heavily on categories and attributes code
  8. The code for finding the Attachments in a Workflow Instance and downloading it.
  9. My code shows how to get one item in the WF Data Structure a.k.a Container ID .You will need to write recursive algorithms if there were folders within that particular id.

Event Scripts Debugging

 

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.

Getting Old.One of the most productive ways one uses Oscript is to create Event scripts in livelink workflow.

Workflows in livelink are perhaps the most easy ways to impress your clients and a lot of partners and ecosystems are built on top of that.Event scripting is taught or learned by one who has been introduced in livelink.But in a nut shell if you know how to paint a livelink workflow and thought of somethings like,how I wish OT gave me code to do this small thing which I am trying to do in a “kludge”. You may have noticed the “kludge” with how one uses XML WF Extensions ,to get to a document in the attachments area and do something with it.So a XML WFExt map looks very weird there will be a Export step,modify step for anything/ everything you want with it kind of very silly when you look at at the map.Fortunately when I was learning this XMLWfExt was high priced so we did not get to use it,hence we had to do it via event scripting. Once you get hooked into it man are you gonna love it. WR getting to attachments is also another inefficient way to do your stuff but the standard by line is oscript can break your investment.But when anybody wants anything done they would go to OT or Vendors who would you guessed it use Oscript to provide the magic.There is nothing more untruthful than this . Oscript when learned and done the correct way will survive years.To basically make a point I am going to attempt to see if a eventscript I wrote on 9.1 Sp3(circa 2003) can be made to work in 9.7.1(2013).I will even try to make it work in CS10 ,but then I will have to spin up a 2008 VM and so on.

Task At Hand:WF is initiated with a custom title made up of attributes, strings etc. The WF has four forms loaded into them and the template has a label and a field called TITLE  My job is to take the title and replace it on the form fields. Seems pretty  easy to do.

See My Map-10-24-2013 4-26-10 PM

My template looks like this and I tried not to write code it does not work when initiating the workflow

2

Ok so as most of developers do I put a break in that script with just a echo statement to start doing my work so that I can see the variables etc. so as most new people will face I get this

3

and more importantly the debugger my task info is an ERROR.Without which I cannot proceed.I say this after 10 years because now I know how to do this.I did not at that time and so many of you will also go thru this.

4

So what do you do.After pondering for a while I resignedly said let me put it in another step and tell the user that it is a livelink limitation you will get an extra step in your workflow so click it to run the event script

so here’s my experience when I put the event script on the next step

5

Now we still have a error but that is actually joyous because we can now start debugging

6

But look at the TaskInfo variable now it has what we are looking for and trying to debug all the rest of the script

7

I managed to figure out the rest with echos etc and finished the script

Now HERES WHAT THE UNBELIEVABLE PART WAS .I JUST EXPERIMENTED PUTTING IT BACK TO HOW I WANTED , TO THE START PLACE AND IT WORKED

Since the project was a go I was very overjoyed.Later as I started reading articles by Jeff Lang,a great guy,who incidentally wrote livelink workflow he kind of explained the C++ firing and so on.We are friends and he has helped me and many other people when we got into a bind.I loved a post where he kind of admonished the developers who wrote XMLWFEXT….:(

See his post in 2007 I wish I had asked him in 2003 or learned it the proper way 🙂

In continuation here’s what you will definitely succeed start small,take baby steps and try some of these best practices

  1. Event scripts can be debugged only if the work is committed in the database,means it has to initiate.What I mean is basically in WWORK the row is available.what looks as a “chicken & egg” situation may only be in development and really not in the real wf operation as I found by trial and error.Nowadays there is the IH step which you can put and assign it as a scheduled time.At the time I was doing this I did not have the liberty of such a step.
  2. Do not chain event scripts into the start step,milestone that kind it makes debugging difficult.Start to a milestone these are auto done steps.Milestones later in the map should not have problems.
  3. Do not have many things that a IH will do.Break it into manageable pieces.You will be grateful you did.

See where i posted this 

A really bad WF map made up of XMLWFEXT,WR,eSIGN etc the reason why the “kludge” is arrived is because of the designer not resorting to event script programming.Nor is the logic very sound.Stay away form those kinds.A business user should understand the wf map that is what the process is designed to support.Whenever I design a map I give the business user a standard swim lane diagram I find in the web.9 times out of 10 the map becomes much better that way.I also encourage my users to paint and change maps so it does not become a specialized livelink job.

8

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