We should have an API that allows an admin to update a task variable. Right now this endpoint is missing
@erdemedeiros @salaboy
We have in RB TaskVariableController, but do not have at all TaskVariableAdminController.
Should we consider what else may be needed?
@CTI777 yes, please, add it to TaskVariableAdminController.
@erdemedeiros @salaboy
I have a question regarding RB changes
We have a POST method setVariables (in TaskVariableControllerImpl) which works like set and update...
Update task variables (PUT) should work only in admin area.
How should I continue:
as we discussed in the standup I would do as follow:
1) User (the activiti API internally it should check that the user sending the request is the assignee of the task to perform these actions, if the user sending the request is not the assignee these methods should fail):
We should remove the method setVariable to be absolutely clear on what the behaviour is.
@CTI777 is it clearer now?
To conclude (for user and admin area):
get: variables
post: newVariables
put: updateVariables
Question: to check existing task variables can I use getVariables?
@salaboy
If user want to update / create several task variables, and one variable fail (e.g. try to create already existing var): should operation for all variables fail?
@CTI777 I am having problems with the plural.. I wonder if we just do newVariable and updateVariable.
Is there any case where we want to update multiple variables or create multiple variables at the same time?
@mauriziovitale can you please clarify?
@salaboy right now we don't have any specific requirements related to the multiple variables. So we can start with newVariable and updateVariable
@mauriziovitale awesome! @CTI777 let's try to do that then.. ping me in gitter if you have questions.
Just to confirm current status - there are currently two PRs for the core level on this and we're just starting to look at the cloud level? It looks to me like we're just starting on the cloud level because I don't see any branch on activiti-cloud-runtime-bundle-service and it seems it was just agreed in the last comments what should be done for cloud.
@ryandawsonuk
I have made currently 2 PR's: API, Activiti. The next will be RB, which is almost ready... I will do it next hours...
Have made PR for RB.
I still have several questions:
SetTaskVariablesPayload.NewTaskVariablePayloadUpdateTaskVariablePayloadSetTaskVariableCmdExecutor this is used currently for New Task Variable. To add same for Update Task Variable - will cause problems, because they have same payload type@salaboy, @ryandawsonuk and I have some concerns about
We should remove the method setVariable to be absolutely clear on what the behaviour is.
This means a breaking change in the API, so I don't think we should do it for 7.0.x. Probably we should keep existing APIs methods (both Java and REST) as they are and only introduce the two new entries createVariable and updateVariable. Note that in terms of naming I prefer createVariable to newVariable.
@erdemedeiros totally agree.. so let's not remove the old payloads and methods.. just add new ones with the new payloads as suggested by @CTI777
@salaboy @erdemedeiros
What about createVariable vs newVariable?
Should I make createVariable method?
@CTI777 createVariable please.
@salaboy Ok, will try to complete things today evening...
Most helpful comment
@salaboy, @ryandawsonuk and I have some concerns about
This means a breaking change in the API, so I don't think we should do it for 7.0.x. Probably we should keep existing APIs methods (both Java and REST) as they are and only introduce the two new entries
createVariableandupdateVariable. Note that in terms of naming I prefercreateVariabletonewVariable.