Initial stub: models, generator, parser, explainer, and demo
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
package {{ package_name }}
|
||||
|
||||
{% for imp in imports %}
|
||||
import {{ imp }}
|
||||
{% endfor %}
|
||||
|
||||
rule "{{ rule.name }}"
|
||||
{% if rule.salience is not none %}
|
||||
salience {{ rule.salience }}
|
||||
{% endif %}
|
||||
{% if rule.no_loop %}
|
||||
no-loop true
|
||||
{% endif %}
|
||||
when
|
||||
$rel : Relation(
|
||||
relationType == "{{ rule.relation_type }}",
|
||||
$srcId : sourceId,
|
||||
$dstId : targetId
|
||||
)
|
||||
|
||||
$src : Component(
|
||||
id == $srcId,
|
||||
type == "{{ rule.source_type }}"
|
||||
)
|
||||
|
||||
$dst : Component(
|
||||
id == $dstId,
|
||||
type == "{{ rule.target_type }}"
|
||||
)
|
||||
then
|
||||
RuleActions.createActivity(
|
||||
"{{ rule.activity.kind }}",
|
||||
$dst,
|
||||
"{{ rule.activity.value }}"
|
||||
);
|
||||
end
|
||||
Reference in New Issue
Block a user