martes, 16 de octubre de 2012

CA Clarity development I (concepts)

Concepts and differences:


Provide information in real time for CA Clarity PPM users, most suitable when your query data contains only one or two dimensions(metrics); from different objects

-Grid portlet. based in data from a dataprovider such as Object, System, Clarity Query (NSQL).  

Real only when dataprovider is a Clarity Query (NSQL).

If your grid contains virtual columns, the source data for those columns must be defined in the query that supplies data to the grid.

 --A hierarchical grid portlet can be used to show the structure of data that has more than one level. A parent row can have multiple child rows, and the data that shows in the parent row can be an aggregate of the child data.


Static List
Dynamic Query. NSQL is supported in Query.

Hidden key * : Lookup Code /Lookup Enum (type to use in database)
* Important to decide which type use before Save.

After choose hiddenkey
ID (enter once+unique): *
* will assigned to previously chosen field in hiddenkey

LOOKUP_CODE is character type on the database,(if chose "enum", it will contains same number)
LOOK_ENUM is numeric type on the database, use when values are numbers,(if chosen "code", it will contains 0)

"Object" not required for a Dynamic query
Parent Window tab
"Hidden Key" is associated to the field in the first SELECT sentence, (value will be stored in the destination attribute and database)
"Display Attribute":(Output field) will display the content of this field in the attribute, after lookup selection.

Lookup configuration is reset. After changes in Query, configuration for Display Attribute and Browse window has to be reconfigured. (Avoid surprises with config documentation)

Attribute Lookup(string)  and Hidden Key. Hidden key will pass the complete result to attribute but it is limited to 30chars, so a bigger string will give error "Error:Value is too large" (verified in v13.1)

Attribute "Data Type" takes its value when it is associated to a lookup for first time, so it will take the type of lookup output (Parent Window )

Be careful!!! because if you change the lookup output field and it has a different type then the attribute will display an error on the web. Furthermore the "Data type" of a lookup attribute is read only the first association to a lookup, so you need to create a new attribute with the correct "Data type".

How to pass parameters to the query:

  • from attribute mapping

Put  @WHERE:PARAM:USER_DEF:INTEGER:xxxx@ in the WHERE clause
Create an attribute and associate with previous lookup, press Save
Now, attribute showsin the bottom the section "Lookup Parameter Mappings"
Select an attribute to map to parameter; from the list of attributes available for this object.

*INTEGER or any other Data type.

  • from the web address (Xpath)

xxxx=field in the address such as id, projectid, object_id, etc...
value=returns the value after symbol "="

i.e /niku/nu#action:projmgr.projectProperties&id=1234567&classCode=project
returns 1234567

Note: be careful with this pameters because the query could not work as expected with other views containg the lookup, since views can have different fields in the web address.


-- line comment
/* */  multiline comment
Must be after the first SQL Sentence, ie
 -- ver. 1.2 Diciembre2012,

-Read only queries
-UPDATE, INSERT, and DELETE operations cannot be performed in NSQL.
-not recommend using NSQL for reporting or for stored procedures

-Dimension Properties Column

New lookup
In "Source" select "Dynamic Query", Submit/Save
In "Query" tab, "Query" text box, enter NSQL query, Save
In "Browse Window" click on the "Preview" button
(a window popup with the query results will be showed).

CA Clarity technical Administration

CA Clarity Administration stuff

Common network ports: 
Clarity app
http 80, 1024, ..
https 8043

http 8080

Clarity NSA
http 8090
https 8093

Configuration from NSA
BO config: Servers, Properties, reporting
DB config: Servers, Properties, Database
Java app config: Servers, Properties, Application
Logs: Servers, Logs

Version Upgrade
Check  "Data Model Changes" in "CAClarityPPM_ChangeImpactandUpgrade_Guide_ENU.pdf" file in order to be aware of changes in tables.

Queries and  Oracle databases

XOG compatibility

Clarity v.12.1 SP1
i.e. XOG
Clarity v.13
i.e. XOG

Testing XOG from Clarity web


Server info
i.e info:



Info about Servers Status, General metrics, Queue metrics

Flush Caches
Flushing caches


System Locks


 See Server Security Logs

Log filenames and messages:


