Callbacks

Callbacks allow you to define methods which execute as an action triggered workflow executes. This might seem strange at first, considering a workflow is designed to execute computations and even straight Java code as part of its execution. Callbacks are invoked in response to events triggered by the workflow itself. You can create code that responds to one of four hooks:

  • preWorkflow— this hook is executed after the action is called but before the workflow executes.

  • preMergeInputToCurrent— this hook executes right before any given merge input to current operation executes.

  • preWrite— executed right before the data is written.

  • postWorkflow— executes after the workflow completes.

Procedure 4.12. To Create a Callback:

  1. Click one of the actions from the actions list, then click the Callbacks tab.

  2. Click Add.

  3. Studio generates a class with stub code in it. Click Edit to edit the class.