Wednesday, January 15, 2014

Fetch Duplicate Artifacts in BPM 7.5

Get a list a artifacts duplicated across Process-App or Toolkits (Oracle 11g and up only)


WITH po AS ( 
    SELECT distinct
      ver.PO_NAME,
      ver.PO_TYPE,
    /*  snap.is_default,
      snap.name AS "Snapshot Name",
      snap.acronym AS "Snapshot Acronym",
      snap.is_archived AS "Is Snapshot Archived",
      proj.name AS "Process App",
    */ --LISTAGG(TO_CHAR(proj.short_name), '; ') within group( order by proj.short_name) AS "PROCESS APP ACRONYM",
    TO_CHAR(proj.short_name) AS short_name
    FROM bpi_procc_shr_shr.lsw_branch brnch,
      bpi_procc_shr_shr.lsw_po_versions ver,
      bpi_procc_shr_shr.lsw_snapshot snap,
      bpi_procc_shr_shr.lsw_project proj
    WHERE ver.branch_id       = brnch.branch_id
    AND brnch.tip_snapshot_id = snap.snapshot_id
    AND snap.project_id       = proj.project_id
    AND proj.short_name     NOT IN ('TWSYS', 'TWP', 'HSS', 'LSWPSC', 'SACOMMC', 'BDS2', 'SAPAPPS', 'OF_DEM')
    AND ver.PO_NAME IS NOT NULL
    AND snap.name IS NOT NULL
    AND
      -- ver.po_name like 'Submit Requisition' and
      snap.is_archived = 'F'-- and
      -- ver.end_seq_num is null
    ORDER BY ver.PO_NAME
    --group by ver.PO_NAME
)
select
  po.PO_NAME,
  po.PO_TYPE,
  LISTAGG(po.short_name, '; ') within group(order by po.short_name) AS "APP_LIST",
  count(1) "DUPLICATE COUNT"
--  po.short_name
from po
group by po.PO_NAME, po.PO_TYPE
having count(1) > 1
;

Monday, January 13, 2014

Calling services in iFrame


In version 6.2 to invoke any service in an URL we used the “teamworks/process.lsw? zWorkflowState=5&zProcessName=” pattern. But in version 7.5 we need to use “/teamworks/executeServiceByName?processApp=<APP-ACRONYM>&serviceName=” pattern. As you could notice it takes an extra parameter for “processApp”, which is used to identify the process-app or toolkit in which the service resides.

           
Along with the change in URL pattern, we need to follow the new convention for passing input values in URL. 7.5 uses “.” notation instead of “_”. Simply put if you used “tw_local_userName” in 6.2 to pass the username parameter as input, you need to modify that to “tw.local.userName” in 7.5.


To make any service callable through URL it needs to be a “Human service” and also has to be set as an “Exposed Service” in the “Overview” tab. Appropriate access control has be provided while exposing a service. If the service is supposed to be called via URL, the “Exposed As” parameter must be set as “URL”.

Friday, January 10, 2014

Types of GROUPs in IBM BPM 7.5

In IBM BPM 7.5 the user -groups can be categorized into 3 types:

  1. Groups that exist and managed in external directory services like LDAP.
  2. Groups that are created in the environment through Admin Console.
  3. Groups that are dynamically created by virtue of task allocation.

Groups that exist and managed in external directory services like LDAP

Such groups are created and managed in external directory services like LDAP. Such groups are imported into the BPM database when an user logs in for the first time. Such groups have a GROUP_TYPE as "0" in the table LSW_USR_GRP_XREF. Such groups cannot be edited or deleted through the default Process Admin Console. 
TODO : Verify that the group memberships are synced automatically.

Groups that are created in the environment through Admin Console.

These groups are created and managed through the Process Admin Console. Since these groups are not represented in the centralized directory services like LDAP, these are purposed to be used inside BPM applications only. These are analogous to Teamworks logical roles in Teamworks 6.2. These groups have a GROUP_TYPE as "3" in the table LSW_USR_GRP_XREF.

