yaql function this() to access current task context
Currently, to access the task context for the current task, we have to use the task function (i.e. task(task1)). In our WF authoring experience, majority of the time, we access context for the current task in the publish & on-condition clauses. The use of task(taskname) is a bit more typing than we like. Can we have a this() function that is equivalent to task(name_
Blueprint information
- Status:
- Complete
- Approver:
- Renat Akhmerov
- Priority:
- Medium
- Drafter:
- Winson Chan
- Direction:
- Approved
- Assignee:
- None
- Definition:
- New
- Series goal:
- None
- Implementation:
- Implemented
- Milestone target:
- None
- Started by
- Renat Akhmerov
- Completed by
- Renat Akhmerov
Related branches
Related bugs
Sprints
Whiteboard
Manas :
Some thoughts on using `this()`.
"this()" can be confusing. Intuitively understanding scope of the function would be hard. Is it the task or is it the whole workflow?
Further, "this" is a very well understood OOP concept and I see that using as function "this()" would be somewhat of a deviation from typical usage. Again sticking to pointless consistencies is usually meaningless but "this" is somewhat special :)
I propose "this_task()" or "current_task()". Since those clarify the intent and avoid repeated usage of the task-name and avoid.
Winson:
another option is task(self)
Renat:
This is now implemented as function task() w/o parameters.