Mar 16, 2015

custom participants script IBM Tivoli workflow


IBM Tivoli Approval Node with custom participants script 

Its about the previous case, that we need to modify all approver roles  each department on http://febru.soluvas.com/2015/02/implementation-complex-ibm-tivoli.html, another alternatives to do that is use custom participants field on approval workflow.

First, you need to define approval role pattern for each departments, the its automatically lookup the approval role and member of its role will fetch as approval. On the script, its shown like this :

var roleSearch = new RoleSearch();
var roleResult = roleSearch.searchByName("RolePatternAsYouWantHere");

if (roleResult.length < 1) {
    roleResult = roleSearch.searchByName("AdministratorRoleAsDefaultApproval");
}

approvaldn = roleResult[0].dn;
var myFilter = "(&(erparent=" + container.get().dn + ")(erroles=" + approvaldn + "))";
var personSearch = new PersonSearch();
var personResult = personSearch.searchByFilter("person", myFilter, 2);
var myParticipants = new Array();
for (i=0; i < personResult.length; i++) {
myCustomParicipants[i] = new Participant(ParticipantType.USER, personResult[i].dn);
}
return myCustomParticipants;


on complex IBM Tivoli workflow implementations, you need to make your own pattern of approval roles rather than make it one by one, since customer company has many departments with many roles.

custom participants script itim workflow

the idea is almost the same with Stephen 
More reference here or here  

Note : If you use ISPM VA, there are some limitations, includes can not use custom adapter or configure custom extension node, see more detail here

.

IBM Tivoli Approval Node with custom participants script 

Its about the previous case, that we need to modify all approver roles  each department on http://febru.soluvas.com/2015/02/implementation-complex-ibm-tivoli.html, another alternatives to do that is use custom participants field on approval workflow.

First, you need to define approval role pattern for each departments, the its automatically lookup the approval role and member of its role will fetch as approval. On the script, its shown like this :

var roleSearch = new RoleSearch();
var roleResult = roleSearch.searchByName("RolePatternAsYouWantHere");

if (roleResult.length < 1) {
    roleResult = roleSearch.searchByName("AdministratorRoleAsDefaultApproval");
}

approvaldn = roleResult[0].dn;
var myFilter = "(&(erparent=" + container.get().dn + ")(erroles=" + approvaldn + "))";
var personSearch = new PersonSearch();
var personResult = personSearch.searchByFilter("person", myFilter, 2);
var myParticipants = new Array();
for (i=0; i < personResult.length; i++) {
myCustomParicipants[i] = new Participant(ParticipantType.USER, personResult[i].dn);
}
return myCustomParticipants;


on complex IBM Tivoli workflow implementations, you need to make your own pattern of approval roles rather than make it one by one, since customer company has many departments with many roles.

custom participants script itim workflow

the idea is almost the same with Stephen 
More reference here or here  

Note : If you use ISPM VA, there are some limitations, includes can not use custom adapter or configure custom extension node, see more detail here

No comments:

Post a Comment