Contains info about errors in scheduled reports and Jobs

ERROR 2013-05-24 18:30:03,137 [Dispatch pool-4-thread-2 : (tenant=clarity)] niku.njs (clarity:username:9333263__C1AA4D20-121B-43DE-B006-74E7A3366435:schedule_job_Autoschedule Project) Error executing job: 5041627
com.niku.union.utility.MessageKeyException: PRJ-SE04: Could not execute autoschedule job (5041647): Unparseable date: "21/05/2013"
    at com.niku.njs.Dispatcher$
    at java.util.concurrent.ThreadPoolExecutor.runWorker(
    at java.util.concurrent.ThreadPoolExecutor$

Wrapper Started as Daemon
Clarity initializing...
GMS: address=appservernamexxx-xxxxx, cluster=CLRTY-SA, physical address=x.x.x.x:ppppp
Clarity ready.
INFO: Server startup in 52214 ms
TERM trapped.  Shutting down.
Wrapper Stopped
niku.union (none:none:none:none) Clarity initializing...
niku.union (none:none:none:none) Initializing: tower...
niku.union (none:none:none:none) Initializing: monitor...
niku.union (none:none:none:none) Initializing: nsa...
niku.union (none:none:none:none) Initializing: wmd-init...
niku.union (none:none:none:none) Clarity ready.
config.TenantConfigurationManager (none:none:none:none) Properties/Database: id: clarity
niku.union (none:none:none:none) Destroying: tower...

[echo] CA Clarity Accelerator: Program Management Office installation was successful and is complete.
[echo] Check the install.log for errors that might not have been handled.
[echo] Package Installation Successful - 08-April-2013 21:00:01
[exec] Content Pack csp version has been deployed
[exec] DBTools Log - Mon Apr 08 22:28:02 CEST 2013
[echo] Clarity Solution Pack installation was successful and is complete.
[echo] Check the install.log for errors that might not have been handled.
(admin)     Following object(s) are invalid:

app-ca.log (application errors)
ERROR yyyy-mm-dd hh:mm:ss,mmm [http-bio-14001-exec-xxx] grid.EditListRowServiceImpl (clarity:username:sesionid:GetListContextByRow) Fatal error getting row metadata for project [projectid]
ERROR yyyy-mm-dd hh:mm:ss,mmm [http-bio-14001-exec-xxx] out.service (clarity:username:sesionid:GetListContextByRow) A RuntimeException encountered in Service. Converting to OSFApplicationException.
java.lang.RuntimeException: org.json.JSONException: JSONObject["column"] not found.

WARN  yyyy-mm-dd hh:mm:ss,mmm [http-bio-14001-exec-xxx] web.WebSession (clarity:username:xxxxxxxx__SESSION_ID:odf.filter) A request has been denied as a potential CSRF attack. Request Information-

(from Apache Tomcat)

serverip|[dd/mm/yyyy:hh:mm:ss +0200]|GET /address/file HTTP/1.1|aaa|bbb|cc|token

session id token: i.e. userdid__xxxxaxxe:xxxbaexxxax:-xxxxxxxxxxxxxxxxx
Userid is before the double underscore (__).
Finally, you can locate that user by selecting into the cmn_sessions table.

IP address of requestor
DateTime of the completed request
URL request
HTTP Status Code
Bytes sent back to the client (excluding the header)
Elapsed time of the request (in ms, can be subtracted from the DateTime to get the request startTime)
Clarity sessionId cookie (a distinct way to group requests, can be tied back to the sessions tables in Clarity to find the user)

- no results return to client for this field
aaa=code that the server sends back to the client
2xx= Successful
200= OK
3xx= Redirection
4xx= Error caused by the client
5xx= Error caused by the server

bbb= size of the object returned to the client, not including the response headers.
cc= elapsed time of the request

x.x.x.x|[dd/MM/yyyy:hh:mm:ss +0200]|GET /niku/ui/uitk/gwt/ HTTP/1.1|200|325759|1803|-
x.x.x.x|[dd/MM/yyyy:hh:mm:ss +0200]|GET /niku/wsdl HTTP/1.0|200|321|1|-

Debug Mode

XML output

XML Open Gateway (XOG)
web service interface that you can use to:
  *Import data
  *Export data
  *Move configuration data from one system to another
to read data from or write data to CA Clarity using XML and web services
GEL tags that can be used with XML for more advanced custom integration tasks
CA Clarity web services use XML messages that follow the SOAP standard.

jueves, 4 de octubre de 2012

CA Clarity / Openworkbench / Ms Project

Clarity and Opera
Browser compatibility

***Clarity PPM12/13
Web working on Firefox3/10/Opera

Firefox and Clarity
Firefox Toolbox for Clarity     

Firefox portable 3.6.28
+Addons (specific versions for FF3)
tabrenamizer-0.9.6-fx.xpi   (*)

tabrenamizer: rules for tab names

(*) Note: web addresses change between Clarity v12 and 13.
It is a pity that "tabrenamizer" doesn't support wildcards  :(

Chickenfoot Scripting for Clarity

Use CF foot methods and Javascript to automate tasks

Web differences between v12/v13
First line v12, second line v13

Web addresses
../niku/app?action=projmgr   (v12)
../niku/nu#action:projmgr (v13)
 button= "Class"="sectionBarBtn"
 button= "Class" ="ppm_button"

Default script folder:

Project Professional 2010 v14.0.6+CA Clarity PPM Microsoft Project interface


files related to Clarity/MSproject

When project is Saved to Clarity the mpp file is uploaded and stored in Clarity server
(PRDOCUMENT table  as BLOB information)

 Plugin for Ms Project files and folders

C:\Program Files (x86)\CA\Clarity\CA Clarity PPM MSPInterface
C:\Program Files (x86)\CA\Clarity\CA Clarity PPM Schedule Connect
file .VSTO
(Visual Studio Tools for Office) Visual Studio add-in (project templates)

C:\Program Files (x86)\CA\Clarity\CA Clarity PPM MSPInterface\data

to know which  version of Schedule connect is installed:
 java -cp "C:\Program Files (x86)\CA\Clarity\CA Clarity PPM Schedule Connect\lib\version.jar"

i.e output : Niku 13.0.1 Build 0102
                  Niku 12.1.2 Build 1260

info about last open projects and local path with mpp file

database connection data (host, login, port...

Openworkbench Advanced

***Openworkbench 1.1.6
Requires Java version 1.5 or later

***Openworkbench 2.0
Requires Java 1.7?


This software is an  interface between web browser and OpenWorkbench, so if our web browser cannot open project in OWB, you have to associate  MIME type to SCHEDLINK. 

SchedLink.exe" sched.nikusl  (by default Silent mode)
SchedLink.exe" /s /d  (setup with output)

Old path
"C:\Program Files\Clarity\Schedule Connect\bin\SchedLink.exe" sched.nikusl /d

New path
"C:\Program Files (x86)\CA\Clarity\CA Clarity PPM Schedule Connect\bin\SchedLink.exe" sched.nikusl /d

/s (setup in silent mode)
it just associate  NIKUSL object to Schedlink (Internet  Explorer)
(Registry: HKCR\MIME\Database\Content Type\application/nikuscheduler\Extension=.nikusl)

/d show output log to c:\SchedLink.log

 Openworkbench/MSP conection file (sched.nikusl)

A project is associated to a specific Scheduler by attribute "Scheduler Format"(Eng) or "Formato del programador" (Spa) (ID: prformat)

Available from UI, Schedule, Tracking

Depending of scheduler associated to a project, downloaded sched/sched.nikusl file will have one of following values:

sched = npWorkbench
sched = msp

Example of MSP (sched.nikusl) received from Clarity.
file = Projname
repo = NIKU
app = null
session = 7594029__D65BAB9D-5B2D-48DC-B282-9CC65AE806D5
projectId = 6037252
driver = HTTP
url =
sslLoginURL = null
sslHandling = SSL_FULL
userName = username
readWrite = false
sched = msp

Example of OWB file received from Clarity.

file = conection_test
repo = NIKU
app = null
session = 35022901__-b554f40:124971fe3a2:-78d61258623780532
projectId = 5203045
driver = HTTP
url =
sslLoginURL = null
sslHandling = SSL_NONE
userName = username
readWrite = true
sched = npWorkbench