Adding attributes and associating it with a channel
Document attributes help you identify key content, like a purchase order or account number, as documents pass through the network. You can then apply specific logic to process the documents based on these extracted attributes.
Procedure
- In webMethods B2B Integration from the side navigation menu, click Assets > Business documents. Select the flat file document for which you want to add the attribute.
- Click the Attributes tab, and click the Add attribute icon.
-
In the Add attribute dialog, select the required attribute from
the Attribute list or click the Add document attribute
icon to add the attribute.
Note: Do not use characters other than A-Z, a-z, 0-9, _ (underscore), - (hyphen) in the attribute names.
-
Set Required to On, if you want
webMethods B2B Integration
to log an error when it cannot extract an attribute. If the processing is successful, the processing
status is DONE W/ERRORS.
By default, when webMethods B2B Integration cannot extract an attribute, it continues to process the document. If the processing is successful, the processing status is DONE and webMethods B2B Integration does not log an error in the activity log.
-
Select a Transformation from the list.
webMethods B2B Integration
can transform extracted attributes before it stores them in
webMethods B2B Integration
database.
If you extract an attribute with the data type DATETIME or DATETIME LIST, specify the date format. Choose a built-in common date and time format or type the format that you need, by using a pattern string based on the
Time Format Syntaxdescribed for thejava.text.SimpleDateFormatclass. webMethods B2B Integration extracts the value of the date. It uses the pattern that you specify to decode the value, and converts it to the format that webMethods B2B Integration requires to store the date in the BizDocEnvelope. The default built-in transformation format is dd-MM-yyyy HH:mm:ss.If you extract an attribute that has the data type STRING or STRINGLIST, then transform the string value using one of the built-in transformations, Uppercase, Lowercase, or String substitution.
In String substitution, substitute extracted values with a pattern you specify.
If you extract an attribute that has the data type NUMBER and contains an array of numbers, transform the array into a single value using one of the built-in transformations.
When you select No format, webMethods B2B Integration stores the first value of the array as the value of the attribute.
When webMethods B2B Integration extracts a NUMBER or NUMBER LIST from a document, it uses the number parsing behavior of
java.lang.Number. For example, if the NUMBER or NUMBER LIST contains the value 100zzz, webMethods B2B Integration interprets the value as 100. If the value is zzz100, webMethods B2B Integration displays an error.The identifier is added in the Attributes tab. To edit the attribute click the Edit icon. To delete the attribute click the Delete icon.
-
Set Required to On, if you want
webMethods B2B Integration
to log an error when it cannot extract an attribute. If the processing is successful, the processing
status is DONE W/ERRORS.
- Select attributes for which you want to associate a channel, and click the Add attributes to channel icon.
-
On the Select a channel dialog, select a channel and click
Next.
Verify the details and click Add.
The attribute gets added to the channel.