Human Interaction XForms Service

The Human Interaction XForms service selects the appropriate Web template for displaying business process data in a Web browser. The business process data might be documents and document reference data stored in the Sterling B2B Integrator database or data returned from other services or adapters.

The Human Interaction XForms service:
  • Generates the HTML for the Web page based on the Web template and posts the HTML to the B2B HTTP Server adapter for display in the Web browser.
    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 is replaced with the HTTP Server adapter. See Retiring and Removed Services and Adapters.
  • Conducts data validation and calculations.

The following table provides an overview of the Human Interaction XForms service:

System name HumanInteractionXForms
Graphical Process Modeler (GPM) categories All Services, Web Extensions
Description Directs Sterling B2B Integrator to the appropriate Web template to use to display business process data. The Human Interaction XForms service displays the business process data in HTML format in a Web browser using a configured Web template.
Business usage A business process uses the Human Interaction Event service to save documents requiring approval in the database and then sends out an email notification to the approver. The email notification includes the URL for displaying the documents. When the approver specifies the URL in the browser, a business process runs 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 You can use the Human Interaction XForms service in various ways. For example:
  • The Human Interaction XForms service is preceded by a Human Interaction Query service that searches Sterling B2B Integrator for business processes flagged for human interaction and saves the list in XML format. This list is passed to the Human Interaction XForms service, and the service identifies the Web template used to display the list.
  • The Human Interaction XForms service is preceded by a Sterling B2B Integrator service or adapter that produces XML as output and passes this output to the service for display in a Web browser. The Human Interaction XForms service identifies the Web template used to display the output. See Usage Examples for an example using this service to display data from the Lightweight JDBC adapter.
In each scenario, the Human Interaction XForms service is followed by the B2B HTTP Server adapter for displaying the information in the Web browser.
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.
Preconfigured? No
Requires third-party files? No
Platform availability All supported Sterling B2B Integrator platforms
Related services Designed to work with:
  • Human Interaction Query service
  • Human Interaction Event service
  • B2B HTTP Server adapter
  • Human Interaction Document Loader service
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.
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:
  • WorkFlowContext.SUCCESS: Success, with no errors.
  • WorkFlowContext.ERROR IllegalArgumentException: Caught IllegalArgumentException in XFormsService.processData()
  • WorkFlowContext.ERROR IllegalStateException: Caught IllegalStateException in XFormsService.processData()
  • WorkFlowContext.ERROR SQLException: Caught SQLException in XFormsService.processData()
Restrictions None
Persistence level None
Testing considerations None

Requirements

Using this service requires:
  • A valid, deployed Web template
  • An enabled B2B HTTP Server adapter configuration
    Note: The B2B HTTP Server adapter facilitates communications using the HTTP protocol. The B2B HTTP Server adapter must follow the Human Interaction XForms service for the document to be displayed in the 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.

How the Human Interaction XForms Service Works

Use the Human Interaction XForms service in conjunction with the B2B HTTP Server adapter to display business process data in a Web browser. The following sections describe a business scenario and a sample solution using the Human Interaction XForms service.

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 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 in the Web browser.

The approach used to solve this business scenario includes creating a business process that includes:
  • 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.

      Identify the Web template used to display the list.

    • Forward the HTML from the Web template to the B2B HTTP Server adapter for displaying 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.
The following dependencies must be met to run the example in this section and display the results in a Web browser:
  • 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 an email notification containing the URL for displaying the list of purchase orders to the approver. See the business scenario and business solution example for the Human Interaction Event service for an example business process.
  • Create a configuration of the HTTP Respond service that specifies the URI used to invoke the business process created in this example from the Web browser.
  • 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 XForms service functionality.

GPM Example

The following example shows a solution to the business scenario using the GPM.

The Human Interaction Event service (not shown) generated an email notification to the approver after the purchase orders were added to the database. The approver uses this URL to list the purchase orders requiring approval in the Web browser. For example, http://siHostName:siport/webx/bp/businessProcessName, where businessProcessName is the name of the business process to invoke.

The business process that runs uses the Human Interaction Query service to retrieve the list of purchase orders from the database and uses the Human Interaction XForms service in conjunction with the B2B HTTP Server adapter to display the list.

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.

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:

The MinedDataQueryResults document is then sent to the Human Interaction XForms service, which identifies the Web template used for displaying the list of purchase orders and returns the HTML to the business process. The Human Interaction XForms service forwards the HTML to the B2B HTTP Server adapter for display in the 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.

For example, you might have a Web template that displays the reference data in the following HTML format:

The approver can select the purchase order number from the list to display the purchase order in the Web template and then approve or reject the order. See Human Interaction Document Loader service for information about retrieving a specific document from the database for display purposes.

The approver could alternatively log in to the Sterling B2B Integrator Web Suite application to view (in their inbox) a list of documents requiring approval.

Business Process Modeling Language (BPML) Example

The following example shows the corresponding business process solution by 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="SystemAccount" from="system-account-user-id/text()"/> 
	<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>

See Usage Examples for an additional example of using the Human Interaction XForms service.

Implementing the Human Interaction XForms Service

To implement the Human Interaction XForms service, complete the following tasks:
  1. Activate your license for the Human Interaction XForms service. See Installing Sterling B2B Integrator.
  2. Create a Human Interaction XForms service configuration. See Managing Services and Adapters.
  3. Use the Human Interaction XForms service in a business process.

