The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

BPM::Engine::Util::ExpressionEvaluator - Inference engine loader

SYNOPSIS

  use BPM::Engine::Util::ExpressionEvaluator;
  
  my $evaluator = BPM::Engine::Util::ExpressionEvaluator->load(
    process_instance  => $pi,        
    process           => $pi->process,
    activity          => $activity_instance->activity,
    activity_instance => $activity_instance,
    transition        => $transition
    );
  
  $evaluator->render()

DESCRIPTION

This module loads an instance of BPM::Engine::Util::Expression::Xslate suitable for evaluating XPDL expressions.

CLASS METHODS

load

Accepts a hash of options, and returns a new BPM::Engine::Util::Expression::Xslate instance suitable for rendering and evaluating XPDL expressions. In addition to providing the supplied options in the template strings as simple hash references, the expression evaluator will be supplied with an attribute function to make use of process instance variables in expressions.

Possible options are:

process_instance

BPM::Engine::Store::Result::ProcessInstance instance whose attributes will be rendered or evaluated. This is the only required option.

process

A BPM::Engine::Store::Result::Process result row.

activity

A BPM::Engine::Store::Result::Activity result row.

activity_instance

A BPM::Engine::Store::Result::ActivityInstance result row.

transition

A BPM::Engine::Store::Result::Transition result row.

The BPM::Engine::Util::Expression::Xslate instance that is returned contains all options which are available to template strings as simple hash references. In addition, the process_instance result row is used as a constructor argument.

AUTHOR

Peter de Vos, <sitetech@cpan.org>

COPYRIGHT AND LICENSE

Copyright (c) 2010, 2011 Peter de Vos.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.