To add a Java Service Task you need to first create the task and then map it to the project.
Procedure
Expand the
AddressLookupInput project, and open the
Find Address process that it contains.
In the
Process Editor window, add a service task between the first (Capture postal code) and second (Display address) user tasks, and rename it
Find full address. (The Service Task will show an error as it expects a mapping, which you will add later).
Select
Java in the Service Type drop down.
Click the
Select Class button and on the resulting filtered dialogue start typing
AddressService until you see the service implementation in the project named
com.example.addresslookup.pojo2. Click
OK to select.
You will be asked if you want to add
com.example.addresslookup.pojo2 as a reference project. Click
Yes to add it.
Select from the available methods. In this case there is only one (lookup (String) - String) so it defaults for you.