Get Work Item from Key Id (idA2A2)
Hi,
I have used this case item
to get the work item records I want to complete through an API call.
And this case
https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS234435
tells you how to complete the work item once you have it.
But from the records I get through a SQL query, I have the unique key for the work item (idA2A2 from table WorkItem), but how do I get the WorkItem object in code from this unque key.
If I try a search condition such as
SearchCondition condition = new SearchCondition(WorkItem.class, WorkItem.IDENTITY, SearchCondition.EQUAL, iWorkItemId);
I get an error that says
Caused by: Attribute "identity" is not a member of class "class wt.workflow.work.WorkItem"
If I try
SearchCondition condition = new SearchCondition(WorkItem.class, "workitem.persistinfo.key.id", SearchCondition.EQUAL, iWorkItemId);
I get a similar error.
So what is the search condition for when you have the idA2A2 column (key Id column info). Surely there is a way of finding the object if you have the unique id (whether it be WTPart, WTDocument, WorkItem etc).
Is there a list somewhere of what the identity parameter for each object type should be (ie what the "workitem.persistinfo.key.id" should really be)?
Thanks
Ben

