BPM-Engine

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

t/var/patterns/wcp38
t/var/patterns/wcp41
t/var/samples/06-multi-or-split-and-join
t/var/samples/07-multi-and-split-and-join
t/var/samples/09-unstructured-xor-routes
t/var/samples/11-unstructured-or-tasks
t/var/samples/14-inclusive-splits-and-joins
t/var/samples/15-mixed-join
t/var/samples/16-deadlock
t/var/samples/17-production
t/var/samples/18-production-unsynchronized
t/var/samples/package.tt
t/var/tasks/assignments
t/var/tasks/data.xpdl
t/var/tasks/package.tt
t/var/tasks/tasks

inc/Module/Install.pm  view on Meta::CPAN

# }

use 5.005;
use strict 'vars';
use Cwd        ();
use File::Find ();
use File::Path ();

use vars qw{$VERSION $MAIN};
BEGIN {
	# All Module::Install core packages now require synchronised versions.
	# This will be used to ensure we don't accidentally load old or
	# different versions of modules.
	# This is not enforced yet, but will be some time in the next few
	# releases once we can make sure it won't clash with custom
	# Module::Install extensions.
	$VERSION = '1.06';

	# Storage for the pseudo-singleton
	$MAIN    = undef;

lib/BPM/Engine/ProcessRunner.pm  view on Meta::CPAN

        };

    my $runner = BPM::Engine::ProcessRunner->new(
        process_instance => $instance,
        callback         => $callback,
        );
  
    $runner->start_process();

    # somewhere else, after completing a task, 
    # from an asynchronous task handler...
  
    $runner->complete_activity($activity, $instance, 1);

=head1 DESCRIPTION

Implements the workflow enactment logic.

=head1 CALLBACKS

The methods in this package emit callback events to a callback handler that may 

share/schemas/XPDL_2_0.xsd  view on Meta::CPAN

					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
			<xsd:attribute name="PackageRef" type="xsd:NMTOKEN" use="optional">
				<xsd:annotation>
					<xsd:documentation>BPMN: needed for independent subprocess</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="InstanceDataField" type="xsd:string" use="optional">
				<xsd:annotation>
					<xsd:documentation> Used to store the instance id of the subflow instantiated by the activity. This is then available later on (e.g. for correlation, messaging etc.) especially in the case of asynchronous invocation.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="StartActivitySetId" type="xsd:NMTOKEN" use="optional"/>
			<xsd:attribute name="StartActivityId" type="xsd:NMTOKEN" use="optional"/>
			<xsd:anyAttribute namespace="##other" processContents="lax"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="Task">
		<xsd:annotation>
			<xsd:documentation>BPMN</xsd:documentation>

