Cordys - Dispatch Algorithm - Tasks assignments

294 Views Asked by At

I have written a very basic Dispatch Algorithm (DA) and assigned the same to my BPM. The BPM itself is having a singly activity. When i run the BPM it has to assign the tasks to users mentioned in the DA.

To make sure I have pointed the DA.Jar location is mentioned in the CLASSPATH under JRE Configuration of the Notification service container.

I have also mentioned few logger messages in the DA, Unfortunately I couldn't see any of the log messages in my notification log file. In the notification container i have enabled all logging settings. I have enabled the Logger Severities to level DEBUG.

How do I know my DA is triggered when my BPM is invoked ? What am I doing wrong here

public class ACustomDispatcher implements CustomTaskDispatcher {

    private static CordysLogger logger = CordysLogger.getCordysLogger(ACustomDispatcher .class);

    public Collection<IAssignment> getAssignments(TaskInformation arg0) {

        String userDN =  "cn=Test.User1,cn=organizational users,o=CorpDev,cn=cordys,cn=defaultInst,o=CORP.LOCAL";
        String userDN2 = "cn=Test.User1,cn=organizational users,o=CorpDev,cn=cordys,cn=defaultInst,o=CORP.LOCAL";

        if(logger.isDebugEnabled()) {
              logger.debug(userDN2);
              logger.debug(userDN);
        }

        ArrayList<IAssignment> assignments = new ArrayList<IAssignment>();

        IAssignment assignment = new Assignment(userDN, AssignmentType.user);
        assignments.add(assignment);

        IAssignment assignment2 = new Assignment(userDN2, AssignmentType.user);
        assignments.add(assignment2);

        if(logger.isDebugEnabled()) {
              logger.debug( " TEST MSG 3"  +  assignments.indexOf(0));
              logger.debug( " TEST MSG 4"  +     assignments.indexOf(1)); 
        }

        return assignments;
    }   
}
1

There are 1 best solutions below

0
On

It worked reasons are

The jar changes were not overwritten by the updated java code and a restart to the Notification service container is required to take the changes effect.