Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

376 add bizproc scope support in services #377

Merged

Conversation

mesilov
Copy link
Owner

@mesilov mesilov commented Apr 1, 2024

No description provided.

mesilov added 2 commits April 1, 2024 02:23
This update adds new workflow services which provide support for working with workflow templates. Additionally, a necessary update in the changelog has been made to provide transparency to users about the added 'bizproc' services and new features in the workflow module. This step towards enriching Bitrix24 SDK with workflow enhancements could help in managing workflows better and provide users with more flexibility and control.

Signed-off-by: mesilov <[email protected]>
The update introduces a new Workflow service in the WorkflowsServiceBuilder, including supporting classes such as Batch and WorkflowInstanceItemResult. It also includes methods for workflow instances and their results. The additions provide functionality to list launched workflows and handle batch operations.

Signed-off-by: mesilov <[email protected]>
@mesilov mesilov added 2.x issue related with 2.x sdk version improve DX developer experience scope BIZPROC application scope bizproc 💰 sponsored задача оплачена ⏳ WIP work in progress labels Apr 1, 2024
@mesilov mesilov self-assigned this Apr 1, 2024
@mesilov mesilov marked this pull request as draft April 1, 2024 05:55
mesilov added 18 commits April 2, 2024 03:03
Two new classes, WorkflowInstanceStartResult and WorkflowDocumentType, have been created. A start method has been introduced in the workflow service responsible for initiating a new workflow instance. It covers different types of document workflows, handles exceptions, and provides clear argument invalidation messages.

