Skip to content

Conversation

@julceslauhub
Copy link
Contributor

Issue & Reproduction Steps

The WorkflowManage::completeTask function currently performs various actions within the method itself. This ticket aims to refactor the function to use the Nayra BPMN engine for executing the task. The function should be modified to invoke the appropriate Nayra Engine services and events to complete the task.

Solution

  • List the changes you've introduced to solve the issue.

How to Test

Use the message broker drive "rabbitmq", bring up consumer: php artisan processmaker:consumer, create a request and complete the same.

Related Tickets & Packages

https://processmaker.atlassian.net/browse/FOUR-8177

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

@boliviacoca boliviacoca requested a review from caleeli May 31, 2023 14:34
// Update the request
$properties = $transaction['properties'];
$model = ProcessRequest::find($id);
$model = ProcessRequest::find($transaction['id']);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this right? $transaction['id'] must be the uuid of the request, not the id

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is correct, the message returned by Nayra only have numeric ids

// Update the request token
$properties = $transaction['properties'];
$model = ProcessRequestToken::find($id);
$model = ProcessRequestToken::find($transaction['id']);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this right? $transaction['id'] must be the uuid of the request token, not the id.
Are we going to use id for updates?
Take in count that the engine could create new token and that will have an uuid in Nayra side...

@caleeli
Copy link
Contributor

caleeli commented May 31, 2023

@julceslauhub as discused in the meeting please review this scenario that includes a parallel task and a boundary event.

  • Start de process
  • Complete Task 1
  • In parallel the Task 2 will be closed by the boundary
  • Finally Task 1 and Task 2 should be closed.

Parallel.zip

@caleeli caleeli merged commit e806728 into FOUR-8177 Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants