A BPMN 2.0 workflow engine for PHP
(@iteman, #24)
This provides support for BPMN models without swimlanes by providing the default role. All existing assertions in allocateWorkItem()
/ startWorkItem()
/ completeWorkItem()
on Workflow
that assert the participant acts as the given role will still be called with the default role ID __ROLE__
.
(@SirWaddles, #25)
Send Tasks have been supported. As per the BPMN2 specification, since a Send Task operation will send a message and then complete itself (and also has a field for operation reference), it uses the same mechanism as the OperationalInterface
so can be passed to the OperationRunner
for sending (check if implements MessageInterface
).
(@SirWaddles, #17)
A workflow definition can be read from XML string by using Bpmn2Reader::readSource()
.
(@iteman, #27)
As of this version, Symfony 2.8.0 or greater is required.
Release Date: 2016-10-31 UTC
(@iteman, Issue #15)
Service Tasks have been supported. Here is an example definition of Service Tasks:
<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:ext="http://org.eclipse.bpmn2/ext" xmlns:xs="http://www.w3.org/2001/XMLSchema" id="Definitions_1" exporter="org.eclipse.bpmn2.modeler.core" exporterVersion="1.3.1.Final-v20160914-1606-B56" targetNamespace="http://org.eclipse.bpmn2/default/process">
<bpmn2:message id="Message_2" name="Message 2"> // A message element that can be shared by all operations.
<bpmn2:extensionElements>
<ext:style/>
</bpmn2:extensionElements>
</bpmn2:message>
<bpmn2:interface id="Interface_2" name="Interface 2">
<bpmn2:operation id="Operation_2" name="phpmentors_workflower.service1"> // An operation named as `phpmentors_workflower.service1` for Service Tasks. In PHPMentorsWorkflowerBundle, `phpmentors_workflower.service1` is treated as the service ID for the DI container.
<bpmn2:inMessageRef>Message_2</bpmn2:inMessageRef>
</bpmn2:operation>
<bpmn2:operation id="Operation_3" name="phpmentors_workflower.service2"> // An operation named as `phpmentors_workflower.service2` for Service Tasks.
<bpmn2:inMessageRef>Message_2</bpmn2:inMessageRef>
</bpmn2:operation>
</bpmn2:interface>
<bpmn2:process id="ServiceTasksProcess" name="Default Process" isExecutable="false">
...
<bpmn2:serviceTask id="ServiceTask_1" name="Service Task 1" operationRef="Operation_2"> // A Service Task that will be processed by the operation `phpmentors_workflower.service1`.
<bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
<bpmn2:ioSpecification id="InputOutputSpecification_6">
<bpmn2:inputSet id="InputSet_10" name="Input Set 10"/>
<bpmn2:outputSet id="OutputSet_10" name="Output Set 10"/>
</bpmn2:ioSpecification>
</bpmn2:serviceTask>
<bpmn2:serviceTask id="ServiceTask_2" name="Service Task 2" operationRef="Operation_3"> // A Service Task that will be processed by the operation `phpmentors_workflower.service2`.
<bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
<bpmn2:ioSpecification id="InputOutputSpecification_10">
<bpmn2:inputSet id="InputSet_19" name="Input Set 19"/>
<bpmn2:outputSet id="OutputSet_19" name="Output Set 19"/>
</bpmn2:ioSpecification>
</bpmn2:serviceTask>
...
Of course, you should use a graphical BPMN editor to edit BPMN files.
Release Date: 2016-04-27 UTC
(@iteman, Issue #12)
A WorkflowContextInterface
object is the replacement of a bare workflow ID. This allows you to use arbitrary specification of the Workflow ID. For example, see WorkflowContext in PHPMentorsWorkflowerBundle.
(@77web, Issue #11)
An ExpressionLanguage
object can be specified to a Workflow
object by Workflow::setExpressionLanguage()
.
(@iteman, Issue #8)
An ParticipantInterface
object can be specified to a WorkItemContext
object by WorkItemContext::setParticipant()
. This allows you to allocate an acting participant instead of the authenticated participant.
Release Date: 2015-07-22 UTC
This is the first release of Workflower
.