Extension: Recipe - quandis/qbo3-Documentation GitHub Wiki
The Recipe plugin allows power users to chain multiple QBO method calls into a single transaction. The results from each QBO call are used for subsequent calls thus allowing you to chain your QBO methods without the overhead of a workflow.
Chaining multiple calls to retrieve data from a bank's internal systems and post a payment.
-
LoanSelectcall to bank's internal system to gather up to date info - Post payments to approved payment gateway provider
- Generate a message on the loan indicating that a payment was made
To create a Recipe create a Service entry with a ServiceStep for each method signature to be invoked in the transaction. The results from each step are available to be used via substitution in the method signature of subsequent steps.
The following items are required in your service configuration:
-
Name: Name of recipe -
PluginType: Recipe (qbo.Application.Services.Recipe, qbo.Application) -
RequestMethod: QBO method signature to call -
ReturnType: Recipes supportDataSet,DataReader,XmlReader,ObjectandVoid.
The following example chains 2 methods to return a person record and then use that information to create a message.
Person/Select?ID={PersonID}`and then calls
Message/Save?ObjectID={PersonID}&Object=Person&Message=Hello {Person}`The service configuration entry to chain these 2 calls into a single transaction would be:
<Service
AllowInheritance="True"
Repeatable="OneActive"
LogData="True"
CompleteStep="False"
RequireStream="False"
Async="False"
ReturnType="Void"
Type="qbo.Application.Services.Recipe, qbo.Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
Name="ChainMethodSignatures">
<Steps>
<Step
AllowInheritance="True"
Repeatable="OneActive"
LogData="True"
CompleteStep="False"
RequireStream="False"
Async="False"
ReturnType="Void"
Name="SelectPerson"
RequestMethod="Person/Select?ID={PersonID}"/>
<Step
AllowInheritance="True"
Repeatable="OneActive"
LogData="True"
CompleteStep="False"
RequireStream="False"
Async="False"
ReturnType="Void"
Name="SaveMessage"
RequestMethod="Message/Save?ObjectID={PersonID}&Object=Person&Message=Hello {Person}"/>
</Steps>
</Service>