About the Rule-from-File wizard (Rule harvesting) |
You can create a flow, decision table, decision tree, or map value 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.
Publicflow.xml
) for flows to represent a process, you can upload the file to create a corresponding draft flow rule.This wizard creates a work item with the prefix pxAT-
. To find open wizard work items, select Designer Studio > Application > Tools > All Wizards
To harvest a decision tree from a text file, prepare a file in the following format:
EVALUATE
, IF
, CALL
, RETURN
, THEN
, CONTINUE
, OTHERWISE
, and RETURN
in uppercase. These have the same meaning as the corresponding elements in the rule.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:
EVALUATE 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 you import the file using this wizard, the system creates a decision tree from the file.
PRPC'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:
On the Attach File wizard step, select Public Flow
as the Format value.
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 |
To create a map value (Rule-Obj-MapValue rule type) from an Excel worksheet:
Medium
or lower to enable Excel macros.By default, the rule is saved with Availability = No/Draft Mode
. See How to change rule availability.