Monday, January 27, 2014

How to get Snapshot ID of the current context

Use the call "tw.system.model.processAppSnapshot.id" to fetch the ID of the currently execution snapshot.

Wednesday, January 15, 2014

BPM 7.5 PO Type Codes


CODE TABLE NAME Common Name 1 Common Name 2
1  "LSW_PROCESS"  "process"  "Service"
2  "LSW_IC"  "integrationComponent"  "IC"
3  "LSW_CONNECTOR"  "connector"  "Connector"
4  "LSW_UCA"  "underCoverAgent"  "UCA"
7  "LSW_WEB_SERVICE"  "webService"  "WebService"
8  null  "webScript"  "WebScript"
11  "LSW_REPORT"  "report"  "Report"
12  "LSW_CLASS"  "twClass"  "VariableType"
13  "LSW_SCBD"  "scoreboard"  "Scoreboard"
14  "LSW_TRACKING_GROUP"  "trackingGroup"  "TrackingGroup"
15  "LSW_TIMING_INTERVAL"  "timingInterval"  "TimingInterval"
16  "LSW_TRACKING_POINT"    
17  "LSW_TRACKED_VARIABLE"    
20  "LSW_LAYOUT"  "layout"  "Layout"
21  "LSW_EPV"  "epv"  "EPV"
22  null  "globalVariable"  "GlobalVariable"
24  "LSW_PARTICIPANT"  "participant"  "Participant"
25  "LSW_BPD"  "bpd"  "BPD"
30  "LSW_PRIORITY"  "priority"  "Priority"
31  null  "calendar"  "Calendar"
40  null  "customStatus"  "CustomStatus"
42  null  "alertSeverity"  "AlertSeverity"
43  "LSW_INFOPATH_FORM"  "infoPathForm"  "InfoPathForm"
47  "LSW_SLA"  "sla"  "SLA"
49  "LSW_METRIC"  "metric"  "Metric"
50  "LSW_RESOURCE_BUNDLE_GROUP"  "resourceBundleGroup"  "ResourceBundleGroup"
51  "LSW_USER_ATTRIBUTE_DEF"  "userAttributeDefinition"  "UserAttributeDefinition"
52  "LSW_SIM_SCENARIO"  "simulationScenario"  "SimulationScenario"
53  "LSW_HIST_SCENARIO"  "historicalScenario"  "HistoricalScenario"
54  "LSW_ORG_CHART"  "orgChart"  "OrgChart"
60  "LSW_EXTERNAL_ACTIVITY"  "externalActivity"  "ExternalActivity"
61  "LSW_MANAGED_ASSET"  "managedAsset"  "ManagedAsset"
62  "LSW_ENV_VAR_SET"  "environmentVariableSet"  "EnvironmentVariableSet"
63  "LSW_PROJECT_DEFAULTS"  "projectDefaults"  "ProjectDefaults"
2001  null  "alertType"  "AlertType"
2005  "LSW_BREAKPOINT"    
2006  "LSW_BPD_EVENT"    
2007  "LSW_BPD_PARAMETER"    
2013  "LSW_EPV_VAR"    
2014  "LSW_EPV_VAR_VALUE"    
2015  "LSW_FAVORITE"    
2018  "LSW_IC_INPUT_PROPERTY"    
2019  "LSW_IC_OUTPUT_PROPERTY"    
2020  "LSW_TIMING_INTERVAL_BOUND"    
2022  "LSW_LAUNCHER"    
2023  "LSW_LAYOUT_PARAM"    
2025  "LSW_PROCESS_ITEM"    
2027  "LSW_PROCESS_LINK"    
2028  "LSW_PROCESS_LABEL"    
2029  "LSW_PROCESS_ITEM_PRE_POST"    
2030  "LSW_REPORT_PAGE"    
2031  "LSW_REPORT_CHART"    
2032  "LSW_REPORT_DATASOURCE"    
2033  "LSW_REPORT_DATASOURCE_IC_LINK"    
2034  "LSW_REPORT_DS_LAYOUT_LINK"    
2035  "LSW_REPORT_VARIABLES"    
2036  "LSW_REPORT_EPV_LINK"    
2037  "LSW_REPORT_TG_LINK"    
2038  "LSW_RESOURCE_BUNDLE"    
2039  "LSW_RESOURCE_BUNDLE_KEY"    
2040  "LSW_SAVED_SEARCHES"    
2041  "LSW_SCBD_RPT_LINK"    
2044  "LSW_UCA_SYNC_QUEUE"    
2045  "LSW_UCA_BLACKOUT"    
2046  "LSW_UCA_PARM"    
2047  "LSW_USR"    
2048  "LSW_USR_XREF"    
2049  "LSW_USR_ATTR"    
2050  "LSW_USER_ATTR_DEF_VALUES"    
2052  "LSW_WEB_SERVICE_OP"    
2054  "LSW_PARAMETER_MAPPING"    
2055  "LSW_PROCESS_PARAMETER"    
2056  "LSW_PROCESS_VARIABLE"    
2058  "LSW_EPV_PROCESS_LINK"    
2059  "LSW_RESOURCE_PROCESS_LINK"    
2060  "LSW_EXTACT_PARAMETER"    
2061  "LSW_EXTACT_PROPERTY"    
2063  "LSW_BRANCH"    
2064  "LSW_SNAPSHOT"    
2065  "LSW_DEPLOYMENT"    
2066  "LSW_PROJECT" "Process App" "Process App"
2068  "LSW_SERVER"    
2069  "LSW_PROJECT_DEPENDENCY" "toolkit" "toolkit"
2072  "LSW_BPD_INSTANCE"    
2073  "LSW_BPD_INSTANCE_DATA"    
2075  "LSW_USR_GRP_XREF"    
2076  "LSW_RELEASE"    
2077  "LSW_ENV_VAR_VAL"    
2078  "LSW_TASK"    
2079  "LSW_USER_FAVORITE"    
2080  "LSW_FILE"    
2081  "LSW_TASK_NARR"    
2082  "LSW_TASK_ADDR"    
2084  "LSW_TASK_EXECUTION_CONTEXT"    
2085  "LSW_TASK_IPF_DATA"    
2086  "LSW_TASK_EXTACT_DATA"    
2087  "LSW_USR_ASSUME"    
2089  "LSW_BPD_NOTIFICATION"    
2090  "LSW_DEP_PATH"    
2091  "LSW_PO_REFERENCE"    
2092  "LSW_ENV_VAR_DEFAULT"  "environmentDefault"  "EnvironmentDefault"
2093  "LSW_ENV_TYPE"    
2094  "LSW_ENV_VAR"  "environmentVariable"  "EnvironmentVariable"
2095  "LSW_RT_REFERENCE"    
2096  "LSW_REPOSITORY_HISTORY"    
2097  "LSW_TIME_PERIOD"    
2098  "LSW_TIME_SCHEDULE"    
2099  "LSW_HOLIDAY_SCHEDULE"    
2100  "LSW_ACL_ENTRY"    
2101  "LSW_SMART_FOLDER"  "SmartFolder"  null
2102  "LSW_REPORT_DATASOURCE_SRV_LINK"    
2103  "LSW_INSTALLATION"    
2104  "LSW_BLUEPRINT_SUBSCRIPTION"    
2105  "LSW_REPORT_RBG_LINK"    
2106  "LSW_ENV_VAR_TYPE"    
2107  "LSW_SERVER_CAPABILITY"    
2108  "LSW_CAPABILITY_TYPE"    
6001  "BPM_CONTRIBUTION"  "contribution"  "Contribution"
6002  "BPM_CTRB_PROPERTY"    
6004  "BPM_CTRB_DEPENDENCY"    
6003  "BPM_ARTIFACT"  "artifact"  "Artifact"
6005  "BPM_PROC_ARTIFACT_REF"    
6006  "BPM_CLS_ARTIFACT_REF"    
6007  "BPM_BPD_ARTIFACT_REF"    
6008  "BPM_MON_MODEL_DATA"    

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.