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 > Application > Tools > All Wizards
Harvesting a TXT file to a decision tree
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 imported with this wizard, the system
creates a decision tree similar
to the image shown at right.
Harvesting a Public flow XML file to a flow
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:
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.
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 |
Harvesting an Excel worksheet to a map value
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.
Custom Fields, decision table, decision tree, flow, map value | |
Building a flow rule from an external Visio diagram How to complete and use the History tab of a rule form |