Human Interaction Query Service
The Human Interaction Query service searches Sterling B2B Integrator for business process data that requires human interaction and returns the query results to the business process.
The query results include the reference data for documents that were previously saved in the Sterling B2B Integrator database by the Human Interaction Event service. The query results also include the information about the state of the business process that was used to save the documents in the database (for example, whether or not the business process is in a waiting state).
Typically, after the Human Interaction Query service has completed, the Human Interaction XForms service identifies the Web template used to display the results returned from the service. The Human Interaction XForms service then works in conjunction with the B2B HTTP Server adapter to display the results in a Web browser.
The following table provides an overview of the Human Interaction Query service:
System name | HumanInteractionQuery |
---|---|
Graphical Process Modeler (GPM) categories | All Services, Web Extensions |
Description | Searches the Sterling B2B Integrator WEBX_MINED_DATA table for records that match the query parameters specified for this service. The results from the query are saved in XML format and returned to the business process as a document. |
Business usage | A business process uses the Human Interaction Event
service to save documents requiring approval in the database and then
sends out an e-mail notification to the approver. The e-mail notification
includes the URL with the Web template for displaying the documents.
When the approver specifies the URL in the browser, the Web template
invokes a business process that uses the Human Interaction Query service
to retrieve all documents requiring approval from the database and
uses the Human Interaction XForms service in conjunction with the
B2B HTTP Server adapter to display the results in the Web browser
for user selection. Note: Because of our continuing efforts to improve
services and adapters to align with new technology and capabilities,
the B2B HTTP Server adapter has entered the retirement process in Sterling B2B Integrator and will
be replaced with the HTTP Server adapter. See Retiring and Removed
Services and Adapters.
|
Usage example | A manager logs into the Sterling B2B Integrator Web extensions and wants to view all items in her inbox requiring approval. The process might include the following steps: The manager specifies a URL in the Web browser that includes the name of the Web template used to display the list of items. The Web template invokes a business process that uses the Human Interaction Query service to retrieve items from the manager's inbox prior to being displayed. The Web template is displayed with the list of items requiring approval by the manager. The manager selects and approves or rejects an item from the list. |
Preconfigured? | No |
Requires third-party files? | No |
Platform availability | All supported Sterling B2B Integrator platforms |
Related services | Designed to work with:
|
Application requirements | None |
Initiates business processes? | None |
Invocation | Runs as part of a business process. |
Business process context considerations | None |
Returned status values | Returned status values:
|
Restrictions | None |
Persistence level | None |
Testing considerations | None |
Requirements
- Enabling the Human Interaction Event service configuration to store documents requiring Human Interaction in the Sterling B2B Integrator database
- Enabling the Human Interaction XForms service configuration to retrieve items requiring Human Interaction from the Sterling B2B Integrator database
- Creating a valid, deployed Web template for displaying data in a Web browser
How the Human Interaction Query Service Works
Use the Human Interaction Query service to search the Sterling B2B Integrator database for business process data that requires human interaction. The query results returned from this service include the reference data for documents that were previously saved in the Sterling B2B Integrator database by the Human Interaction Event service.
Business Scenario
Your company receives purchase orders in XML format from a trading partner. All purchase orders exceeding $1,000.00 need to be approved. You want to view a list of all purchase orders requiring approval.
Business Solution Example
- A Human Interaction Query service to retrieve the list of purchase orders requiring approval
- A Human Interaction XForms service to receive the list of purchase orders from the Human Interaction Query service and identify the Web template used to display the list.
- A B2B HTTP Server adapter for displaying the list in a Web browser. CAUTION:Because of our continuing efforts to improve services and adapters to align with new technology and capabilities, the B2B HTTP Server adapter has entered the retirement process in Sterling B2B Integrator and will be replaced with the HTTP Server adapter. See Retiring and Removed Services and Adapters.
Business Solution Example Dependencies
- Run a business process that accepts purchase orders as input and uses the Human Interaction Event service to store the purchase orders in the Sterling B2B Integrator database and mark them as requiring approval. The Human Interaction Event service must also be configured to invoke a business process that constructs and sends to the approver an e-mail notification containing the URL for displaying the list of purchase orders. See the business scenario and business solution example for the B2B Lookup System service for an example business process.
- Create a configuration of the HTTP Respond service that specifies the URI used to invoke (from the Web browser) the business process created in this example.
- Deploy a Web template in Sterling B2B Integrator for displaying the list of purchase orders in the Web browser.
This business solution example focuses only on the Human Interaction Query service functionality.
GPM Example
The following GPM example shows a solution for retrieving the list of purchase orders requiring approval to display in a Web browser.
After the Human Interaction Query service completes, a list of purchase orders that are waiting for approval are returned to the business process in a document named MinedDataQueryResults. The returned document for this example looks like the following, returning reference data for the two purchase orders meeting the query criteria:
The MinedDataQueryResults document is then sent to the Human Interaction XForms service and the B2B HTTP Server adapter for display in the Web browser.
For example, you might have a Web template that displays the reference data in the following format:
Business Process Modeling Language (BPML) Example
The following example shows the corresponding business process solution using BPML.
<process name="ExamplePurchaseOrderHIQueryAndHIXform">
<sequence name="Start HI Query and HI Xform Services">
<operation name="SampleHIQueryService">
<participant name="HumanInteractionQuery"/>
<output message="HumanInteractionQueryTypeInputMessage">
<assign to="DocumentType">Purchase Order</assign>
<assign to="State">Awaiting Approval</assign>
<assign to="." from="*"/>
</output>
<input message="inmsg">
<assign to="." from="*"/>
</input>
</operation>
<operation name="SampleHIXFormsService">
<participant name="HumanInteractionXForms"/>
<output message="HumanInteractionXFormsTypeInputMessage">
<assign to="TemplateName" from="DocToDOM(MinedDataQueryResults)/listItem/templateName/text()"/>
<assign to="." from="*"/>
</output>
<input message="inmsg">
<assign to="." from="*"/>
</input>
</operation>
<operation name="HTTP Respond Service">
<participant name="HttpRespond"/>
<output message="HttpRespondServiceInputMessage">
<assign to="." from="*"></assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
</sequence>
</process>
Implementing the Human Interaction Query Service
- Activate your license for the Human Interaction Query service. See Installing Sterling B2B Integrator.
- Create a Human Interaction Query Service configuration. See Managing Services and Adapters.
- Use the Human Interaction Query service in a business process.
Human Interaction Query Service Business Process Usage
The following screen shows a graphical view of the GPM parameters for the Human Interaction Query service. There are no fields to be configured on the Message From Service tab.
The following example shows the corresponding BPML parameters for the Human Interaction Query service GPM parameters.
<process name="ExamplePurchaseOrderHIQuery">
<sequence name="Start HI Query Service">
<operation name="SampleHIQueryBP">
<participant name="HumanInteractionQuery"/>
<output message="HumanInteractionQueryTypeInputMessage">
<assign to="DocumentType">Purchase Order</assign>
<assign to="endDateTime">2004-02-25 00:00:00</assign>
<assign to="endModDateTime">2004-02-25 00:00:00</assign>
<assign to="FromAccount">SendingTradingPartnerSystemAccountID</assign>
<assign to="GroupName">SendingTradingPartnerSecurityPermissionGroup</assign>
<assign to="IdentityName">SendingTradingPartnerName</assign>
<assign to="ParentAccount">ManagerOfTheDocumentSender</assign>
<assign to="ReferenceId">PO1234</assign>
<assign to="startDateTime">2004-02-24 00:00:00</assign>
<assign to="startModDateTime">2004-02-24 00:00:00</assign>
<assign to="State">Awaiting Approval</assign>
<assign to="Status">Unread</assign>
<assign to="StorageArea">Inbox</assign>
<assign to="SystemAccount" from="ReceiverCompanyUserAccount"/>
<assign to="." from="*"/>
</output>
<input message="inmsg">
<assign to="." from="*"/>
</input>
</operation>
</sequence>
</process>
The following table describes the fields used to configure the Human Interaction Query service in the GPM. The values specified for these parameters are the input to the Human Interaction Query service from the business process.
Field | Description |
---|---|
Config | Name of the service configuration. |
DocumentType | Type of data that requires human interaction. Valid value is any alphanumeric string, such as Purchase Order, Invoice, and Remittance Advice. |
endDateTime | End date and time of the time period for the Human Interaction Query service to search Sterling B2B Integrator for original business processes flagged for human interaction. The format for this field is yyyy-mm-dd hh:mm:ss, with a space between the dd and hh. The default is to return the reference data for all documents meeting the specified query criteria. |
endModDateTime | End date and time of the time period for the Human Interaction Query service to search Sterling B2B Integrator for modified business processes flagged for human interaction. The format for this field is yyyy-mm-dd hh:mm:ss, with a space between the dd and hh. The default is to return the reference data for all documents meeting the specified query criteria. |
FromAccount | Trading partner system user account ID (as defined in Sterling B2B Integrator) of the trading partner that sent the document. |
GroupName | Name of the security permission group to which the trading partner that sent the document belongs. Use this parameter to search records pertaining to a specific security permission group used for the Human Interaction Event service. |
IdentityName | Name of the trading partner that sent the document. Use this parameter to search records pertaining to a specific company. |
ParentAccount | User account name for the manager who sent the document. This user account name is associated with the FromAccount information in this service. Use this parameter to search records pertaining to a specific manager. |
ReferenceID | Document identifier. Valid value is any alphanumeric string. Examples include a purchase order number or an invoice number. |
startDateTime | Start date and time for the Human Interaction Query service to search Sterling B2B Integrator for original documents flagged for human interaction. The format for this field is yyyy-mm-dd hh:mm:ss, with a space between the dd and hh. The default is to return the reference data for all documents meeting the specified query criteria. |
StartModDateTime | Start date and time for the Human Interaction Query service to search Sterling B2B Integrator for modified documents flagged for human interaction. The format for this field is yyyy-mm-dd hh:mm:ss, with space between the dd and hh. The default is to return the reference data for all documents meeting the specified query criteria. |
State | State of the document in the process. Valid value is any alphanumeric string, such as Approved, Pending, or Rejected. |
Status | Status of the document. Valid value is any alphanumeric string, such as Read or Unread. |
StorageArea | Virtual location to store the data waiting for the person to take action. Valid value is any alphanumeric string, such as Inbox, Outbox, and Drafts. |
SystemAccount | Trading partner user account ID (as defined in Sterling B2B Integrator) of the person who must interact with the business process. |
The following table describes additional fields used to configure the Human Interaction Query service. You can specify these fields using the Advanced Editor option in the GPM Service Editor or by using BPML.
Field | Description |
---|---|
Sort Order | Used to specify the Mined Data column that is used to sort the results returned by the Human Interaction Query service. |
State2 | An additional parameter that is only used by the *QuerySearch forms when the query includes more than just Active states, specifically when Active and Archive are the options. The Light Weight JDBC service can be used for queries that go beyond what the HI Query service can provide. |
Output from Service to Business Process
The following table describes the output returned from the Human Interaction Query service to the business process:
Returned Output | Description |
---|---|
MinedDataQueryRes ults/@SCIObjectID document | The name of the document, along with the document SCI Object ID, returned by the Human Interaction Query service. This document contains the list of document reference data meeting the query criteria specified by the Human Interaction Query service parameters. |