Reltio Connect

 View Only
  • 1.  Setting a candidate for assignment when customizing in Java

    Posted 02-11-2022 10:58
    Hi folks,

    I'm back and on the next leg of my Reltio Workflow journey.  This time I'm digging into the Java.

    Shout out to the awesome work by @Joel Snipes on the recent workflow customization webinar!

    I have my local workflow environment all setup and running well.  I can start a workflow process and it executes the java locally and I can see the logging statements so I know things are going where they need to.  Now I'm working on the implementation of conditionally reassigning a task to a different role reviewer group.  

    I'm creating a start event listener for my potential match process and I want to assign a role reviewer so that the next available user in that role reviewer group that is available will get assigned.  

    My first effort...attempting to assign the text string of the role to the task.  it looked too easy, I know but I knew had to try it...
    assignee = "ROLE_REVIEWER_DS_CUSTOMER";
    taskService.assignTask(task, assignee);

    Results....not what I was going for...  It put the exact text of the role as the assigned to.  What I'm looking for is to tell it I want it to go to the Customer role and assign someone from there....in the same manner as would happen when the candidate group is hard-coded into the process...except here I want to switch between different roles conditionally (dynamically switching data steward groups based on characteristics of the party entity) - so the first step


    So I was thinking that I need to create/populate a Candidates object and set it somewhere in the Task and then somehow that would do the magic for me.  However, I can't seem to find any methods on the TaskService or Task java classes that would do something like that.  I'm thinking there must be something else somewhere else that will work for me...but I haven't a clue. 

    Hoping someone here can help nudge me in the right direction.  Thanks!





    ​​

    ------------------------------
    Michelle Popovits
    Empire Life
    ------------------------------


  • 2.  RE: Setting a candidate for assignment when customizing in Java

    Reltio Employee
    Posted 02-16-2022 13:55

    Hi Michelle,

    It looks like  you are on the right path, it's just that you passed a role in a method looking for a user. 

    The good news is, if you are just looking to assign the task to the least busy data steward with that role, that is the default behavior and can be configured by setting that role to the candidate groups in the BPMN modeler.

    To change the default behavior, you will need to implement the TaskService interface found here. 

    You can see an example of the taskService choosing an assignee in line 24 of the TaskStartEventListener.java
    If you choose to implement your own taskService that will end up being tricky. I am unable to find an example of the taskService interface implemented and I have never tried to do so myself. 



    ------------------------------
    Joel Snipes
    ------------------------------



  • 3.  RE: Setting a candidate for assignment when customizing in Java

    Posted 02-16-2022 14:08
    Thanks for the response Joel.  If I understand your response, it appears that you are not aware of a way to assign a candidate group dynamically.  I saw your email to Chris J. and hopefully he'll have a suggestion.


    ------------------------------
    Michelle Popovits
    Empire Life
    ------------------------------