|
Re: Periodically Export Structured Data [message #1736951 is a reply to message #1736042] |
Mon, 04 July 2016 14:32   |
|
Michel,
you can use the API, e.g. from within a schedule Stardust process, to fetch the required data (descriptors) and push it out. You may also be interested in the IWorklistMonitor interface.
We are currently building out further hooks so data exports are triggered via an SPI events based.
If you decide to approach this on SQL level then this may come in handy:
List all data values that belong to a particular process instance:
SELECT d.id, d.name, dv.*
FROM PROCESS_INSTANCE pi
INNER JOIN PROCESS_DEFINITION pd ON (pi.processdefinition = pd.oid and pi.model = pd.model)
INNER JOIN DATA_VALUE dv on (pi.scopeprocessinstance = dv.processinstance)
INNER JOIN DATA d on (dv.data = d.oid and dv.model = d.model)
INNER JOIN MODEL m on (pi.model = m.oid)
WHERE pi.oid = ?;
List all structured data values that belong to a particular process instance (for entries that are indexed):
SELECT d.id, d.name, sd.xpath, sdv.*
FROM PROCESS_INSTANCE pi
INNER JOIN PROCESS_DEFINITION pd ON (pi.processdefinition = pd.oid and pi.model = pd.model)
INNER JOIN STRUCTURED_DATA_VALUE sdv on (pi.scopeprocessinstance = sdv.processinstance)
INNER JOIN STRUCTURED_DATA sd on (sd.oid = sdv.xpath)
INNER JOIN DATA d on (sd.data = d.oid and sd.model = d.model)
INNER JOIN MODEL m on (pi.model = m.oid)
WHERE pi.oid = ?;
Retrieving structured data initialized with non-null or null value (plus non-leaf data in the data structure)
select pd.ID,pi.OID, SUBSTR(sd.XPATH,1,20) as "XPATH", SUBSTR(sdv.STRING_VALUE,1,20) as "STRING_VALUE", sdv.NUMBER_VALUE
FROM
PROCESS_INSTANCE pi,PROCESS_DEFINITION pd, DATA_VALUE dv, STRUCTURED_DATA sd, STRUCTURED_DATA_VALUE sdv
WHERE
pd.OID = pi.processDefinition
and pi.OID = dv.processInstance
and dv.data = sd.data
and sd.OID = sdv.XPATH
and pi.OID = sdv.processInstance
;
Please note, that values that do not fit into 128 character STRING_VALUE column of DATA_VALUE respectively STRUCTURED_DATA_VALUE will end up as multiple rows in STRING_DATA table. This is not explicitly considered in SQL statements above.
|
|
|
Re: Periodically Export Structured Data [message #1738158 is a reply to message #1736951] |
Sat, 16 July 2016 11:54  |
Michel Michaels Messages: 7 Registered: October 2015 |
Junior Member |
|
|
Hi Robert,
thanks a lot for your effort, for your time !
in the meanwhile I built the part of IPP data model, based on the documentation. We are interested to push the data concerning model and user definition, process activities and structured process data. We now have new requirements, to extract only changed data. This would be possible, if the tables were created with the option ROWDEPENDENCIES.
Question 1: Would it be possible to install IPP with the mentioned option ?
If yes, then the changes of the structured data could be recognized on the attribute level (because 1 attribute = 1 row)
Question 2: Am I right ?
and a tool like Oracle Data Warehouse, Replicator etc. could be used too.
Question 3: Am I right ?
If no, then it seems to be easier to extract the whole structured data from CLOB_DATA and compare outside of IPP.
You mentioned the "SPI Event" - > Hibernate.
Question 4: Do you know a Hibernate API to extract mass data (not a single Object) based on changes ?
Thanks a lot in advance,
Michel
[Updated on: Sat, 16 July 2016 12:13] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.02041 seconds