Error while assigning task dynamically

Hi,

We are trying to implement the scenario where we are trying to assign a task to user/role dynamically using wM service.

Intially it was working fine the task was getting assigned to the specific user/role dynamically.

Now we are facing the issue where in when we are trying to call the service from Task event eventtype: queued, using webservice to call above mentioned wM service to assign the task to user/role we are getting below error.


Error Message: SOAPException( Server.userException: com.webmethods.portal.bizPolicy.BizException: [POP.017.0001] Task is locked and you may not update it at this time. Please wait till task is unlocked )

wM service Structure:

input: taskID
output: NA
Logic: call gettask service using taskID
gettaskInfoObject
update assigntoList
call updateTask and pass newtaskInfoObject

If anyone has encountered similar error please help us in resolving.

Thanks in Advance

Regards,
Akshay.

Hi Akshay,

Were you able to resolve the task locking issue?
We are also facing similar issue at our customer site.

Thanks,
Kishore

You need to create an adapter to run the following command on webMethods database:

DELETE .T_TASK_LOCK WHERE TASK_ID = ?

Warning:
If this adapter will run with other adapters accesing multiple databases, you have to deal with transactions, pub.art.transaction:startTransaction & pub.art.transaction.commitTransaction.

Best regards.

The task is locked when task events are being processed, if you call a web service which tried to update (or assign) very same task, then this error is expected because web service updating task does not hold the same lock.

If that is the case, the better solution would be to use in-proc TaskEngine APIs to assign a task. You may still call a web service to determine user/roles to assign a task.