share/schemas/XPDL_2_1.xsd  view on Meta::CPAN

					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
			<xsd:attribute name="PackageRef" type="xpdl:IdRef" use="optional">
				<xsd:annotation>
					<xsd:documentation>BPMN: Corresponds to BPMN attribute DiagramRef, pointer to a BPD identified by Package/@Id.  [Maybe IDREF doesn't work here since ID is in a different document.]</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="InstanceDataField" type="xsd:string" use="optional">
				<xsd:annotation>
					<xsd:documentation> Used to store the instance id of the subflow instantiated by the activity. This is then available later on (e.g. for correlation, messaging etc.) especially in the case of asynchronous invocation.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="StartActivitySetId" type="xpdl:IdRef" use="optional"/>
			<xsd:attribute name="StartActivityId" type="xpdl:IdRef" use="optional"/>
			<xsd:anyAttribute namespace="##other" processContents="lax"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="Task">
		<xsd:annotation>
			<xsd:documentation>BPMN</xsd:documentation>

share/schemas/XPDL_2_2.xsd  view on Meta::CPAN

					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
			<xsd:attribute name="PackageRef" type="xpdl:IdRef" use="optional">
				<xsd:annotation>
					<xsd:documentation>BPMN: Corresponds to BPMN attribute DiagramRef, pointer to a BPD identified by Package/@Id.  [Maybe IDREF doesn't work here since ID is in a different document.]</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="InstanceDataField" type="xsd:string" use="optional">
				<xsd:annotation>
					<xsd:documentation> Used to store the instance id of the subflow instantiated by the activity. This is then available later on (e.g. for correlation, messaging etc.) especially in the case of asynchronous invocation.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="StartActivitySetId" type="xpdl:IdRef" use="optional"/>
			<xsd:attribute name="StartActivityId" type="xpdl:IdRef" use="optional"/>
			<xsd:anyAttribute namespace="##other" processContents="lax"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="Task">
		<xsd:annotation>
			<xsd:documentation>BPMN</xsd:documentation>

t/04-run/12-patterns.t  view on Meta::CPAN

#-- basic patterns
if(1) {
$package = $engine->create_package('./t/var/01-basic.xpdl');

# wcp1
diag('sequence');
ok($process = $package->processes({ process_uid => 'wcp1' })->first);
is(sequence_for(), 'A-B-C', 'wcp1 sequence matches');

# wcp2
diag('parallel split (AND-split) and synchronization (AND-join)');
$process = $package->processes({ process_uid => 'wcp2' })->first;
is(sequence_for(), 'A-B-C-D', 'wcp2 sequence matches');

# wcp4
diag('exclusive choice (XOR-split) + simple merge (XOR-join)');
$process = $package->processes({ process_uid => 'wcp4' })->first;
is(sequence_for(WhereToGo => 'B'), 'A-B-E', 'wcp4 sequence matches');
is(sequence_for(WhereToGo => 'C'), 'A-C-E', 'wcp4 sequence matches');
is(sequence_for(), 'A-D-E', 'wcp4 sequence matches');
#} 'no memory leaks';

t/etc/engine.yaml  view on Meta::CPAN

connect_info:
    dsn: dbi:SQLite:dbname=t/var/bpmengine.db
    user: testuser
    password: TestPass
    AutoCommit: 1
    sqlite_unicode: 1
    #mysql_enable_utf8: 1
    #pg_enable_utf8: 1
    #on_connect_call: use_foreign_keys
    #on_connect_do:
    #  - PRAGMA synchronous = OFF

t/var/02-branching.xpdl  view on Meta::CPAN

            </DataType>
            <InitialValue></InitialValue>
        </DataField>
    </DataFields>
    <WorkflowProcesses>


        <WorkflowProcess AccessLevel="PUBLIC" Id="wcp6" Name="WCP6+7: Multiple Choice and Structured Synchronizing Merge">
            <ProcessHeader DurationUnit="D">
                <Created>2004-08-31 22:55:37</Created>
                <Description>The Multi-Choice pattern describes the splitting of one single branch in two or more parallel branches. As soon as the incoming branch is enabled the thread is immediately passed to one or more of the outgoing branches. W...
            </ProcessHeader>
            <RedefinableHeader PublicationStatus="UNDER_TEST">
                <Author>Peter de Vos</Author>
            </RedefinableHeader>
            <FormalParameters>
                <FormalParameter Id="do_B" Mode="IN">
                    <DataType>
                        <BasicType Type="STRING"/>
                    </DataType>
                </FormalParameter>

t/var/02-branching.xpdl  view on Meta::CPAN

                <Transition Id="wcp6.C-GW2" Name="Transition" From="wcp6.C"   To="wcp6.GW2"/>
                <Transition Id="wcp6.D-GW2" Name="Transition" From="wcp6.D"   To="wcp6.GW2"/>
                <Transition Id="wcp6.GW2-E" Name="Transition" From="wcp6.GW2" To="wcp6.E"/>
            </Transitions>
        </WorkflowProcess>


        <WorkflowProcess Id="wcp8" Name="WCP8: Multiple Merge">
            <ProcessHeader>
                <Created>2010-11-26 22:38:46</Created>
                <Description>The Multi-Merge pattern describes the convergence two or more parallel branches into one single branch. Special about this pattern is that each enablement of an incoming branch results in the activation of the proceeding ...
            </ProcessHeader>
            <RedefinableHeader PublicationStatus="UNDER_TEST">
                <Author>Peter de Vos</Author>
            </RedefinableHeader>
            <DataFields>
                <DataField Id="common" IsArray="0">
                    <DataType>
                        <BasicType Type="STRING"/>
                    </DataType>
                    <InitialValue>'common data'</InitialValue>

t/var/08-samples.xpdl  view on Meta::CPAN

                </Transition>
                <Transition Id="ex8.Split2-Join2" From="ex8.Split2" To="ex8.Join2">
                    <Condition Type="CONDITION">attribute('test2_ok')</Condition>
                </Transition>
                <Transition Id="ex8.Join2-Package" From="ex8.Join2" To="ex8.Package"/>
                <Transition Id="ex8.Package-End" From="ex8.Package" To="ex8.End"/>
            </Transitions>
        </WorkflowProcess>


        <WorkflowProcess Id="production-unsynchronized" Name="production-unsynchronized">
            <ProcessHeader>
                <Created>2010-09-07 04:04:58</Created>
            </ProcessHeader>
            <FormalParameters>
                <FormalParameter Id="test1_ok" Mode="IN" Required="1">
                    <DataType>
                        <BasicType Type="STRING"/>
                    </DataType>
                </FormalParameter>
                <FormalParameter Id="test2_ok" Mode="IN">

t/var/gen_xpdl.pl  view on Meta::CPAN

# samples
my @t = qw/
  06-multi-or-split-and-join
  07-multi-and-split-and-join
  09-unstructured-xor-routes
  11-unstructured-or-tasks
  14-inclusive-splits-and-joins
  15-mixed-join
  16-deadlock
  17-production
  18-production-unsynchronized
  /;
  
$tt->process(
    './t/var/samples/package.tt',
    { id => 'samples', title => 'Samples', items => \@t, },
    './t/var/08-samples.xpdl'
    ) || die $tt->error(), "\n";

# tasks
my @ts = qw/

t/var/patterns/wcp06  view on Meta::CPAN

        <WorkflowProcess AccessLevel="PUBLIC" Id="wcp6" Name="WCP6+7: Multiple Choice and Structured Synchronizing Merge">
            <ProcessHeader DurationUnit="D">
                <Created>2004-08-31 22:55:37</Created>
                <Description>The Multi-Choice pattern describes the splitting of one single branch in two or more parallel branches. As soon as the incoming branch is enabled the thread is immediately passed to one or more of the outgoing branches. W...
            </ProcessHeader>
            <RedefinableHeader PublicationStatus="UNDER_TEST">
                <Author>Peter de Vos</Author>
            </RedefinableHeader>
            <FormalParameters>
                <FormalParameter Id="do_B" Mode="IN">
                    <DataType>
                        <BasicType Type="STRING"/>
                    </DataType>
                </FormalParameter>

t/var/patterns/wcp08  view on Meta::CPAN

        <WorkflowProcess Id="wcp8" Name="WCP8: Multiple Merge">
            <ProcessHeader>
                <Created>2010-11-26 22:38:46</Created>
                <Description>The Multi-Merge pattern describes the convergence two or more parallel branches into one single branch. Special about this pattern is that each enablement of an incoming branch results in the activation of the proceeding ...
            </ProcessHeader>
            <RedefinableHeader PublicationStatus="UNDER_TEST">
                <Author>Peter de Vos</Author>
            </RedefinableHeader>
            <DataFields>
                <DataField Id="common" IsArray="0">
                    <DataType>
                        <BasicType Type="STRING"/>
                    </DataType>
                    <InitialValue>'common data'</InitialValue>

t/var/samples/18-production-unsynchronized  view on Meta::CPAN

        <WorkflowProcess Id="production-unsynchronized" Name="production-unsynchronized">
            <ProcessHeader>
                <Created>2010-09-07 04:04:58</Created>
            </ProcessHeader>
            <FormalParameters>
                <FormalParameter Id="test1_ok" Mode="IN" Required="1">
                    <DataType>
                        <BasicType Type="STRING"/>
                    </DataType>
                </FormalParameter>
                <FormalParameter Id="test2_ok" Mode="IN">



( run in 0.831 second using v1.01-cache-2.11-cpan-0d8aa00de5b )