Groups that are dynamically created by virtue of task allocation.

Groups are dynamically created when a new task is routed to a lane participant (Participant Group) or assigned to a list of users (Ad-hoc group). Dynamic groups corresponding to Teamworks logical roles are also created during import from a 6.2 environment. These groups are not visible on the Process Admin console, hence cannot be managed. Dynamic groups that are created from Participant Groups or Logical Roles have GROUP_TYPE as "1" in the table LSW_USR_GRP_XREF, where as the dynamic groups crated from list of users have GROUP_TYPE as "2" in the table LSW_USR_GRP_XREF.

Dynamic groups are not reused hence are good candidates for purging once the task has been completed.
 

Wednesday, October 30, 2013

Teamworks Localhost Access Log - 6.2 and JBoss

How To Configure Localhost Access log in Teamworks 6.2 on JBoss

Teamworks localhost access log provides a means to track the requests and responses passing through the JBoss server. This includes access to all the static files (images, JS and CSS) as well as the dynamic resources (JSP, Servlets). 

This configuration can be found in the file process-server/deploy/jbossweb-tomcat55.sar/server.xml. In this file locate the entry <Valve className="org.apache.catalina.valves.FastCommonAccessLogValve", un-comment this tag to enable the logging. For various aspects of logging available, please refer the link given below.


Note: Tomcat does not support automatic house keeping of the logs, i.e. if you need to keep only "n" days worth of log, you would need to schedule jobs to delete the logs jobs. Tomcat does not handle this.

Tuesday, October 29, 2013

Oracle Automatic Segment Advisor - Read Advisor findings

Oracle Automatic Segment Advisor runs during maintenance window and collects information regarding various facets of your database, namely SQL optimization, table segment fragmentation, I/O wait reduction methods, ...

You can use a combination of DBA_ADVISOR_FINDINGS, DBA_ADVISOR_OBJECTS AND DBA_ADVISOR_LOG to read those findings.

The underlying query gives you the findings related to tables.
SELECT TO_CHAR(log.execution_start, 'YYYY-MM-DD') AS "ADVISOR DATE",
  af.task_name,
  ao.owner,
  ao.attr2 segname,
  ao.attr3 partition,
  ao.type,
  af.message
FROM dba_advisor_findings af,
  dba_advisor_objects ao,
  dba_advisor_log log
WHERE ao.task_id        = af.task_id
AND ao.task_id          = log.task_id
AND ao.object_id        = af.object_id
AND ao.type             = 'TABLE'
AND log.execution_start > SYSDATE-1
ORDER BY log.execution_start DESC, ao.attr2;

Friday, October 25, 2013

Setup a node as Event Manager on Lombardi 6.2

Event manager nodes are used to process system tasks and move tokens between tasks. In a high performance system its desirable to have a cluster of servers, some of which serve user traffic (User Nodes) and others dedicated for system activities (Event Manager Nodes). 

The config file 80EventManager.xml located at process-server/resources/config/system determines if a node has an event manager instance. There is a boolean flag on the xpath "/properties/event-manager/enable" that governs if an event manger instance is set up or not. 
Caution: Never modify any system configuration directly. Always use a overriding configuration file.

Check the table "LSW_EM_INSTANCE" in the process-server database to check which instances are setup as event-manager nodes, in a clustered environment.

Wednesday, October 23, 2013

Connect to Oracle RAC Database server

Oracle RAC database uses service-name instead of service-id. Hence, you would need a connection string formatted for using service-name.

Lets say your non-RAC server was hosted on "abc.xyz.com" @ port 1521 and your SID is oradb01, then your connection string would have been :
  jdbc:oracle:thin:@abc.xyz.com:1521:oradb01

On a oracle RAC database server with service-name as oradb01, your connection string would be :
 jdbc:oracle:thin:@//abc.xyz.com:1521/oradb01

Note : I assume you are using Oracle thin driver for Java.