Hi there,
I am trying to use only one form in my process application for a number of userTasks. I try to make my form userTask-aware by using the hide if-funcionality.
I try to hide components based on the userTasks which is currently active by entering an expression like this:
userTaskKey = “Activity_ArUserTask1” or
flowNodeId = “Activity_ArUserTask1”
All of this does not work. Can someone help?
Hi @minautics - how are you passing those variables to the task/form?
I assumed those variables are available since they are attributes of the userTask in die model.
Hide if userTaskKey =“foo” would do the trick? But I am wrong, I guess.
Any ideas?
@minautics - that data isn’t yet exposed as variables in the engine. It is being worked on though!
However, in my opinion I think it might be easier to just pass a parameter in on the task itself. For instance, an input variable named taskType
and pass in a string identifier, then use that in the the hide condition expression.
Another pattern I might consider is having the form accept a number of hide____
variables (hideName
, hideAddress
, hideSomethingElse
) and use those as the condition expression. Then you only need to pass a new set of inputs to the form from when adding a new user task, rather than updating all the conditions in the form.
Both approaches have their advantages and disadvantages.
It feels a little bit like a workaround, but it does work. Thanks, @nathan.loding
@minautics - a little bit. I agree that those variables should be available in the process, and in retrospect maybe it should have been a higher priority feature. But it is being worked on! You can follow the GitHub issue here, and the comment I linked to references a pull request with some early implementation details.