Tuesday, August 9, 2016

IBM Connections Docs 2.0 CR1 upgrade failure. Here´s the fix.

I attempted my first Docs 2.0 CR1 upgrade today, on a fresh Docs installation.

It failed.

I got the same error as Roberto Boccadoro did as described here:
https://rob59blog.wordpress.com/2016/07/29/ibm-connections-docs-cr1-installation-may-fail-with-an-error-on-conversion-server/




Roberto, thanks for this solution.
Although I ran into a new issue in step 4 of your solution.


I was not able to run the command:
upgrade_node.bat -installroot D:\IBM\ConnectionsDocs\Conversion -symcount 8

This is the error I got:

Traceback (most recent call last):  File "upgrade_node.py", line 5, in
    from config import CONFIG  File "D:\temp\docs_remote_installer\installer\config.py", line 46, in
    CONFIG=Config()  File "D:\temp\docs_remote_installer\installer\config.py", line 38, in __init__    self.get_input()  File "D:\temp\docs_remote_installer\installer\config.py", line 17, in get_input    if(not os.path.exists(options.install_root)):  File "d:\Python27\lib\genericpath.py", line 18, in exists    os.stat(path)TypeError: coercing to Unicode: need string or buffer, NoneType found

I then opened up the "upgrade_node.bat" file, and I noticed that the only thing it does is run python on the "upgrade_node.py" script.

After searching the net, I noticed a comment about the fact that python does not accept arguments unless they are defined with 2 hyphens, aka "--"

So I ran this command, which has 2 hyphens on the "installroot" and the "symcount" argument.

python upgrade_node.py --installroot d:\IBM\ConnectionsDocs\Conversion --symcount 8

This worked for me and Step 4 of Robertos guide worked.

Monday, August 1, 2016

Using TDI/SDI to populate Profile Tags in IBM Connections 5.

I have created this simple AssemblyLine to automatically populate tags on profiles in IBM Connections.

This one works in IBM Connections 5.0, but haven´t tested it on version 5.5 yet.

The AL does the following:

  1. The iterator is a CSV file, with the following structure:

    email-address;tag


    For example:

    robert.farstad@item.no;tdideveloper

    robert.farstad@item.no;NominateThisGuyForChampion

    The location of the CSV file is:

    /opt/IBM/TDI/tdisol/tags_input.csv
  2. A JDBC connector in Lookup mode, which connects to the PEOPLEDB table named EMPINST.EMPLOYEE.

    The Link Criteria is the mailaddress from the CSV file. If this one matches with the PROF_EMAIL_LOWER field in the SQL Table, one work attribute is fetched from the table.
    This is the PROF_KEY attribute.
  3. Then a TAG_ID is generated using this random UUID4 script:
    https://gist.github.com/kaizhu256/4482069
  4. Then I write 4 fields into the EMPINST.PEOPLE_TAG table in the PEOPLEDB database.

    -PROF_SOURCE_KEY (this is normally the prof_key value of the user who tags)
    -PROF_TARGET_KEY (the prof_key value of the person beeing tagged)
    -PROF_TAG_ID (the value generated in step 3 above)
    -PROF_TAG (the tag-value itself, from the CSV file)
There are 2 other fields, which are disabled in the "write_entry" connector. The fields are "PROF_TYPE" and "TENANT_KEY".
Those two fields auto-populate in the DB. This means that the AL does not have to worry about them.

This AL is easy to customize to fit your needs. Switch out the iterator with an ldap connector, perhaps? :-)

Screenshots:

Here´s the iterator:






Here´s the side-lookup I do into the EMPLOYEE table, to fetch the PROF_KEY value:




IF branch that checks if the PROF_KEY actually was fetched:


Script where I generate the UUID4 value for the PROF_TAG_ID field:


Here´s the JDBC Connector that writes the tag to the profile.
The author of the tag is the user itself, which means that when TDI writes this tag, it says that I, myself created the tag. That´s where the field "PROF_SOURCE_KEY" and "PROF_TARGET_KEY" comes into play. The value of the fields are equal.

As you can see, the connector is in "AddOnly" mode, and not in "Update" mode. I tested it, and running the same AL on the same csv file, where all the same tags are attempted inserted once more, only produces a small error message. I had no interest in running it in "Update" mode, checking to see if the tag already exists, and tagged by the user itself. This way the user gets a tag, by him- /herself, only.



Before running the Assembly line:


After running the AL:


The Assembly Line can be downloaded here:
https://github.com/rockbert77/connections_tdi/tree/master/Load_Profile_Tags_from_csv_into_Profiles
Import it into your Connections tdisol project and test it out :-)

Hope this was useful to you, and yes, keep me in mind when the IBM Champions nomination is due :-D