An originating task is a server-side component representing human interaction with a machine supported service, which can be accessed through a WSDL defined interface. The originating task offers functions to create and start the service. When starting the service, input data can be directed to the service. Upon service completion, the result of the service execution can be received. An originating task supports the definition of access rights with respect to service creation and start. The following image illustrates the originating task as the interaction component between a human and a machine supported service:
The person interacts with the originating task through a user interface. This user interface is usually embedded in an application, and it presents the input and output messages to the originator.
The originating task sample contains an originating task that invokes a BPEL process. The originating task is managed through a task related API allowing to create and start tasks. The user interface is implemented as web application. Upon starting a task, input can be send to the task and, indirectly, to the associated business process. When the BPEL process has finished, the result is passed back to originating task.
This sample provides three components: an originating task, a business process and a web application. The business process is the implementation of the service and is invoked by the originating task. The web application is the graphical user interface for the person. It uses a task related API to work with the task and the task container. These components are packaged in two enterprise applications: OriginatingTaskApp, which contains the originating task and the business process, and OriginatingTaskClientApp, which contains the user interface application. Refer to the Run the Sample section on how to run these sample applications.
The components of the OriginatingTaskApp are shown in the following assembly diagram:
The Originating Task "ProcessStarter" invokes the business process "Process". Both use the same interface "ProcessInterface":
When an input message arrives, the business process prints a message to System.out.log, then it waits for the specified number of minutes. Finally the process computes the output message and sends the reply message back to the invoker:
In this example, the authorization scheme is such that "everybody" can create and start tasks and, indirectly, process instances.