change the status of Lead

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ksv
    Member
    • Jul 2020
    • 59

    change the status of Lead

    I try to buld some logic using BPMN. If Lead has status in process i need to ban change the status without superuser approval.
    How to orginize this logic?
  • ksv
    Member
    • Jul 2020
    • 59

    #2
    Click image for larger version

Name:	cnange status.png
Views:	489
Size:	11.3 KB
ID:	67537

    Comment

    • ksv
      Member
      • Jul 2020
      • 59

      #3
      I found an example - User task (BPMN) where for user task i assign approving to user. then i create a Lead and get error 500. What is the error?
      The previous question is relevant. If user change status how to approve this action by another user?

      Click image for larger version  Name:	user task.png Views:	6 Size:	30.8 KB ID:	67546
      i faced with issue (error 500) Espo.ERROR: Slim Application Error Type: Error Code: 0 Message: Call to undefined method Espo\Modules\Advanced\Notificators\BpmnUserTask::g etEntityManager() File: /var/www/html/application/Espo/Modules/Advanced/Notificators/BpmnUserTask.php Line: 37 Trace: #0 /var/www/html/application/Espo/Hooks/Common/Notifications.php(105): Espo\Modules\Advanced\Notificators\BpmnUserTask->process(Object(Espo\Modules\Advanced\Entities\B pm nUserTask), Array) #1 /var/www/html/application/Espo/Core/HookManager.php(111): Espo\Hooks\Common\Notifications->afterSave(Object(Espo\Modules\Advanced\Entities \B pmnUserTask), Array, Array) #2 /var/www/html/application/Espo/Core/Repositories/Database.php(287): Espo\Core\HookManager->process('BpmnUserTask', 'afterSave', Object(Espo\Modules\Advanced\Entities\BpmnUserTask ), Array) #3 /var/www/html/application/Espo/ORM/Repository/RDBRepository.php(140): Espo\Core\Repositories\Database->afterSave(Object(Espo\Modules\Advanced\Entities \B pmnUserTask), Array) #4 /var/www/html/application/Espo/Core/Repositories/Database.php(347): Espo\ORM\Repository\RDBRepository->save(Object(Espo\Modules\Advanced\Entities\Bpmn Us erTask), Array) #5 /var/www/html/application/Espo/ORM/EntityManager.php(301): Espo\Core\Repositories\Database->save(Object(Espo\Modules\Advanced\Entities\Bpmn Us erTask), Array) #6 /var/www/html/application/Espo/Modules/Advanced/Core/Bpmn/Elements/TaskUser.php(120): Espo\ORM\EntityManager->saveEntity(Object(Espo\Modules\Advanced\Entitie s\ BpmnUserTask), Array) #7 /var/www/html/application/Espo/Modules/Advanced/Core/Bpmn/BpmnManager.php(433): Espo\Modules\Advanced\Core\Bpmn\Elements\TaskUser->process() #8 /var/www/html/application/Espo/Modules/Advanced/Core/Bpmn/Elements/Base.php(286): Espo\Modules\Advanced\Core\Bpmn\BpmnManager->processPreparedFlowNode(Object(Espo\Modules\Crm \E ntities\Lead), Object(Espo\Modules\Advanced\Entities\BpmnFlowNode ), Object(Espo\Modules\Advanced\Entities\BpmnProcess) ) #9 /var/www/html/application/Espo/Modules/Advanced/Core/Bpmn/Elements/EventStartConditional.php(25): Espo\Modules\Advanced\Core\Bpmn\Elements\Base->processNextElement() #10 /var/www/html/application/Espo/Modules/Advanced/Core/Bpmn/BpmnManager.php(433): Espo\Modules\Advanced\Core\Bpmn\Elements\EventStar tConditional->process() #11 /var/www/html/application/Espo/Modules/Advanced/Core/Bpmn/BpmnManager.php(198): Espo\Modules\Advanced\Core\Bpmn\BpmnManager->processPreparedFlowNode(Object(Espo\Modules\Crm \E ntities\Lead), Object(Espo\Modules\Advanced\Entities\BpmnFlowNode ), Object(Espo\Modules\Advanced\Entities\BpmnProcess) ) #12 /var/www/html/application/Espo/Modules/Advanced/Core/Workflow/Actions/StartBpmnProcess.php(59): Espo\Modules\Advanced\Core\Bpmn\BpmnManager->startProcess(Object(Espo\Modules\Crm\Entities\L ea d), Object(Espo\Modules\Advanced\Entities\BpmnFlowchar t), 'hmchah0hs2', Object(Espo\Modules\Advanced\Entities\BpmnProcess) , '602628948e4e8c5...') #13 /var/www/html/application/Espo/Modules/Advanced/Core/Workflow/Actions/Base.php(225): Espo\Modules\Advanced\Core\Workflow\Actions\StartB pmnProcess->run(Object(Espo\Modules\Crm\Entities\Lead), Object(stdClass)) #14 /var/www/html/application/Espo/Modules/Advanced/Core/Workflow/ActionManager.php(72): Espo\Modules\Advanced\Core\Workflow\Actions\Base->process(Object(Espo\Modules\Crm\Entities\Lead), Object(stdClass), NULL, Object(stdClass)) #15 /var/www/html/application/Espo/Modules/Advanced/Core/Workflow/ActionManager.php(43): Espo\Modules\Advanced\Core\Workflow\ActionManager->runAction(Object(stdClass), '602628948e4e8c5...', Object(stdClass)) #16 /var/www/html/application/Espo/Modules/Advanced/Core/WorkflowManager.php(196): Espo\Modules\Advanced\Core\Workflow\ActionManager->runActions(Array) #17 /var/www/html/application/Espo/Modules/Advanced/Hooks/Common/Workflow.php(43): Espo\Modules\Advanced\Core\WorkflowManager->process(Object(Espo\Modules\Crm\Entities\Lead), 'afterRecordCrea...', Array) #18 /var/www/html/application/Espo/Core/HookManager.php(111): Espo\Modules\Advanced\Hooks\Common\Workflow->afterSave(Object(Espo\Modules\Crm\Entities\Lead ), Array, Array) #19 /var/www/html/application/Espo/Core/Repositories/Database.php(287): Espo\Core\HookManager->process('Lead', 'afterSave', Object(Espo\Modules\Crm\Entities\Lead), Array) #20 /var/www/html/application/Espo/Modules/Crm/Repositories/Lead.php(48): Espo\Core\Repositories\Database->afterSave(Object(Espo\Modules\Crm\Entities\Lead ), Array) #21 /var/www/html/application/Espo/ORM/Repository/RDBRepository.php(140): Espo\Modules\Crm\Repositories\Lead->afterSave(Object(Espo\Modules\Crm\Entities\Lead ), Array) #22 /var/www/html/application/Espo/Core/Repositories/Database.php(347): Espo\ORM\Repository\RDBRepository->save(Object(Espo\Modules\Crm\Entities\Lead), Array) #23 /var/www/html/application/Espo/Services/Record.php(687): Espo\Core\Repositories\Database->save(Object(Espo\Modules\Crm\Entities\Lead)) #24 /var/www/html/application/Espo/Services/Record.php(1144): Espo\Services\Record->storeEntity(Object(Espo\Modules\Crm\Entities\.. . [] []
      [
      Last edited by ksv; 02-12-2021, 10:02 AM.

      Comment

      • Maximus
        Senior Member
        • Nov 2018
        • 2731

        #4
        Hello,
        please provide the next information so we could reproduce the issue:
        1. What is your EspoCRM version?
        2. What is your Advanced pack version?
        3. What is you php version (Administration -> System Requirements)?
        3. Detailed screenshots with the configurations of every BPM element (e.g. Conditional Start, User Task, Gate, Task).

        Comment

        • ksv
          Member
          • Jul 2020
          • 59

          #5
          1. What is your EspoCRM version?
          6.0.6

          2. What is your Advanced pack version?
          2.6.5

          3. What is you php version (Administration -> System Requirements)?
          7.3.20

          3. Detailed screenshots with the configurations of every BPM element (e.g. Conditional Start, User Task, Gate, Task).

          i put pictures in attachment. But this is not quite what I need. I need a specific user to approve STATUS after changing the lead status
          Attached Files

          Comment

          • Maximus
            Senior Member
            • Nov 2018
            • 2731

            #6
            Hi,
            This issue is already fixed.
            Please open a terminal and run the command: php command.php upgrade in order to upgrade your system.
            It will upgrade your system to the version 6.0.9.

            Comment

            • ksv
              Member
              • Jul 2020
              • 59

              #7
              Many thx, error is disappeared after upgrading. How to do following->If user change status how to approve this action by another user?

              Comment

              • Maximus
                Senior Member
                • Nov 2018
                • 2731

                #8
                The BPM configs you provided are working. When the User Task element is fired, a specified user received a notification like this one "Process user task Approved has been assigned to you".
                In this notification, the target user can click a link right to this Task.

                In case you missed a link, you can open the #BpmnUserTask entity.
                In order to add the BpmnUserTask entity to the tab list you need to open Administration -> User Interface -> Tab List -> add Process User Tasks.



                Comment

                Working...