Topic
  • 5 replies
  • Latest Post - ‏2013-07-30T11:41:56Z by kolban
Shukdeb
Shukdeb
18 Posts

Pinned topic Unable to assign/reassign claimed task by another user.

‏2013-06-27T07:28:20Z |

Is it possible to get access all tasks using admin/manager and to assign/reassign a task which is already claimed by a another user?

Problem Statement:
I have a Group as CMIP in Portal in IBM BPM version 8.0.1.1. There is a user as "developer" and "tester" in CMIP group.User "developer" has claimed a task. Now I want to release that claimed task from "developer" user and assign to another user "tester" using admin user.

Is it possible?

  • AndrewPaier
    AndrewPaier
    832 Posts

    Re: Unable to assign/reassign claimed task by another user.

    ‏2013-07-02T02:21:34Z  

    It is possible to do this sort of thing via the Javascript API, but not via the REST API, nor via the Portal due to security concerns.  Since the JS API can only be called if you choose to expose a service that is using it, it has no security restrictions.

    Andrew Paier  |  Director  |  BP3 Global, Inc.
    BP3 Global's Website  |  Twitter  |  Linkedin  |  Google+  |  Blogs

  • Shukdeb
    Shukdeb
    18 Posts

    Re: Unable to assign/reassign claimed task by another user.

    ‏2013-07-02T06:38:39Z  

    It is possible to do this sort of thing via the Javascript API, but not via the REST API, nor via the Portal due to security concerns.  Since the JS API can only be called if you choose to expose a service that is using it, it has no security restrictions.

    Andrew Paier  |  Director  |  BP3 Global, Inc.
    BP3 Global's Website  |  Twitter  |  Linkedin  |  Google+  |  Blogs

    Thanks for your reply.

    Can you provide some piece of code related to this Javascript API for this requirement?

  • AndrewPaier
    AndrewPaier
    832 Posts

    Re: Unable to assign/reassign claimed task by another user.

    ‏2013-07-02T22:42:41Z  
    • Shukdeb
    • ‏2013-07-02T06:38:39Z

    Thanks for your reply.

    Can you provide some piece of code related to this Javascript API for this requirement?

    The base JS API documentation is here.  The TWTask object supports a number of "reassignTo" calls. 

    Andrew Paier  |  Director  |  BP3 Global, Inc.
    BP3 Global's Website  |  Twitter  |  Linkedin  |  Google+  |  Blogsn

  • Shukdeb
    Shukdeb
    18 Posts

    Re: Unable to assign/reassign claimed task by another user.

    ‏2013-07-30T10:16:35Z  

    Hi,

    We are facing bad performance on using TWSearch API.

    We have used this API to fetch task list assigned to group or user. Please see the code below,

    /*

    var col1 = new TWSearchColumn();
    col1.name = "serviceId";
    col1.type = TWSearchColumn.Types.BusinessData;

    var col2 = new TWSearchColumn();
    col2.name = TWSearchColumn.ProcessInstanceColumns.ID;
    col2.type = TWSearchColumn.Types.ProcessInstance;

    var col3 = new TWSearchColumn();
    col3.name = "originatorName";
    col3.type = TWSearchColumn.Types.BusinessData;

    var col4 = new TWSearchColumn();
    col4.name = "originatorGroup";
    col4.type = TWSearchColumn.Types.BusinessData;

    var col5 = new TWSearchColumn();
    col5.name = "orderId";
    col5.type = TWSearchColumn.Types.BusinessData;

    var col6 = new TWSearchColumn();
    col6.name = "orderStatus";
    col6.type = TWSearchColumn.Types.BusinessData;

     

    var searchCondition = new TWSearchCondition();
    searchCondition.column = new TWSearchColumn();
    searchCondition.column.name = "Name";
    searchCondition.column.type = TWSearchColumn.Types.Process;
        
    searchCondition.operator = TWSearchCondition.Operations.Equals
    searchCondition.value = tw.local.processName;

     

    var order1 = new TWSearchOrdering();
    order1.column = col14;
    order1.order = TWSearchOrdering.Orders.Descending;

    var search = new TWSearch();

    search.organizedBy = TWSearch.OrganizeByTypes.Task;

    search.conditions = new Array(searchCondition);
    search.orderBy = new Array(order1);
       
    var results = search.execute();
    */

    After that I have a feature to reassigned claimed task using below code,

    tw.system.findTaskByID(taskId).reassignTo(usersOrRole);

    Also we found that there is some APAR as below link, is there any work around available for this,

    http://www-01.ibm.com/support/docview.wss?uid=swg1IC74827

     

  • kolban
    kolban
    3322 Posts

    Re: Unable to assign/reassign claimed task by another user.

    ‏2013-07-30T11:41:56Z  
    • Shukdeb
    • ‏2013-07-30T10:16:35Z

    Hi,

    We are facing bad performance on using TWSearch API.

    We have used this API to fetch task list assigned to group or user. Please see the code below,

    /*

    var col1 = new TWSearchColumn();
    col1.name = "serviceId";
    col1.type = TWSearchColumn.Types.BusinessData;

    var col2 = new TWSearchColumn();
    col2.name = TWSearchColumn.ProcessInstanceColumns.ID;
    col2.type = TWSearchColumn.Types.ProcessInstance;

    var col3 = new TWSearchColumn();
    col3.name = "originatorName";
    col3.type = TWSearchColumn.Types.BusinessData;

    var col4 = new TWSearchColumn();
    col4.name = "originatorGroup";
    col4.type = TWSearchColumn.Types.BusinessData;

    var col5 = new TWSearchColumn();
    col5.name = "orderId";
    col5.type = TWSearchColumn.Types.BusinessData;

    var col6 = new TWSearchColumn();
    col6.name = "orderStatus";
    col6.type = TWSearchColumn.Types.BusinessData;

     

    var searchCondition = new TWSearchCondition();
    searchCondition.column = new TWSearchColumn();
    searchCondition.column.name = "Name";
    searchCondition.column.type = TWSearchColumn.Types.Process;
        
    searchCondition.operator = TWSearchCondition.Operations.Equals
    searchCondition.value = tw.local.processName;

     

    var order1 = new TWSearchOrdering();
    order1.column = col14;
    order1.order = TWSearchOrdering.Orders.Descending;

    var search = new TWSearch();

    search.organizedBy = TWSearch.OrganizeByTypes.Task;

    search.conditions = new Array(searchCondition);
    search.orderBy = new Array(order1);
       
    var results = search.execute();
    */

    After that I have a feature to reassigned claimed task using below code,

    tw.system.findTaskByID(taskId).reassignTo(usersOrRole);

    Also we found that there is some APAR as below link, is there any work around available for this,

    http://www-01.ibm.com/support/docview.wss?uid=swg1IC74827

     

    Duplicate question being addressed here:

    https://www.ibm.com/developerworks/community/forums/html/topic?id=9ed4c841-814a-4b1c-a52f-89a6419d7818&ps=25