yaql function this() to access current task context

Registered by Winson Chan

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_of_current_task)?

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

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.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.