Configuring the Production
This chapter describes the process of creating and configuring an X12 Production. It contains the following sections:
Be sure to perform all tasks in the same namespace that contains your production. When you create rule sets and transformations do not use reserved package names; see “Reserved Package Names” in Developing Ensemble Productions.
Also see “Overriding the Validation Logic” in Ensemble Virtual Documents.
Creating a new X12 Production
You can add X12 components to an already existing production. However, if you want to create a new Ensemble production explicitly for handling X12, follow the steps below.
In the Management Portal, switch to the appropriate namespace.
To do so, click Switch in the title bar, click the namespace, and click OK.
Click Production and then click Go.
Ensemble then displays the last production you accessed, within the Production Configuration page.
Click the Actions tab on the Production Settings menu.
Click New to invoke the Production Wizard.
Enter a Package Name, Production Name, and Description.
Choose the Generic production type and click OK.
Ensemble creates a blank production from which you can add components such as business services, business processes, and business operations. See the sections below for more details.
As you build your production, it frequently happens that while configuring one component you must enter the name of another component that you have not yet created. A clear naming convention is essential to avoid confusion. For suggestions, see “Naming Conventions” in Ensemble Best Practices. For rules, see “Configuration Names,” in Configuring Ensemble Productions.
Adding an X12 Business Service
Add one X12 business service for each application or source from which the production will receive X12 documents.
To add an X12 business service to a production:
Click the X12 Input tab.
Click one of the following from the Input type list:
For X12 Service Name, type the name of this business service.
For X12 Service Target, select one of the following:
Create Target Automatically — Ensemble adds a business process to the production and configures the business service to use it as a target. You can edit the business process details later.
None for Now — Do not specify a target for this business service. If you make this selection, ensure that you specify a target later.
Choose an Existing Production Item as Target — In this case, also select an existing business host from the drop-down list.
Adding an X12 Business Process
To add an X12 business process to a production:
Click the X12 Router tab; the router class defaults to EnsLib.MsgRouter.VDocRoutingEngine.
For Routing Rule Name, do one of the following:
Select an existing routing rule from the Routing Rule Name drop-down list.
Select Auto-Create Rule and type a rule name into Routing Rule Name. In this case, the wizard creates the routing rule class in the same package as the production.
Later you must edit the routing rule and add your logic to it.
For X12 business process Name, type the name of this business process.
Ensure that your X12 business service is connected to the new X12 Business Process. To connect the process:
Select your X12 business service.
Click the Settings tab and open the Basic Settings menu in the menu to the right of the screen.
Enter the name of the new X12 business process in the Target Config Names field.
Configure additional settings of the business process, as needed. For details, see “Settings for X12 Business Processes”.
Adding an X12 Routing Rule
For general information on defining business rules, see Developing Business Rules.
When you create an X12 routing rule:
On the general tab, Rule Type should be Virtual Document Message Routing Rule. This choice sets the following options:
In the constraint for a rule, specify Message Class as EnsLib.EDI.X12.Document.
In all other respects, the structure and syntax for both types of rule set are the same.
Adding an X12 Data Transformation
Your routing rule may need one or more data transformations.
For general information on defining DTL data transformations, see Developing DTL Transformations.
When you create a DTL data transformation for X12 documents:
On the Transform tab, Source Class and Target Class should both be EnsLib.EDI.X12.Document.
Source Doc Type should match the schema category name assigned by the business service.
Target Doc Type should be the name of the target schema category. This must match a schema category name that you have loaded into Ensemble.
To integrate the DTL data transformation in the production, enter its full package and class name in the Transform field of a routing rule.
Be sure your data transformation reflects your Batch Handling settings.
Adding an X12 Business Operation
To send X12 messages from a production to a file or application, you must add an X12 business operation. Add an X12 business operation for each output destination.
You might also want to add business operations to handle bad messages (for background, see “Business Processes for Virtual Documents” in Ensemble Virtual Documents).
To add an X12 business operation to a production:
Click the X12 Output tab.
Click one of the following from the Output type list:
For X12 Operation Name, type the name of this business operation.
Ensure that the business operation is connected to the relevant business services or business process
For a routing rule, enter the name of your X12 business operation in the Target field of the routing rule set.
If your design uses a pass-through interface that simply relays messages from the incoming business service to the outgoing business operation, enter the name of your X12 business operation in the Target Config Names field of the X12 business service.
Configure additional settings of the business operation, as needed. For details, see “Settings for X12 Business Operations”.
If you want the production to send data that is not an X12 message, see “Defining Business Operations” in Developing Ensemble Productions. Also see “Connectivity Options” in Introducing Ensemble.