Commit Graph

32 Commits

Author SHA1 Message Date
b5af9f7b63 Add futurePersonSignatures property to WorkflowTransitionContextDTO
A new property named futurePersonSignatures has been added to the WorkflowTransitionContextDTO class. This will hold a list of Person objects expected to sign the next step, improving the scope of information available within the workflow context.
2024-07-10 10:40:18 +02:00
7f3de62b2c Move the metadata on each workflow transition from the event subscriber to the entity EntityWorkflow::setStep method
The main update is in the setStep method of EntityWorkflow, where parameters are added to capture the transition details. These include the exact transition, the user who made the transition and the time of transition.

The WorkflowController extracts this information and put it into the transition's context. The MarkingStore transfer it to the EntityWorkflow::setStep method, and all metadata are recorded within the entities themselve.
2024-07-10 10:40:17 +02:00
a309cc0774 Refactor workflow classes and forms
- the workflow controller add a context to each transition;
- the state of the entity workflow is applyied using a dedicated marking store
- the method EntityWorkflow::step use the context to associate the new step with the future destination user, cc users and email. This makes the step consistent at every step.
- this allow to remove some logic which was processed in eventSubscribers,
- as counterpart, each workflow must specify a dedicated marking_store:

```yaml
framework:
    workflows:
        vendee_internal:
            # ...
            marking_store:
                service: Chill\MainBundle\Workflow\EntityWorkflowMarkingStore
```
2024-07-02 08:30:28 +02:00
06dd7dd4f5 apply rector rules 2024-05-28 14:58:09 +02:00
73d6578a3a Fix workflow configuration 2024-04-29 15:28:24 +02:00
5be85a4fc6 Refactored code to use PHP8 attributes instead of annotations
In this change, Doctrine and validation annotations have been replaced with PHP8 Attributes. The Rector tool has been configured with a list of annotations to convert to attributes. As a consequence, the PHPStan's rules have been updated to reflect these changes. The PHP8's nullable operator (?) has been added where required, and comments in field declaration have been replaced with #[Attribute] syntax.
2024-04-08 12:11:29 +02:00
0ff4593863 Apply rector rules: add annotation for doctrine mapping 2024-04-05 13:11:42 +02:00
72016e1a21 Apply rector rules: add annotation for doctrine mapping 2024-04-05 00:01:30 +02:00
579bd829f8 Apply rector rules: symfony up to 54 2024-04-04 23:30:25 +02:00
bc2041cbdd apply more cs rules for php-cs 2023-10-17 13:27:03 +02:00
075aca493b DX: type-hing oneToMany and ManyToMany properties as collection 2023-07-19 16:21:17 +02:00
dde3002100 DX: apply rector rules up to php8.0 2023-04-28 22:30:33 +02:00
a21637331f Fixed: [workflow] validation of users in cc and dest
The validation is processed at the form step, so before the transition is processed
2023-04-13 12:24:44 +02:00
nobohan
2b3d7f34fc Feature: Add new field ccuser in workflow step form 2023-03-29 11:19:51 +02:00
eaea702454 FIX add initial user as suggestion and fix error when there are no suggestions 2023-03-15 10:14:25 +01:00
67e68ac149 FIX [review] processing review, but stuck at transformation of json string to array 2023-03-15 09:37:56 +01:00
4c7a16587b [workflow][method] add method to get involved/suggested users 2023-03-15 09:37:56 +01:00
9699e2304a fix cs: declare type and license header mismatch 2022-10-06 22:25:43 +02:00
67c3f3a840 fix cs with licencse header 2022-10-05 17:08:14 +02:00
1479e2ae9a entity workflow: handle sending an access key by email 2022-02-24 21:53:05 +01:00
45beb27f83 fix sending notifications 2022-02-16 21:54:37 +01:00
93345c09a1 fix cs 2022-02-11 13:45:21 +01:00
199a441593 fix tests for EntityWorkflow 2022-02-11 13:24:29 +01:00
a612d7dd9f improve workflow decision form 2022-02-01 12:19:51 +01:00
86e7b0f007 rewrite workflow and handle finalize differently 2022-01-29 00:20:35 +01:00
fdafe7c82b normalizer for entityworkflow 2022-01-29 00:20:35 +01:00
0378df42b6 fix cs 2022-01-27 17:08:00 +01:00
88d1fe24b4 Creation of PersonResource 2022-01-26 12:52:15 +00:00
Pol Dellaiera
7513187a6d Revert "fix cs"
This reverts commit 7b3e9cb490.
2022-01-25 15:54:20 +01:00
7b3e9cb490 fix cs 2022-01-25 14:40:28 +01:00
Pol Dellaiera
2e6d281bfc cs: Autofix coding standard based on updated rules. 2022-01-25 11:46:29 +01:00
c7dbaae8d6 105 worflow 2022-01-24 13:17:46 +00:00