IBM Maximo: SQL Queries - WORKFLOW: Difference between revisions

From Wiki
(Criou a página com " = Ver também = * Artigos sobre IBM Maximo * Mais Artigos sobre Cloud / WebDev / Tecnologias Category:IBM Maximo Category:ibm-max...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:


= Lista todas as condições em workflow ativos para examinar onde as cláusulas=
select WFCONDITION.PROCESSNAME, WFCONDITION.NODEID, WFCONDITION.PROCESSREV, WFCONDITION.CONDITION, WFNODE.TITLE, WFNODE.NODETYPE
from WFCONDITION
  join wfprocess on (WFPROCESS.PROCESSNAME = WFCONDITION.PROCESSNAME and WFPROCESS.ACTIVE = '1')
  join wfnode on (WFCONDITION.nodeid = WFNODE.NODEID and WFCONDITION.PROCESSREV = WFNODE.PROCESSREV and WFCONDITION.PROCESSNAME = WFNODE.PROCESSNAME and wfnode.processrev = wfprocess.processrev)
order by WFCONDITION.PROCESSNAME, WFCONDITION.NODEID;
= Historico =
select to_char(STARTTIME, 'YYYY') as YEAR1, count(1) as CONT
from wfinstance
where active=0
and deletable=1
group by to_char(STARTTIME, 'YYYY')
order by to_char(STARTTIME, 'YYYY')
result:
{| class="wikitable"
|-
! YEAR1 !! CNT
|-
| 2017 || 536611
|-
| 2018 || 12263485
|-
| 2019 || 17314752
|-
| 2020 || 10712313
|-
| 2021 || 20238022
|}
= Arquivamento=
Queries uteis para arquivamento/exclusao de registros em tabelas
select count(1)                   
from wfinstance
where active=0 and deletable=1
select count(1)                   
from wfinstance
where active=0 and deletable=1
and starttime < sysdate -90
select count(1) from wftransaction
where wfid in 
(select wfid
from wfinstance
where active=0 and deletable=1
and starttime < sysdate -90)
select count(1) from wfcallstack   
where wfid in 
(select wfid
from wfinstance
where active=0 and deletable=1
and starttime < sysdate -90)
Dica de [http://maximobuzz.blogspot.com/2013/07/delete-workflow-history-for-inactive.html Delete Workflow History for Inactive Records]


= Ver também =
= Ver também =

Latest revision as of 16:23, 20 December 2021

Lista todas as condições em workflow ativos para examinar onde as cláusulas

select WFCONDITION.PROCESSNAME, WFCONDITION.NODEID, WFCONDITION.PROCESSREV, WFCONDITION.CONDITION, WFNODE.TITLE, WFNODE.NODETYPE
from WFCONDITION
 join wfprocess on (WFPROCESS.PROCESSNAME = WFCONDITION.PROCESSNAME and WFPROCESS.ACTIVE = '1')
 join wfnode on (WFCONDITION.nodeid = WFNODE.NODEID and WFCONDITION.PROCESSREV = WFNODE.PROCESSREV and WFCONDITION.PROCESSNAME = WFNODE.PROCESSNAME and wfnode.processrev = wfprocess.processrev)
order by WFCONDITION.PROCESSNAME, WFCONDITION.NODEID;

Historico

select to_char(STARTTIME, 'YYYY') as YEAR1, count(1) as CONT
from wfinstance 
where active=0
and deletable=1
group by to_char(STARTTIME, 'YYYY')
order by to_char(STARTTIME, 'YYYY')

result:

YEAR1 CNT
2017 536611
2018 12263485
2019 17314752
2020 10712313
2021 20238022


Arquivamento

Queries uteis para arquivamento/exclusao de registros em tabelas

select count(1)                    
from wfinstance
where active=0 and deletable=1
select count(1)                    
from wfinstance
where active=0 and deletable=1
and starttime < sysdate -90
select count(1) from wftransaction 
where wfid in  
(select wfid
from wfinstance
where active=0 and deletable=1
and starttime < sysdate -90)
select count(1) from wfcallstack    
where wfid in  
(select wfid
from wfinstance
where active=0 and deletable=1
and starttime < sysdate -90)

Dica de Delete Workflow History for Inactive Records

Ver também