Signed-off-by: mesilov <[email protected]>
…sult`

This commit introduces the `DealSemanticStage` enum, furthering the options available for the `STAGE_SEMANTIC_ID` field of the `DealItemResult` class. This change provides more precise type information. Also, the types of several properties in the `DealItemResult` class are updated to nullable ones to better reflect possible data states.

Signed-off-by: mesilov <[email protected]>
Two new specific exceptions have been added, 'ActivityOrRobotAlreadyInstalledException' and 'ActivityOrRobotValidationFailureException' in the workflow services. These exceptions are to be thrown in situations  where an activity or robot is already installed or fails validation. This improves error handling by distinguishing specific scenarios during the API's error handling process.

Signed-off-by: mesilov <[email protected]>
This update introduces a new Robot service to the Workflows, which adds support for automation rules in the application. It includes functionalities for registration, deletion and updating of these rules, along with related result reporting features and work property enumeration.

Signed-off-by: mesilov <[email protected]>
New classes have been added to handle Workflow Events, which support the initialization of the Event Service, handling Robot Requests, and sending events with return values. Modifications have also been done on the AccessToken and WorkflowsServiceBuilder classes to support this new feature.

Signed-off-by: mesilov <[email protected]>
This commit updates the CHANGELOG.md to reflect the changes going into the 2.0-beta.3 release of the bitrix24-php-sdk. This includes the addition of the 'bizproc' scope and related services for working with workflows, as well as a new method for initializing from a robot request.

Signed-off-by: mesilov <[email protected]>
This commit introduces new functionalities for workflows and activities services. It includes adding methods to enable recording data in the workflow log, retrieval of installed activities, option to update activity fields, add and delete activities. Also, added necessary result classes and updated the access token method name.

Signed-off-by: mesilov <[email protected]>
This commit updates the versions of the 'symfony/console' and 'symfony/dotenv' dependencies in the 'composer.json' file. Additionally, the CHANGELOG has been updated, expanding the description of workflow services and their features.

Signed-off-by: mesilov <[email protected]>
Implemented the ability to stop an active workflow in the Workflow service, returning the result in a new WorkflowTerminationResult class. Also updated the WorkflowActivityDocumentType class to replace targetDocumentType with targetDocumentId.

Signed-off-by: mesilov <[email protected]>
Added case for 'access_denied' error status in the ApiLevelErrorHandler. Also replaced 'body' with 'rawResponse' in logging actions for more clarity. The Core.php file now throws the 'AuthForbiddenException' to the ErrorHandler to handle, leading to better error management.

Signed-off-by: mesilov <[email protected]>
The integration.yml GitHub workflow has been eliminated, as seen in the deletion of related codes and configurations. The workflow was responsible for running integration tests in different PHP versions and operating systems.

Signed-off-by: mesilov <[email protected]>
Updated the structure of Workflows services and incorporated new functionalities. This includes the ability to delete and launch workflows, and stop active ones. Additionally, implemented workflow templates add and delete features. Introduced Base64 encoding within the file system and now handle file not found exception.

Signed-off-by: mesilov <[email protected]>
This commit introduces exception handling for API calls attempting to update records without providing any fields to update. This checks for zero-count field arrays and throws an InvalidArgumentException in such cases. Additionally, service descriptions in the Workflow Templates have been updated for better clarity.

Signed-off-by: mesilov <[email protected]>
Introduced "nesbot/carbon" version 3.3.* as a new dependency in composer.json. Updated CHANGELOG.md to reflect the added dependency.

Signed-off-by: mesilov <[email protected]>
This commit introduces the task service for workflows along with the relevant types and results. WorkflowTaskStatusType, WorkflowTaskUserStatusType, and WorkflowTaskCompleteStatusType enums are added for various status types. WorkflowTasksResult and WorkflowTaskItemResult classes are created to handle task results. The ServiceBuilder has been updated to produce the new task service.

Signed-off-by: mesilov <[email protected]>
The commit mainly updates the PHPStan configuration in the Makefile and phpstan.neon.dist, increasing memory limit and setting parallel processing parameters. It also refactors the Task service by expanding function parameter arrays into multiple lines for improved readability and maintainability.

Signed-off-by: mesilov <[email protected]>
A new feature has been introduced to handle completion of workflow tasks. This included the addition of a new 'complete' method in the workflows task service, the WorkflowTaskAlreadyCompletedException for handling task already completed errors, and the WorkflowTaskCompleteResult for managing the task completion result. The CHANGELOG and documentation have been updated accordingly.

Signed-off-by: mesilov <[email protected]>
@mesilov mesilov changed the base branch from 371-publish-b24-php-sdk-beta-2 to 385-publish-b24-php-sdk-beta-3 May 5, 2024 20:46
@mesilov mesilov linked an issue May 5, 2024 that may be closed by this pull request
Added Rector to the project for static code analysis and cleaning. The Makefile has been updated with a linter for Rector, and a linter fixer has been provided. Additionally, 'rector/rector' was added to the composer.json dependencies.

Signed-off-by: mesilov <[email protected]>
mesilov added 6 commits May 24, 2024 01:02
This commit includes a few changes, mainly focused on code cleanup. It removes redundant properties and type conversions while enhancing string manipulations for better robustness. It also simplifies method signatures by removing unnecessary parameters, making the code more concise and easier to read.

Signed-off-by: mesilov <[email protected]>
In this commit, Rector was added to the project to enhance the quality of the code and expedite the release cycle. With the help of Rector, regular code refactoring tasks get simplified and can be performed more swiftly, thus shortening the overall time for releases.

Signed-off-by: mesilov <[email protected]>
Signed-off-by: mesilov <[email protected]>
Signed-off-by: mesilov <[email protected]>
Signed-off-by: mesilov <[email protected]>
@mesilov mesilov marked this pull request as ready for review May 26, 2024 17:26
@mesilov mesilov merged commit 15cb9cd into 385-publish-b24-php-sdk-beta-3 May 26, 2024
16 checks passed
@mesilov mesilov linked an issue May 27, 2024 that may be closed by this pull request
@mesilov mesilov deleted the 376-add-bizproc-scope-support-in-services branch August 28, 2024 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x issue related with 2.x sdk version improve DX developer experience scope BIZPROC application scope bizproc 💰 sponsored задача оплачена ⏳ WIP work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add bizproc scope support in services [feature] - add class ActivityRequeset
1 participant