Human Interaction XForms Service Business Process Usage

The following screen shows a graphical view of the GPM parameters for the Human Interaction XForms 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 XForms service GPM parameters.

<process name="ExampleHIXFormsGPMParms"> 
<sequence name="Start"> 
<operation name="SampleHIXFormsService"> 
<participant name="HumanInteractionXForms"/> 
<output message="HumanInteractionXFormsTypeInputMessage"> 
	<assign to="ArchiveFlag">1</assign> 
	<assign to="ArchiveHours">24</assign> 
	<assign to="MergeDataOnResume">NO</assign> 
	<assign to="ServletResponseMode">NO</assign> 
	<assign to="TemplateName">WebTemplateName</assign> 
	<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 XForms service in the GPM. The values specified for these parameters are the input to the Human Interaction XForms service from the business process.

Field Description
Config Name of the service configuration.
ArchiveHours The number of hours the mined data record should remain in the Web Extension table before it is archived or purged. Valid value is a positive integer. Optional. If blank, the time span from the business process is used, if it has been specified. If the time span from the business process has not been specified, the system default is used.
ArchiveFlag The archive method that should be used. Optional. Valid values:
  • 1 – Archives the data in the Web Extension table.
  • 2 – Deletes the data from the Web Extension table.
  • blank – The archive method from the business process is used.
MergeDataOnResume Merges any changes made to the Web template with the existing instance data when the business process is taken out of the waiting state. Valid values:
  • Yes – Causes the documents and instance data to be merged when the business process is resumed.
  • No – Overlays the business process being resumed (taken out of a waiting state) with the changed documents and instance data. Default.
ServletResponseMode Determines the operation of the Human Interaction XForms service. Valid values:
  • Yes – Recognizes that the business process started by a Business Process XLink Resolver. The Human Interaction XForms service disregards all other configured parameters and immediately sends the primary document back to the XForms servlet for processing.
  • No – Parameter has no effect. The service works as configured. Default.
Note: The Business Process XLink Resolver is a Java class that starts business processes and is used in place of the HTTP Servlet adapter for Web Extensions running on Sterling B2B Integrator. In this case, business processes start directly by a call to the workflow class.
TemplateName Name of the Web template to use for viewing the data. Select the template name from the list of deployed templates, or dynamically select the template name from the query results returned by the Human Interaction Query service.

Usage Examples

The example in this section illustrates a business process that uses the Human Interaction XForms service in conjunction with the B2B HTTP Server adapter to display the results returned from a Lightweight JDBC adapter. The Lightweight JDBC adapter is used to query the Sterling B2B Integrator database for customer records and return the results as a primary document to the business process. The primary document is passed to the Human Interaction XForms service, which identifies the Web template and generates the HTML for displaying the customer information. The Human Interaction XForms service then posts the document to the B2B HTTP Server adapter for display in the 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.

This business process started by specifying a URL in the Web browser (for example, http://siHostName:siPort/webx/bp/ExampleCustomerList), which is accomplished with the Lightweight JDBC adapter.

Note: This example assumes that there is a valid, deployed Web template in Sterling B2B Integrator for displaying the list of customers in the Web browser and that there is URI mapping defined in the B2B HTTP Server adapter configuration for invoking the business process from an HTTP request.

The following example illustrates this scenario using the GPM.

The Lightweight JDBC adapter returns to the business process the following customer list as the primary document. This document is input to the Human Interaction XForms service.

<?xml version='1.0'
encoding='UTF-8'?>
<CustomerList>
<RowsReturnedFromDatabase>
<customer_id>1234</customer_id>
<customer_name>John Doe</customer_name>
<customer_address>address1</customer_address>
<customer_phone>xxxx-xxx-xxxx</customer_phone>
</RowsReturnedFromDatabase>
<RowsReturnedFromDatabase>
<customer_id>5678</customer_id>
<customer_name>Jane Doe</customer_name>
<customer_address>address1</customer_address>
<customer_phone> xxxx-xxx-xxxx</customer_phone>
</RowsReturnedFromDatabase>
</CustomerList>

The user specifies the URL in the Web browser for example, http://siHostName:siPort/webx/bp/ExampleCustomerList), which invokes the ExampleHISelectCustomers business process and displays the list of customers in the Web browser. For example, you might have a Web template that displays the list of customers in the following HTML format:

The following example illustrates the business process by using BPML:

<process name="ExampleHISelectCustomers"> 
<sequence> 
<operation name="Lightweight JDBC Adapter"> 
     <participant name="ExampleLWJDBCBusinessProcess"/> 
     <output message="LightweightJDBCAdapterTypeInputMessage"> 
        <assign to="pool">mysqlTrainingPool</assign> 
        <assign to="query_type">SELECT</assign> 
        <assign to="result_name">CustomerList</assign> 
        <assign to="row_name">RowsReturnedFromDatabase</assign> 
        <assign to="sql">SELECT * FROM Customer</assign> 
        <assign to="." from="*"/> 
     </output> 
     <input message="inmsg"> 
        <assign to="Document" from="PrimaryDocument/@SCIObjectID"/> 
     </input> 
</operation> 
<operation name="SampleHIXFormsService"> 
     <participant name="HumanInteractionXForms"/> 
     <output message="HumanInteractionXFormsTypeInputMessage"> 
        	<assign to="TemplateName">ExampleCustomerList</assign> 
        <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>