Scheduling a Task Using the Default Implementation
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

Scheduling a Task Using the Default Implementation

According to the default task implementation in the ESB profile, a task can be configured to inject messages, either to a defined endpoint, to a proxy service or a specific sequence defined in the ESB. The sections below demonstrate an example of scheduling a task using the default implementation, to inject an XML message and to print it in the logs of the server.

Creating the Task

Follow the steps below to create the task, which you want to schedule.

Creating the ESB Project

  1. Open WSO2 EI Tooling and click File →  New →  ESB Solution Project.

  2. Enter ScheduleDefaultTask as the ESB Project Name and click Finish.

Creating the Sequence

  1. In the Project Explorer, right click on the ScheduleDefaultTask Project and click New → Sequence.

  2. Click Create New Sequence and click Next.

  3. Enter the Sequence Name as  InjectXMLSequence and click Finish.


  4. Drag and drop a Log mediator and a Drop mediator from the Mediators Palette.


  5. Click on the Log mediator, and in the Properties section enter the following details.

    • Log Category: INFO

    • Log Level: CUSTOM

Creating the Scheduled Task

  1. In the Package Explorer, right click on the ScheduleDefaultTask Project and click New → Other.

  2. Type Scheduled Task in the search, select it and click Next.

  3. Click Create a New Scheduled Task Artifact and click Next.

  4. Enter the below details and click Finish.

    • Task Name:  InjectXMLTask

    • Count: -1

    • Interval (in seconds): 5

    In the Package Explorer, you view the  InjectXMLTask created task created in the src/main/synapse-config/tasks directory under the ScheduleDefaultTask project. 

Defining the properties of the Task

  1. In the Form View of the InjectXMLTask.xml file, click the Task Implementation Properties button.

  2. Select XML as the Parameter Type of the message parameter, enter <abc>This is a scheduled task of the default implementation.</abc> as the XML message in the Value/Expression field and click OK.

Deploying the Task

  1. Open the pom.xml file of the Composite Application Project and select the artifacts that need to be deployed.

  2. Start the ESB profile by adding the ScheduleDefaultTaskCompositeApplication. For instructions, see Running the ESB profile via Tooling.

Viewing the output

You view the XML message you injected (i.e.,<abc>This is a scheduled task of the default implementation.</abc>) getting printed in the logs of the ESB Profile every 5 seconds.

com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.