Back Forward About the Rule-from-File wizard (Rule harvesting)

 zzz Show all 

You can create a flow, decision table, decision tree, or map value rule from a Windows file in an appropriate format, following a guided sequence of steps. The uploaded file becomes a starting definition of the rule. This capability is called rule harvesting. The original file remains attached to the rule as a Custom Field value.

 zzz Basics

Initially, the Availability field of a harvested rule is set to No/Blocked and so cannot be tested. To force validation and make the rule available for testing, click the Availability toolbar button (Availability) and change the Availability to Yes.

Resuming the wizard

This wizard creates a work object with the prefix pxAT-. To find open wizard work objects, select the menu option File > Open > Wizards in Progress > All Wizards.

 zzz Starting the wizard

  1. Set the appropriate work pool, by selecting File > Open > Work Pool > name.
  2. Select Application > Import > Rule from File.... .
  3. Complete the forms in the screen flow. For guidance, see Help — Rule-from-File wizard.

 zzz Harvesting a TXT file to a decision tree rule

To harvest a decision tree rule from a text file, prepare a file in the following format:

The formal syntax in approximate Backus-Naur form is:

[EVALUATE] <propertyname>
IF [NOT] <expression> THEN [CONTINUE | EVALUATE <expression> |
   %CALL <treename> | CALL DECISIONTREE <treename > !RETURN <expression>
OTHERWISE [RETURN] <expression>

where % indicates a horizontal tab character. Line endings are significant. Extra spaces are ignored. For example:

EVALUATE .BallorStrike
     %IF ((.Height > 4) && .NoSwing && .BatterNotStruck)) THEN CONTINUE
     %      %IF (Height > 3) THEN RETURN "Ball"
     %      %IF (Height < 1) THEN RETURN "Ball"
OTHERWISE RETURN "Strike"

where % indicates a horizontal tab character. Another example:

Decision Tree exampleEVALUATE Label
IF General Task THEN EVALUATE Urgency
   %IF > 20 THEN RETURN true
   %OTHERWISE RETURN false
IF NOT General Task THEN CONTINUE
   %If Label = Medical THEN RETURN true
   %OTHERWISE RETURN false
IF somethingelse THEN call somedecision
OTHERWISE RETURN other

When imported with this wizard, the system
creates a decision tree similar
to the image shown at right.


 zzz Harvesting a Public flow XML file to a flow

Process Commander's internal XML representation of a flow rule conforms closely to the XML schema stored in the standard text file rule Harvest.Publicflow.xml. You can use the Rule-from-File wizard to import an XML file conforming to this schema and create a draft flow rule. To work with this schema:

  1. Open the Harvest.Publicflow.xml text file rule
  2. Export the text to a local drive.
  3. Change the file type to "xsd" from "xml".
  4. Validate your XML file against the XSD.
  5. Start the Rule-from-File wizard.

XML files that conform to this schema are syntactically correct, and the resulting flow rule can be edited in Visio.

On the Attach File wizard step, select Public Flow as the Format value.

 zzz Harvesting a BPEL 1.1 XML file to a flow

When harvesting an XML file in BPEL 1.1 format, the wizard makes the following conversions:

     BPEL 1.1 element

     Flow shape

flow, sequence, and scope New flow rule
assign Utility
receive AssignmentService
flow, sequence, and scope Call or branch to subflow
invoke and reply Integrator
partnerlink, partner,
CorrelationSet
N/A
throw Utility to set a ticket
switch Call or branch to subflow
while Call or branch to subflow

 Open Harvesting an Excel worksheet to a map value rule

To create a map value rule (Rule-Obj-MapValue rule type) from an Excel worksheet,

  1. ExcelCreate an Excel worksheet that contains the values to become the Matrix tab as constants. Leave cell A1 blank. In cells A2, A3, ..., enter text that is to become the column headers. In cells B1, C1, ..., enter text that is to become the row headers. Enter constants in a final row (with the first column blank) for the Default row, and similarly enter a rightmost Default column. (If the condition value is simply a number, then format the column cells as text, not numbers, and type "=" or" ==" before the number. For example, =1000.
  2. Complete all steps of the Rule-from-File wizard. After you upload the XLS file, it becomes a custom field value on the History tab of the rule.
  3. After the Rule-from-File wizard completes, further processing is required. Click the pencil icon (Pencil) to open the map value rule.
  4. Click  Edit In Excel. If prompted, adjust macro security to Medium or lower to enable Excel macros.
  5. Convert buttonWhen initial macro execution ends, click Convert in the upper left corner. Close Excel. Click  Yes when prompted to save the changed Excel file, to apply the changes to the Map Value rule form.
  6. Update the Input tab of the Map Value form as necessary. Optionally, select the Row Property and Column Property properties.
  7. Update the History tab and other tabs as desired. Save the form.
Definitions Custom Fields, decision table, decision tree, flow, map value
Related topics Building a flow rule from an external Visio diagram
How to complete and use the History tab of a rule form
Using the Advanced Search tool

Up Tools, accelerators, and wizards