I Came,I Learned,I Experienced....
Welcome To My Little Corner Of The IT Virtual World
Thursday, March 26, 2020
Thursday, November 21, 2019
Fetching Task PendingWith ( User / Team ) - BPM
function checkEmptyString(x) {
return (null == x || typeof x == 'undefined' || undefined == x || 'null' == x || '' == x);
}
function getUserInfo(employeeId) {
var userInfo = employeeId;
if(null != employeeId && typeof employeeId != 'undefined' && undefined != employeeId) {
var user = tw.system.org.findUserByName(employeeId);
if(user != null) {
userInfo = user.fullName + " (" + employeeId + ")";
}
}
return userInfo;
}
var pendingWith = "";
if( !checkEmptyString(processId) ) {
try {
var search = new TWSearch();
search.organizedBy = TWSearch.OrganizeByTypes.Task;
var searchColumnList = new Array();
var conditionList = new Array();
// Task #
var searchColumn = new TWSearchColumn();
searchColumn.name = TWSearchColumn.TaskColumns.ID;
searchColumn.type = TWSearchColumn.Types.Task;
searchColumnList.push(searchColumn);
// Task - AssignedToRole
var searchColumn = new TWSearchColumn();
searchColumn.name = TWSearchColumn.TaskColumns.AssignedToRole;
searchColumn.type = TWSearchColumn.Types.Task;
searchColumnList.push(searchColumn);
// Task - AssignedToUser
var searchColumn = new TWSearchColumn();
searchColumn.name = TWSearchColumn.TaskColumns.AssignedToUser;
searchColumn.type = TWSearchColumn.Types.Task;
searchColumnList.push(searchColumn);
// Add Conditions
// Task - Status Equals Received
var searchColumn = new TWSearchColumn();
searchColumn.name = TWSearchColumn.TaskColumns.Status;
searchColumn.type = TWSearchColumn.Types.Task;
searchColumnList.push(searchColumn);
var condition = new TWSearchCondition();
condition.column = searchColumn;
condition.operator = TWSearchCondition.Operations.Equals;
condition.value = TWTask.Statuses.Received;
conditionList.push(condition);
// Process - Status Equals Active
var searchColumn = new TWSearchColumn();
searchColumn.name = TWSearchColumn.ProcessInstanceColumns.Status;
searchColumn.type = TWSearchColumn.Types.ProcessInstance;
searchColumnList.push(searchColumn);
var condition = new TWSearchCondition();
condition.column = searchColumn;
condition.operator = TWSearchCondition.Operations.Equals;
condition.value = TWProcessInstance.Statuses.Active;
conditionList.push(condition);
// Condition with Process Instance #
var searchColumn = new TWSearchColumn();
searchColumn.name = TWSearchColumn.ProcessInstanceColumns.ID;
searchColumn.type = TWSearchColumn.Types.ProcessInstance;
searchColumnList.push(searchColumn);
var condition = new TWSearchCondition();
condition.column = searchColumn;
condition.operator = TWSearchCondition.Operations.Equals;
condition.value = processId;
conditionList.push(condition);
search.columns = searchColumnList;
search.conditions = conditionList;
var results = search.execute();
if ( results && results.rows && results.rows.length > 0 ) {
for ( var i = 0; i < results.rows.length; i++ ) {
var values = results.rows[i].values;
for ( var j = 0; j < values.length; j++ ) {
var key = searchColumnList[j].type + "_" + searchColumnList[j].name;
if( key == 'Task_AssignedToRole' && !checkEmptyString(values[j]) ) {
pendingWith = (checkEmptyString(pendingWith)) ? (values[j] + " Team") : (pendingWith + ", " + values[j] + " Team");
}
else if( key == 'Task_AssignedToUser' && !checkEmptyString(values[j]) ) {
pendingWith = (checkEmptyString(pendingWith)) ? getUserInfo(values[j]) : (pendingWith + ", " + getUserInfo(values[j]));
}
}
}
}
}
catch ( Exception ) {
log.error("Process App : " + tw.system.model.processApp.acronym + ", Error while looking up pending with for Process # " + processId);
if( tw.system.error )
log.error("Error Details : " + tw.system.error.toString(false));
}
return pendingWith;
}
return (null == x || typeof x == 'undefined' || undefined == x || 'null' == x || '' == x);
}
function getUserInfo(employeeId) {
var userInfo = employeeId;
if(null != employeeId && typeof employeeId != 'undefined' && undefined != employeeId) {
var user = tw.system.org.findUserByName(employeeId);
if(user != null) {
userInfo = user.fullName + " (" + employeeId + ")";
}
}
return userInfo;
}
var pendingWith = "";
if( !checkEmptyString(processId) ) {
try {
var search = new TWSearch();
search.organizedBy = TWSearch.OrganizeByTypes.Task;
var searchColumnList = new Array();
var conditionList = new Array();
// Task #
var searchColumn = new TWSearchColumn();
searchColumn.name = TWSearchColumn.TaskColumns.ID;
searchColumn.type = TWSearchColumn.Types.Task;
searchColumnList.push(searchColumn);
// Task - AssignedToRole
var searchColumn = new TWSearchColumn();
searchColumn.name = TWSearchColumn.TaskColumns.AssignedToRole;
searchColumn.type = TWSearchColumn.Types.Task;
searchColumnList.push(searchColumn);
// Task - AssignedToUser
var searchColumn = new TWSearchColumn();
searchColumn.name = TWSearchColumn.TaskColumns.AssignedToUser;
searchColumn.type = TWSearchColumn.Types.Task;
searchColumnList.push(searchColumn);
// Add Conditions
// Task - Status Equals Received
var searchColumn = new TWSearchColumn();
searchColumn.name = TWSearchColumn.TaskColumns.Status;
searchColumn.type = TWSearchColumn.Types.Task;
searchColumnList.push(searchColumn);
var condition = new TWSearchCondition();
condition.column = searchColumn;
condition.operator = TWSearchCondition.Operations.Equals;
condition.value = TWTask.Statuses.Received;
conditionList.push(condition);
// Process - Status Equals Active
var searchColumn = new TWSearchColumn();
searchColumn.name = TWSearchColumn.ProcessInstanceColumns.Status;
searchColumn.type = TWSearchColumn.Types.ProcessInstance;
searchColumnList.push(searchColumn);
var condition = new TWSearchCondition();
condition.column = searchColumn;
condition.operator = TWSearchCondition.Operations.Equals;
condition.value = TWProcessInstance.Statuses.Active;
conditionList.push(condition);
// Condition with Process Instance #
var searchColumn = new TWSearchColumn();
searchColumn.name = TWSearchColumn.ProcessInstanceColumns.ID;
searchColumn.type = TWSearchColumn.Types.ProcessInstance;
searchColumnList.push(searchColumn);
var condition = new TWSearchCondition();
condition.column = searchColumn;
condition.operator = TWSearchCondition.Operations.Equals;
condition.value = processId;
conditionList.push(condition);
search.columns = searchColumnList;
search.conditions = conditionList;
var results = search.execute();
if ( results && results.rows && results.rows.length > 0 ) {
for ( var i = 0; i < results.rows.length; i++ ) {
var values = results.rows[i].values;
for ( var j = 0; j < values.length; j++ ) {
var key = searchColumnList[j].type + "_" + searchColumnList[j].name;
if( key == 'Task_AssignedToRole' && !checkEmptyString(values[j]) ) {
pendingWith = (checkEmptyString(pendingWith)) ? (values[j] + " Team") : (pendingWith + ", " + values[j] + " Team");
}
else if( key == 'Task_AssignedToUser' && !checkEmptyString(values[j]) ) {
pendingWith = (checkEmptyString(pendingWith)) ? getUserInfo(values[j]) : (pendingWith + ", " + getUserInfo(values[j]));
}
}
}
}
}
catch ( Exception ) {
log.error("Process App : " + tw.system.model.processApp.acronym + ", Error while looking up pending with for Process # " + processId);
if( tw.system.error )
log.error("Error Details : " + tw.system.error.toString(false));
}
return pendingWith;
}
Wednesday, June 22, 2016
Limitations in IBM BPM document store
There are some limitations in administering the IBM BPM document store. In most situations, you can successfully work around these limitations.
The following list contains some known limitations of the IBM BPM document store:
- The document store must be enabled at configuration time for an IBM BPM installation that is configured to use DB2 on z/OS
- The document store is only available when Federated Repositories is used as the user registry
- An exception occurs when you are logging or tracing document store operations
- Defining too many properties can exceed the table row size limit
These limitations are described in the following sections.
Although the IBM BPM document store is not available in these situations, you can continue to work with your document attachments in the IBM BPM database. Alternatively, you can configure an external Enterprise Content Manager (ECM) system for storing your documents. In either situation, the legacy document APIs continue to be used. Any ECM operations that specify the IBM BPM document store as a server will fail.
The document store must be enabled at configuration time for an IBM BPM installation that is configured to use DB2 on z/OS
At configuration time, you decide whether you want to enable the IBM BPM document store. After you configure the IBM BPM document store, you cannot dynamically enable or disable the IBM BPM document store.The document store is only available when Federated Repositories is used as the user registry
The IBM BPM document store is only available when Business Process Manager is configured to use Federated Repositories as the user registry. If you are using a different user registry configuration, disable the autostart mechanism of the IBM_BPM_DocumentStore application.
To use the IBM BPM document store with your LDAP users and groups, configure LDAP as a repository in Federated Repositories instead of using stand-alone LDAP as the user registry. Additional information is found in the topic "Configuring external security providers."
An exception occurs when you are logging or tracing document store operations
When the server is started or the IBM BPM document store commands maintainDocumentStoreTrace or updateDocumentStoreApp are run, the following SystemErr exception might be logged:[3/19/13 23:31:12:548 PDT] 00000084 SystemErr R log4j:WARN No appenders could be found for logger (filenet_error.api.com.filenet.apiimpl.util.ConfigValueLookup).
[3/19/13 23:31:12:548 PDT] 00000084 SystemErr R log4j:WARN Please initialize the log4j system properly.
[3/19/13 23:31:14:482 PDT] 00000084 SystemErr R log4j:WARN Configuring default logging to the file E:\IBM\WebSphere\AppServer\profiles\Custom01\FileNet\
testDE1.AppCluster.WIN-E6GDL89KDJDNode01.0\p8_server_error.log
[3/19/13 23:31:49:536 PDT] 00000084 SystemErr R log4j:WARN No appenders could be found for logger (filenet_error.api.com.filenet.apiimpl.util.ConfigValueLookup).
[3/19/13 23:31:49:536 PDT] 00000084 SystemErr R log4j:WARN Please initialize the log4j system properly.
[3/19/13 23:33:25:867 PDT] 00000108 SystemErr R SLF4J: Class path contains multiple SLF4J bindings.
The exception is caused by the tracing and logging mechanism that is used with the IBM BPM document store. The exception does not result in any operational problems and can be safely ignored.Defining too many properties can exceed the table row size limit
Over time, the number of properties that are defined for an application can exceed the table row size limit. You can delete unused properties by completing the actions that are described in Cleaning up the IBM BPM document store.
Subscribe to:
Posts (Atom)