BPM, Workflow, and Case

 View Only
  • 1.  Management/delete of ad hoc group

    Posted Fri March 27, 2020 09:34 AM
    Hi all,

    for some reason a wrong ad hoc group was created with no members instead of one member was created. Normally it works. If the same user request the same ad hoc group, the already existing group with no member is returned.

    Now I have two questions:

    1. How can it be, that such group was created? Below is the filter implementation:
    tw.local.filteredTeam = tw.local.originalTeam;
    tw.local.filteredTeam.name = "LOCAL";
    tw.local.filteredTeam.members = new tw.object.listOf.String();
    tw.local.filteredTeam.members[0] = tw.local.userId;

    2. How can we delete or management it? Following request does not work anymore:
    {{IBM_REST_URL}}/rest/bpm/wle/v1/group/{{groupId}}?action=addMember&user={{userKey}}
    {
        "status""error",
        "Data": {
            "status""error",
            "exceptionType""com.ibm.bpm.wle.api.GroupMembershipUpdateException",
            "errorNumber""CWTBG0633E",
            "errorMessage""CWTBG0633E: Updating the group membership failed for the following reason 'CWLLG3237E: Users and groups can neither be added nor deleted from an ad hoc group.'.",
            "errorMessageParameters": [
                "CWLLG3237E: Users and groups can neither be added nor deleted from an ad hoc group."
            ],
            "responses"null,
            "errorData"null
        }
    }

    Thanks for any advice?

    BR Bernd

    ------------------------------
    Bernd Varga
    ------------------------------


  • 2.  RE: Management/delete of ad hoc group

    Posted Mon March 30, 2020 09:21 AM
    Hi,

    1) I do not know. I would check the service caching and make sure tw.local.userId is set and correct.

    2) Have you upgraded BPM recently? I remember that you could alter members of ad-hoc group. But you cannot anymore:
    "Group membership for a task's team that is assigned using a team filter service is fixed at the time of task creation and cannot be changed."
    https://www.ibm.com/support/knowledgecenter/en/SS8JB4/com.ibm.wbpm.wle.editor.doc/topics/team_filter_service.html
    Compare it with the same documentation page for older versions of BPM. Few years back there was no such restriction.

    ------------------------------
    Jozef Gandžala
    ------------------------------



  • 3.  RE: Management/delete of ad hoc group

    Posted Wed April 01, 2020 02:04 AM

    Hi Jozef,

    thanks for you reply.

    ad 1) I don't know how to check the service cache? Can you provide my any hint?
    Maybe we had in the past some wrong implementation, where the userId was not filled. Current the userId should always contain a correct value. We only have this issue for a single test case. All other are working without any issue.

    ad 2) Yes, I also found the same information. From administration point of view, there must be a possibility to remove, manipulate or disable wrong "ad hoc groups". If it is not possible on API-level, maybe we can change something in the database? Maybe someone have experience with that?
    Otherwise we have to introduce new users, but this should only be the last possible workaround.



    ------------------------------
    Bernd Varga
    ------------------------------



  • 4.  RE: Management/delete of ad hoc group

    Posted Wed April 01, 2020 04:40 AM
    Hello,

    I allways recommend to avoid usage of team filters, unless you are sure that Team Performance dashboard is not required and you will not need add/remove users from that created ad-hoc team. In general, if you want to make the member users of the team amendable you should dynamically set groups, and not users there.

    If you really need to amend some ad-hoc team, I suggest contacting IBM support. They might provide some database script for this. I do not recommend for you to amend database on your own, especially in production environments.

    ------------------------------
    Valentinas Gylys
    ------------------------------



  • 5.  RE: Management/delete of ad hoc group

    IBM Champion
    Posted Wed April 01, 2020 05:24 AM
    IBM documentation also says the same - https://www.ibm.com/support/knowledgecenter/SS8JB4/com.ibm.wbpm.ref.doc/CWLLG3237E.html


    ------------------------------
    AtanuRoy
    IBM Digital Business Automation Expert
    Barclays
    ------------------------------



  • 6.  RE: Management/delete of ad hoc group

    Posted Wed April 01, 2020 11:02 AM
    This limitation is documented in the ReST API Documentation found here.  That notes that this is a change from the behavior starting with 8.5.7 fix pack 2016-9.  I know why they did it, even if there were other ways to solve the problem.  The data below is based on my testing against previous versions of the product to understand how team filters etc. worked.  Some of the theories about the technical specifics are my own and do not necessarily reflect the real code.

    When Team Filter services first came out, if I remember correctly, there was a problem.  If I used a team filter service 18 times, and it returned the same result "Andrew and Bernd" each time, we'd wind up with 18 groups in the DB, each having that membership.  The efficiency of the  query "Get all of Andrew's tasks"  degrades as the number of groups I am in increases (or did back then).  So a request was made "Please reuse the same team if the result of the filter is the same".  

    The above requirement worked, in that, if the team filter service returned the same membership, the previously created group was used.  However it appears the the specifics of this was implemented using some sort of Hashing.  At a guess I think it was some combination of the filter that was used and an ordered list of group members.  The problem (I'm guessing) is that while this solved the requested case, being "Tricksy" in solving this meant there were use cases not considered.

    Specifically in my testing, if we added Atanu to our group using the API, he would, as you expected, see the task that were previously only assigned to Andrew and Bernd.  However, there are 2 odd cases here.  I'm guess it is because the API calls did not update the Hash.

    1. If the team filter service is called and returns "Andrew, Bernd, Atanu" a new group will be created.
    2. If the team filter service returns "Andrew and Bernd" again, it will use the previous team , that now has Atanu in it, which isn't the right group based on the filter. 

    Rather than address these problems it seems like they simply removed the ability to get into that state, even though this causes the problem you have seen.  One option for doing the reassignment would be as follows -

    1. Create a service flow.
    2. In the service flow, call the team filter service and get the team you want to assign the task to.
    3. Drag in an activity and set it to "Modify Task"
    4. Use the data from the team to provide the value required.

    I left #4 as vague as the documentation for the widget says to use the "user or group name" and group names for filtered teams are really weird, so you might have to experiment a little.

    If you need to do this from another system, surface this as an API for the use of that system.

    I know it sucks that the functionality was changed without much fan fare, but hopefully the above helps you get the desired outcome.





    ------------------------------
    Andrew Paier
    ------------------------------