Add java task: Promise.