Skip to content

Appukili's Weblog

Kilikonchal

Tag: upgrade category

Metadata for the brave

Metadata  in Livelink (Yawn ContentServer) is mostly by a Object Called Categories.A Category Object again is of subtype 131 and it can have versions.Its content or version file looks like XML and translates the data structure for use with Livelink.When some one adds a Category to an Object like Document,Folder etc  what you are essentially doing is requesting the latest copy of the Category Template(131) or it will be the Category applied to the parent container.Then it goes through an oscript/weblingo layer where it paints the structure like is it a Text? is it Mandatory and so on.Increasingly I see OT advising customers to use SETS and that too with Multiple Values.I tried to stay away from SETS in my design because it is next to impossible to write reports when there is more than one value involved 🙂

A Picture is worth a thousand words so I am showing a Category called SapCategory as you can see I have some that are very self descriptive however these terminology is probably worth understanding.In Livelink projects you will affix useful metadata{ a set of categories(131), some Classifications(199) or RM Classifications (551) }.OT has prided itself on capability of its search and indexing engine(after all OT was the first guys to index the OED and that greatly increases the work they put in this ) so all this metadata that you put and inherit it down to millions of items is supposed to find you patterns of knowledge in your organization.The xECM side of the house puts technical categories so does AGA so that in first shot looking at the object metadata one can even say what it purports to be.Classifications and RM Classifications look like category metadata but they allow alternate taxonomies and navigation structures.

MVA-Multi Valued Attribute indicate by the + and – signs.In any case if you only have one Value also it is internally a List of values.On top of it now all Livelink servers can have that in more than one language . OT does not the make category metadata multi language but our good friends at Cassia ECM make it and sell it through OT.

Set -The Set is a place holder where in you can define more and more primitive datatypes and it looks aesthetically pleasing(?) or even easier to understand data.Both Sets and Categories subtype will say AttrType=-18 and AttrID indicates the position.

For techies see my revelation to the world I think the link is permanently lost

There is a simple Request Handler called attributes.dump ( perhaps it is hidden in the admin.index pages and you might need a SA prv) you will see that the Set Identifier does not have a Attribute ID

Nobody from OpenText has told the programming world or developers how to look at this DataStructure well not in so many words at least.. Everyone is using their own methods do something.How many SET parsing/example  requests happen in the OT KB and OT answers cryptically? Or as a Java or a C# programmer is one supposed to be that intelligent to figure everything out? I believe it is very shortsighted of OT to push towards their professional services,or WebReports to achieve anything and everything.Since the move from LAPI some hobby programmers have shown the parsing.I have had countless requests from developers who wanted to see how to go about it so this is a way to help them. Actually since all ReturnValues are coded for OOP apparently this is much easier than in LAPI days but still a new programmer cannot be expected to become a livelink knowledgeable person for participating in one project.

Imagine a Node Object like Document or Folder has had a category attached,then its values are in its MetaData Object.The MetaData Object consists of AttributeGroups which are akin to List of Categories.So if you have applied 7 Categorise expect 7.These 7 will show you empty shells or filled shells of information.

So I have this and another category attached /applied to an object

As you can see those are the two categories or an AttributeGroups Object of two AttributeGroup.OK so if you isolate one AttributeGroup you will get the individual keys(Attributes).OK then you need to test/cast these complex structures from their Livelink given out DataValue to things people can understand Namely StrinValue,IntegerValue and DateValue.Now if a Set is encountered you will get a TableValue object.Now the TableValue will contain a excel row like representation and is a RowValue Object.Once you isolate the RowValue into its DataValue you will get its IntegerValue,StringValue and such like.Good thing they did not allow a Set inside a Set 🙂

The key of an Attribute is made up of <category dataid>_<version>_<attributeID>

So hopefully the code I post in C# helps a poor soul.Now please understand that the Category Data Structure is a pretty complicated way how the Data is shown,how the Data is held in a Table and how the reporting table has been considered. When we were in the LAPI era the entire structure was given to you as a LLValue Object out of which you had to get the Types isolated and program.This was me in 2004 battling out a worked out example in LAPI documentation   which actually did not work if you actually cut and pasted the sample.So I just took it as a challenge and trying to learn the OT debugger and its Script actually helped me with it

 

Link to Code File coming soon 🙂 One thing I noticed in 2017 against CS16 is now OT has already built a category called “External Att” with some commonly asked of functionality Good Job…

Hopefully they might be trying to get rid of the “Additional Node Attributes” piece in OT

Screen Cap of when I run the code against a Node in LL.You can optimize the loops when you understand how the code is supposed to be written.Frankly my intention is to show  you how  to iterate the DataStructure.

 

A C# file that I wrote that takes a NodeID in Livelink and spits out Category Info

Including Sets & MVA

 

 

Advertisement

Rate this:

appukili content server, content server web forms, LAPI, oscript, restapi, web services 2 Comments June 1, 2017June 2, 2017 4 Minutes

General Help Series 1-Categories/Attributes (How Metadata is maintained)

  • A Post where I will try to share commonly looked for advise,many time that does not require programming but just configuration,I hope to make this in a question answer format.I will also try to answer commonly encountered problems if it does not require me to stop my paid work .
  •  
  • Category,Attributes and the mandatory aspects of it.

Categories is a template in livelink so that you can “model” your metadata requirements.In essence after you “create” the category and create meaningful “leaves” or “attributes”,you can allow others to use it as models where you can use awesome livelink search api .Here’s the RUB most container objects  like Folders does not make the “mandatory” compulsory but if you try to add a versionable subtype like “Document” it becomes mandatory.Now imagine somebody starts using a OT tool like EC or Explorer to copy a file system full of things into livelink,the folder gets replicated but livelink will stop the user from proceeding forward until documents get filled with mandatory metadata.If memory serves me right OT will even allow a flag that says substitute a top filled attribute to be trickled in.Now if you are a programmer,integrator or even a casual user trying to get things done in a jiffy what you need to know is the “mandatory” aspect is tied to a livelink server instance(not globally enforced) as well as reversible in a subtype setting.So you can go to the admin.index and try to navigate to the command “Configure Required Attributes”.You will find that folder is un checked as well as document is checked,this  is what prompts the mandatory pop up to occur when you add things.Note if you defeat what the modelers intended you will end up having data that does not get returned in a meta data search.Also try to use the livelink GUI as much as possible before you start programming as programming just replaces the human clicker at the gui, this is often overlooked by all new comers.

Added:Hugh pointed out the fallacy of a default attribute.Yes it is true that people will not put values if it can be inherited.But by the same token if the category is in need pf a upgrade and has 1 million items to be upgraded,it just adds to the cost of programming or operational efficiency.So Moral just do your design judiciously thinking that not only GUI users but there might be times you need to change the values around 🙂

BTW-To supply default values to help in a upgrade is what I have done most in my job 😉 Many times it is a quick and dirty job with the mandatory values read off a file.In my current employment we have a beautiful batch framework that is able to do all bells and whistles almost could sell this to OT.

Form Based Livelink Workflows and WF Attribute based workflows

Coming soon

Rate this:

appukili content server, livelink, Livelink as store, livelink records management Leave a comment April 26, 2015August 7, 2015 2 Minutes

How to Parse a Node’s categories in C# WCF code

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

Recently a programmer asked me how you would show the values in a nodes categories.He had done all except up to the fact that he did not know how to get the

real values hidden in Stringvalue, Integervalue, boolean etc.I don’t remember seeing a good example but C#’s good debugger helped me.Also quite a posts form people like Sean Walker,Rob Vanderpoel

helped me understand the structure although I like seeing simple full samples rather than snippets

After you get the AttributeGroups,you have to go into that and get the DisplayName and keys and based on the type you have to cast that value making sure to handle nulls as well

perhaps now I can write better set attributes because i was wondering how one would write a generic call with the examples in OT.

I was able to do this in about 1.5 hrs and learned something as well.The code was done in a hurry and based off Jason Smith’s starter examples

here’s a link in case somebody needs it

 

Or email exchange hiding the actual names etc

Hi Appu,

Thank you for this information, it is very similar to what the REMOVED NAME consultant has produced so far, however the part we are stuck with is getting from the “Key” value to the actual data shown in Livelink.

For example the output for the document you reference below looks something like:

Display Name: Title –- Its key is: 122343.9.24

We would like to see:

Display Name: Title –- Its value is: WEB SERVICES NEED BETTER EXAMPLES

Is this something that you have been able to accomplish? There doesn’t seem to be any calls to make the jump from Key to Value.

Thanks,

 

Rate this:

appukili mobile, restapi, single sign on, soapui, sso, web services, workflows 3 Comments March 22, 2013October 3, 2016 2 Minutes

Categories and Applying It explained

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

