This figure demonstrates the example that is described in this section. This figure details the information flow inside an interaction.

This figure describes five steps in completing the client's purchase order. In the first step, the client invokes a takeOrder reaction using the session.call method. The client provides the process context, which has an interaction ID, IID=user1, and a process activation ID, AID=AID_105_user1.

The takeOrder reaction is fired inside a takeOrder process. This step has the following three substeps:

2a. request a service from checkINV process (Reaction.call)
2b. request a service from checkCRED process (Reaction call)
2c. register a reaction, procPO (Reaction.registerReaction)

In this example, the Reaction.call does not provide any IID or process AID. The AC4J infrastructure generates these for the call and uses them to start the checkINV and checkCRED processes.

The checkINV and checkCRED Processes return the processed information back to the called process, takeOrder. This is step number 3.

Once the data tokens from checkINV and checkCRED are available from the respective processes, the procPO Reaction is fired. This reaction is fired inside the takeOrder Process and executes the business logic. It finally returns the value to the client (through the AC4J Databus—not shown).

The fifth and final step is the client pulling the results from the AC4J data bus using the session.receiveReactionResponse. The client uses the same interaction and process activation IDs that it used when it made the first request.