How to get Workflow status type in database

Hi All,

How can i get workflow status type for change status in database.

I Found workflow status type values in the listentry table with parent id 3466.
How can i join changestatus with these values.

Also How can i associate workflow status type with change history.

Regards,
Dinesh.

Agile User Asked on February 17, 2016 in Agile PLM (v9),   Product Collaboration.
Add Comment
2 Answer(s)

The Workflow History can be built from the Database using workflow_process table.
In this table there is the STATUS TYPE column that can be red as below :
TYPE_PENDING = 0
TYPE_SUBMIT = 1
TYPE_REVIEW = 2
TYPE_RELEASED = 3
TYPE_COMPLETE = 4
TYPE_CANCEL = 5
TYPE_HOLD = 6

However, I suggest you to get this information using the Agile SDK and not the Database because the ids and table structure can be modified after an upgrade

Agile Angel Answered on February 17, 2016.
Add Comment

Agreed with Antonio, it is always best to get such information using the SDK.
 That said, if you want to see the status type along with the actual status value  (similar to what you see in the Signoff/Workflow tab), the following query will do so :
select change_number, n.description “STATUS”, le.entryvalue “STATUS TYPE”
  from change c, nodetable n, listentry le
 where change_number = ‘<CHG_NUM>’
     and c.status = n.id and n.objtype=107
     and c.statustype = le.entryid and le.parentid=3644;

 If you want to link in records from CHANGE_HISTORY, it gets a LOT more complicated (having just finished trying to figure it all out). SIGNOFF links to WORKFLOW_PROCESS using SIGNOFF.PROCESS_ID = WORFLOW_PROCESS.ID (as does the CHANGE table) and it then links to CHANGE_HISTORY using SIGNOFF_HISTORYID *or* HISTORY_ID (and sometimes both). Note that there are a fair number of “extra” records in both SIGNOFF and WORKFLOW_PROCESS that the GUI weeds out, but doing so using SQL*Plus is not at all obvious. And to then get the ordering of the records correct (i.e. matching what you see in Agile) is another exercise in non-obvious-ness. Note that it cannot be done with a simple query (or even a complex one), there MUST be processing involved, so it must be done using PL*SQL.
 Using the SDK API is much easier, not just because things can change between versions but because what processing Agile does behind the scenes is not documented.

Agile Angel Answered on February 17, 2016.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.