Recently a friend started doing some stuff in lapi and got extremely confused. So I wrote this to alleviate the confusion and some common business rules people forget when they are programming in Livelink albeit oscript, lapi or web services.
Category-A template object of subtype 131 which again is a versioned object. If you find one and open up it with ascii editor like textpad you will see a lot of Livelink geek speak which we call assocs (asosh…)
Why does Livelink need it? So that people can create easy to understand metadata templates and search on them without resorting to developers or sql based reporting. It is so easy to create re-usable search templates in Livelink.
If I change the category definition from a version that is 8 and added a new field that is mandatory can I work it in
it really depends on your prowess. The minute the category was changed and the person submitted the change a new version of the category was added, all your objects that were “TAGGED” with that metadata template has become obsolete. This is when you see the “UPGRADABLE” icon. You can do it form the folder or form the category object. It will take some time. There are some best practice documents in the KB.
Common problem is if the container has the old category and if you or a program tries to add a new document with that category. Regardless of version you want to use Livelink is adamant it will want to use the new version. So you could run into 2 major problems, you cannot put that document unless you upgrade the category on the folder, or even after upgrading you are not supplying the mandatory value. Folders newly created will not want to insist on the mandatoriness although it is something you can change.
I have written lapi and oscript routines to handle all these situations.
Can you create a Category Subtype with lapi- sure but most of the time administrators do the category creation/updation etc, most of the time programmers are entrusted with the data part or “APPLYING THE NEW VERSION OF THE CATEGORY TO EXISTING OBJECTS”
I cut and pasted this from the code I put there
/*
HUGE DISCLAIMER
THIS DOCUMENT IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS “AS IS”
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SAMPLE CODE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. BY USING THIS CODE YOU AGREE TO THE ABOVE TERMS.
*/
/* Appu Nair 10/16/2012
* Tested on Visual C# express on 64 bit Windows 7 against a Livelink 9.7.1 VM
* My project has been downgraded to .NET2.0 and I copied lapi dlls form another place
* I also added vjslib wjhich i found that I had installed here C:\Windows\Microsoft.NET\Framework\v2.0.50727\vjslib.dll
* Written to illustrate the user who was on this https://knowledge.opentext.com/knowledge/cs.dll/open/30474852
User wants to create a document and add 2 categories to it
Starting user’s please understand this a category object is a subtype=131 object which is a versioned object in Livelink
So when you look at a category in your system Assume the definition now contains something like ths.So in Livelink if you look at this category
*asuume it has a defid(dataid,objid) of 123456 and is version 210.Yes they took 209 attempts to come up with this category
*THIS PROGRAM DOES NOT CREATE THE CATEGORY OBJECT I DID THAT USING THE LIVELINK GUI.THIS IS ABOUT APPLYING A METADATA TEMPLATE TO OBJECTS
*IN LIVELINK SO PEOPLE CAN SEARCH ON IT LATER.
* My SAPCategory
* Name TEXT 32 CHARS
* AGE NUMBER
* GENDER TEXTPOPUP VALIDVALS={‘Male’,’FEMALE’}
*
* Assume your manager has asked you to
* make the category with a new TEXT field called ‘SAPCOSTCENTER’ and asked to make it manadatory.You did that and magically the new category version is
* now at 123456 version 215.
* My SAPCategory
* Name TEXT 32 CHARS
* AGE NUMBER
* GENDER TEXTPOPUP VALIDVALS={‘Male’,’FEMALE’}
* SAPCOSTCENTER TEXT mandatory 32 CHARS
*
* Now let’s look at it on run time. Livelink could care less if defaults were used when it encounters mandatoriness
* on folders or containers. The behaviour can be altered but no sane company does it.But Livelink will cry foul when this happens either from
* the gui or a program.
* Assume folder id called 109876 has the category version applied 123456:210 that is not upgraded. You say in your program to add a document with category
* 123456.Livelink once a category has been upgrded will force you to use the most current version. In this case your attempt will fail because it does not want
* you to create a document here with 123456:215 applied to a folder that has 123456:210.Moral of the story is if a category was upgraded it is the
* Livelink administrations job to make sure to pass it down to where it is used. Going by the same token if the sapcostcenter was mandatory and you
* did not supply an initial value you cannot get it to stick on the object. So more programming and intelligence need to be applied in your design
* In this e.g I will have another category with this characters
* MY IXOSCategory
* ArchiveID TEXT 6 CHARS
* DOcID NUMBER 64 chars
*
*/

If anybody was interested in the code that I developed for my friend it is here
“GOOD LAPI SNIPPETS FREE FOR REGISTERED USERS”

and under the link that says “How to Add more than One Category to a Object with LAPI”

Rate this:

appukili Uncategorized 4 Comments November 16, 2012October 3, 2016 5 Minutes

I have Other Things as Well

USEFULLNESS

  • 129,930 hits

Category Cloud

content server content server permissions content server privileges content server records management content server taxonomy content server upgrade content server web forms content server web form views content server workflow cs UI eventscripting impersonation java livelink LAPI livelink Livelink as store livelink forms livelink form views livelink permissions livelink records management livelink taxonomy livelink web forms restapi Sharepoint Livelink integration single sign on soapui sso Uncategorized web services workflows

Recent Comments

appukili on Agents Agents Everywhere
Raja on Agents Agents Everywhere
Take Some REST… on Code Demonstration Pages
Z on AddressBook
appukili on AddressBook
Create a free website or blog at WordPress.com.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Follow Following
    • Appukili's Weblog
    • Join 29 other followers
    • Already have a WordPress.com account? Log in now.
    • Appukili's Weblog
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...