Hello:
I’m executing updateTask, trying to update the lastModifiedBy field with a user id.
The task was assigned to a role and the user above belongs to this role.
If I set the user ID as an input parameter I get the following error and If I set the user ID as an input to the field lastModifiedBy the API allways put the user administrator.
com.wm.app.b2b.server.ISRuntimeException: [SOAPException( Server.userException: com.webMethods.portal.bizPolicy.BizException: [POP.017.0012] You dont have permissions to assign this task )] not found in “com.wm.resources.CoreExcpMsgs”
Best regards.
Hi Norberto,
There are some fields in the TaskInfo object which is not a good idea/not possible to modify. For some of them you will get an exception. For others nothing will happen but the value will not get updated.
The values from the TaskInfo that are read-only (can be modified only by the Task Engine) are the following:
- createdDate
- lastModifiedDate
- lastAcceptedDate
- createdBy
- lastModifiedBy
- lastAcceptedBy
- auditContext
- processInstanceId
- processModelId
- processsIteration
- processModelVersion
- stepId
- stepIteration
- taskTypeID
- taskUrl
- collaborationProcessID
- collaborationStepID
You should not worry about setting this fields. The Task Engine will take care of this.
Maybe there is another way to achieve your desired outcome without having to set the lastModifiedBy field.
Best regards,
Vlad Turian
Hi Norberto,
As Vlad suggested these fields can’t be modified and Task Engine will automatically bind the user who has modified the task instance to given field. If you have any additional requirements then may add new fields to Task Custom Business data and set those.
Thanks & Regards
Rohit Gupta
rohitgupta.it@gmail.com