Q

BPEL in a cyclical scenario

Can BPEL be used in a cyclical scenario where three processes call each other sequentially? (i.e. client => A => B => C => A)
To implement the scenario as described using BPEL, let's use a sequential order approval sequence where the order ID is used for correlating the instances of process A, B and C in the sequence. The document schema carrying the approvals for the order is represented as:

XML Schema:
    OrderApproval
        OrderId   (string)
        ApprovalA (string)
        ApprovalB (string)
        ApprovalC (string)
The pseudo BPEL code for processes A, B and C is:
process A:
    Begin
    Receive input OrderApproval
    Assign "Approved by CompanyA" to OrderApproval/ApprovalA
    Invoke service (process) B
    Wait for callback from C with correlation set to OrderId
    Assign OrderApproval to output
    Invoke output OrderApproval on client callback
    End
process B:
    Begin
    Receive input OrderApproval
    Assign "Approved by CompanyB" to OrderApproval/ApprovalB   
    Invoke service (process) C
    End
process C:
    Begin
    Receive input OrderApproval
    Assign "Approved by CompanyC" to OrderApproval/ApprovalC   
    Invoke service (process) A
    End
The sequence is instrumented by a client enacting process A, resulting in the call sequence A => B => C => A. See the diagrams FlowA, FlowB and FlowC for a visual representation of the executed flow in each of the three BPEL processes.

Flow A


Flow B


Flow C
This was last published in February 2004

Dig Deeper on BPEL

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchSoftwareQuality

SearchCloudApplications

SearchAWS

TheServerSide

SearchWinDevelopment

Close