lib/rules_engine/rule.rb in rules_engine-0.1.1 vs lib/rules_engine/rule.rb in rules_engine-0.1.3
- old
+ new
@@ -59,25 +59,25 @@
@errors ||= {}
return @errors
end
##################################################################
- # callbacks when the rule is added and removed from a pipeline
- def after_add_to_pipeline(re_pipeline_id, re_rule_id)
+ # callbacks when the rule is added and removed from a workflow
+ def after_add_to_workflow(workflow_code)
end
- def before_remove_from_pipeline(re_pipeline_id, re_rule_id)
+ def before_remove_from_workflow(workflow_code)
end
##################################################################
# execute the rule
# return an RulesEngine::RuleOutcome object to define what to do next
# if nil to continue to the next rule
- def process(job, data)
- job.audit("process #{title}", ReJobAudit::AUDIT_INFO)
+ def process(process_id, data)
+ # process.audit("process #{title}", RulesEngine::Process::AUDIT_INFO)
# RulesEngine::RuleOutcome.new(RulesEngine::RuleOutcome::OUTCOME_STOP_SUCCESS)
# RulesEngine::RuleOutcome.new(RulesEngine::RuleOutcome::OUTCOME_STOP_FAILURE)
- # RulesEngine::RuleOutcome.new(RulesEngine::RuleOutcome::OUTCOME_START_PIPELINE, 'next_pipeline')
+ # RulesEngine::RuleOutcome.new(RulesEngine::RuleOutcome::OUTCOME_START_WORKFLOW, 'next_workflow')
RulesEngine::RuleOutcome.new(RulesEngine::RuleOutcome::OUTCOME_NEXT)
end
end
end